Граф коммитов

2521 Коммитов

Автор SHA1 Сообщение Дата
Connor Peet eb545faf20
fix: eval webpack config breakpoints not setting (#1833)
* fix: eval webpack config breakpoints not setting

V8 does not resolve URL-set breakpoints when the script in question only
has that URL via a sourceURL mapping.

I also noticed an issue with per-script entrypoint breakpoints where
another file with the same name, or part of the same name, could
incorrectly remove the entrypoint breakpoint early. It's fine to just
leave the breakpoint around -- can be slightly slower, but better than
missing the breakpoint entirely.

Fixes https://github.com/microsoft/vscode/issues/194988

* fix: don't use entry bps in breakpoint reason calculation

* fix test
2023-10-06 12:40:02 -07:00
Connor Peet f38cea5e35
fix: envFiles variables appending rather than replacing in attach (#1832)
Fixes https://github.com/microsoft/vscode/issues/1935510
2023-10-05 20:35:50 -07:00
Connor Peet 03af2c8bc1
fix: auto-attach/debug terminal not working in nightly (#1831)
The plugin didn't mark acorn as side-effect-free, so the watchdog bundle was trying to import it
2023-10-04 15:22:38 -07:00
Connor Peet 3c0817c2ed
fix: make sourcemap renames scope aware (#1827)
Uses Acorn to parse compiled files and create a tree of scopes. Then,
only apply renames in scopes when appropriate. This is far better than
what we were doing before when we were just looking for nearby renames.

This is not very fast for large bundled files. I initially worked on
building a fork of https://github.com/guybedford/es-module-lexer that
would scan for blocks. This worked in many cases, but failed for cases
when there's no BlockStatement. For example, `for (const foo of bar) foo()`
would not detect a 'scope' around `foo()`. This is not great, especially
with minified code where such patterns are common.

Instead, we'll parse large bundles (>512KB) in a one-off worker_thread.
We also some work in our build process to vendor acorn and acorn-loose
to avoid duplicating it in the worker thread code.
2023-10-02 15:29:10 -07:00
Connor Peet 5613912b6b
chore: remove old codeql pipeline (#1826)
This stopped working recently, and codeql has been done in the ADO pipeline for a while now.
2023-09-28 10:33:45 -07:00
Connor Peet 0799535803
fix: error when processing private properties with a map (#1825)
Fixes #1824
2023-09-28 10:20:53 -07:00
Connor Peet eb98953071
Merge pull request #1822 from microsoft/connor4312/release-183
1.83.0
2023-09-26 22:36:45 -07:00
Connor Peet 1831caa911
docs: changelog for 1.83 2023-09-26 19:00:38 -07:00
Connor Peet b9b269f982
1.83.0 2023-09-26 18:58:51 -07:00
Connor Peet 5a55d1d1cd
fix: delegate wasm evaluation with dwarf (#1821)
* fix: delegate wasm evaluation with dwarf

Fixes https://github.com/microsoft/vscode/issues/194232

* update test fixture
2023-09-26 16:21:18 -07:00
Connor Peet 58f6678cd4
fix: error when stepping in decompiled dwarf wasm (#1820)
Fixes #1819
2023-09-26 12:39:47 -07:00
Connor Peet 22ada16e3d
fix: allow setting breakpoints in common wasm languages (#1818)
Fixes https://github.com/microsoft/vscode/issues/194146
2023-09-26 21:25:22 +02:00
Connor Peet 5c1d581bc4
fix: authentication sourcemap fallback failing for some maps (#1816)
Fixes #1814
2023-09-26 12:03:50 -07:00
Connor Peet 47a0837f16
fix: source map stepping registered multiple times (#1817)
Fixes https://github.com/microsoft/vscode/issues/194190
2023-09-26 12:03:22 -07:00
Connor Peet 7ef3c182d4
fix: invalid bps not always removed on overlaid file (#1813)
Instead of checking the source url when a script is parsed, used the script URL to see if we should removed unmapped breakpoints
2023-09-25 16:18:43 -07:00
Ilia Choly a1dda49525
chore: remove redundant type definitions for del (#1812) 2023-09-21 15:48:11 +00:00
Connor Peet 7b40f5cc27
chore: add test cases for wasm dwarf debugging (#1811)
Closes #1789
2023-09-20 15:25:18 -07:00
Connor Peet 613b9eaebc
feat: make sourcemap toggle work for wasm/wat, add disable (#1810) 2023-09-20 21:59:59 +02:00
Connor Peet 42b6c74b1d
fix: edge devtools incorrectly ask for local forwarding (#1809)
Fixes https://github.com/microsoft/vscode/issues/193110
2023-09-20 18:56:16 +02:00
Connor Peet 76ec0a3c73
Merge pull request #1804 from microsoft/connor4312/wasm-1
feat: initial DWARF debugger integration
2023-09-19 19:19:08 -07:00
Connor Peet 61a8b9ffe9
Merge pull request #1805 from microsoft/connor4312/wasm-12
feat: make wasm variable store work
2023-09-19 19:07:10 -07:00
Connor Peet 903b783d49
Merge pull request #1806 from microsoft/connor4312/wasm-13
feat: make wasm inline breakpoints work
2023-09-19 19:07:00 -07:00
Connor Peet ccabc8cafc
Merge pull request #1807 from microsoft/connor4312/wasm-14
feat: prompt to install extension on wasm step
2023-09-19 19:06:44 -07:00
Connor Peet ed66fe33fe
feat: implement wasm inline functions (#1808)
* implement inlined method handling and improve stepping

* update tests
2023-09-19 19:06:23 -07:00
Connor Peet 60951376ab
prompt to install extension on wasm step 2023-09-19 16:47:38 -07:00
Connor Peet d9d52b4af1
make inline breakpoints work 2023-09-19 16:45:59 -07:00
Connor Peet 3447541f8c
make variables store work 2023-09-19 16:41:43 -07:00
Connor Peet 676e7e7a9c
feat: initial DWARF debugger integration
Enables stepping around and setting breakpoints in native code.
Variables represenation is still a todo, and this needs some polish.

It refactors the `Source.sourceMap` into a more generic location
provider, which may be backed by the new IWasmSymbols interface. This
then talks to the DWARF debugger. The SourceContainer's `_sourceMaps`
are also now just folded into the `Source.sourceMap`; that information
was duplicate and the only benefit was deduplication if two sources had
the same sourcemap, but this is really rare.

This also made all location mapping asynchronous, so there were a
few refactors around there, too.

It also refactors how I implemented WAT (text format decompilation) last
iteration. That previously "pretended" the source of the WASM was WAT,
but this caused issues because the location transformation we did on the
scripts is done before location mapping. So instead, the WAT is an extra
fake 'file' in the symbols and we resolve any unknown locations into the
WAT file.

One that that _doesn't_ work yet is entrypoint breakpoints for wasm,
which means that breakpoints set before the debug session starts may be
missed. I have a thread out to the Chromium folks to see if there's
a solution to this.

For #1789
2023-09-15 16:48:08 -07:00
Connor Peet 65f087c468
feat: show class names of methods in call stack view (#1802)
* feat: show class names of methods in call stack view

Uses the same logic as variable preview generation.

Closes #1770

* better formatting for static, fix test
2023-09-13 14:54:15 -07:00
Connor Peet bf9c6e625a
Merge pull request #1792 from microsoft/connor4312/1.82
v1.82
2023-08-30 09:51:22 -07:00
Connor Peet 43ab1c29d3
1.82.0 2023-08-30 09:42:50 -07:00
Connor Peet 36106ff437
chore: adopt PortAttributesProvider api changes 2023-08-30 09:42:33 -07:00
Connor Peet e4fd67d6d2
docs: prep for 1.82 2023-08-30 09:41:23 -07:00
Connor Peet 72c0276263
feat: support basic webassembly debugging (#1791)
* feat: support basic webassembly debugging

Supports viewing, stepping through, and setting breakpoints in
webassembly (decompiled as WAT) in the editor. Includes a
basic tmLanguage for WAT.

![](https://memes.peet.io/img/23-08-b7617299-9f8d-41c9-8fe0-ada8a3c57966.png)

Unfortunately we eagerly have to decompile WASM in order to get line
mappings to show e.g. in breakpoints. Location mapping is currently
mostly synchronous and I didn't want to make everything async
for webassembly. However, we don't keep the WAT source in memory,
instead request it again if it's needed. I opted to do this to reduce
memory usage for user applications that just happen to contain WASM
where they aren't always interested in debugging it.

For #1789
Fixes #1715 on the way

* retain wasm-set breakpoints between reloads
2023-08-27 12:24:30 -07:00
Connor Peet 07fd954ac8
fix: ensure ELECTRON_RUN_AS_NODE is set for the watchdog (#1787)
Fixes #1786
2023-08-23 23:07:50 +02:00
Sunil Surana e82e8f75ce
refactor: speed up sourcemap lookups by checking existence of .map files (#1780)
* If .map file exists no need to parse it

* add line space

* code comment

* update to use previously read children

* fix root not getting touched when retrieved

* avoid extra stat in createMetadataForFile

* fixup tests

---------

Co-authored-by: Sunil Surana <susurana@microsoft.com>
Co-authored-by: Connor Peet <connor@peet.io>
2023-08-11 16:03:58 +00:00
Connor Peet 324090940b
feat: adopt supportTerminateDebuggee for browsers and node (#1777)
Fixes #1733 on the way
2023-08-04 11:45:15 -07:00
Connor Peet 63a641baa3
chore: trigger perScriptSourceMaps for vite dev server (#1776)
Fixes #1739
2023-08-04 10:49:50 -07:00
Connor Peet e4a07639a3
feat: add `Symbol.for("debug.description")` as a way to generate object descriptions (#1775)
Fixes https://github.com/microsoft/vscode/issues/102181
2023-08-03 13:01:39 -07:00
Connor Peet 9353ca1176
fix: support vite HMR source replacements (#1774)
Fixes #1761
2023-08-03 10:16:41 -07:00
Connor Peet cda0db79a1
feat: use the browser networks stack as fallback when direct load fails (#1772)
* feat: use the browser networks stack as fallback when direct load fails

Chrome recently(ish) added a `Network.loadNetworkResource` request which
allows us to ask the browser to load a resource, and get the response.
Instead of our previous hacky method of asking and then applying cookies
manually, which only worked for some scenarios, use this method as a
fallback if manually requesting the resource fails.

Do some rearranging since previously the SourceMapFactory was global
which prevented it from using session-specific data.

Fixes #1766
Fixes #425 (3 years later!)

* optimize

* update test status code
2023-08-03 09:10:14 -07:00
Connor Peet 670bb82f06
fix: don't overwrite custom NODE_OPTIONS (#1771)
Fixes #1746
2023-08-02 11:54:12 -07:00
Connor Peet 4d7c704d3f
fix: hint content type for sources with query strings (#1769)
Fixes https://github.com/microsoft/vscode/issues/181746
2023-08-01 16:27:42 -07:00
Connor Peet 027ae0549a
fix: child processes from extension host not getting spawned during debug (#1767) 2023-07-31 16:46:18 -07:00
Connor Peet 5e9e723af1
fix: immediately log stdout/err unless EXT is encountered (#1768)
Previously when supporting EXT we added per-line splitting and emitting,
but we actually should just reemit things immediately unless we see
an EXT.

Fixes https://github.com/microsoft/vscode/issues/181785
2023-07-31 16:42:49 -07:00
Connor Peet df0247e2df
Merge pull request #1763 from microsoft/connor4312/1.81
1.81.0
2023-07-24 16:45:29 -07:00
Connor Peet 8f6ba8b762
1.81.0 2023-07-24 16:27:11 -07:00
Connor Peet 09edcf6c87
docs: prep for 1.81 2023-07-24 16:26:57 -07:00
Connor Peet b0628093cf
Be more specific with EnvironmentVariableCollection.description (#1762)
Fixes #1757
2023-07-21 11:34:34 -07:00
dependabot[bot] db9e6e0d08
chore(deps-dev): bump word-wrap from 1.2.3 to 1.2.4 (#1760)
Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3 to 1.2.4.
- [Release notes](https://github.com/jonschlinkert/word-wrap/releases)
- [Commits](https://github.com/jonschlinkert/word-wrap/compare/1.2.3...1.2.4)

---
updated-dependencies:
- dependency-name: word-wrap
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-21 10:45:02 -07:00