microsoft / vscode-js-debug

A DAP-compatible JavaScript debugger. Used in VS Code, VS, + more
MIT License
1.67k stars 283 forks source link

fix: allow hitting breakpoints early in webassembly #2102

Closed connor4312 closed 1 month ago

connor4312 commented 1 month ago

V8 doesn't give us instrumentation breakpoints for WASM, so take a primitive approach of overwriting WebAssembly compile/instantiate methods with one that includes a debugger; statement after they're done, and handle those as instrumentation.

Closes https://github.com/microsoft/vscode/issues/230875