Open ahuigo opened 2 years ago
+1 on this issue
$ deno --version
deno 1.30.1 (release, x86_64-pc-windows-msvc)
v8 10.9.194.5
typescript 4.9.4
Extension version: v3.17.0
Same setup and error, same observations where debugging works in chrome but fails in vscode
The same happen (in nvim) with another implementation https://github.com/mfussenegger/nvim-dap
Maybe the issue lies in https://github.com/microsoft/vscode-js-debug
Hey folks, sorry for a slow response. Do you still experience the same issue with latest Deno?
The same reproduction steps still produce the same error deno 1.35.1
Same error with with deno 1.33.4, here is an example: https://github.com/ahuigo/deno-debug-example.
Bad case reproduce step:
F5
, then there will be an error like error: Uncaught TypeError: WebAssembly.compile(): Argument 0 must be a buffer source
This is tested by:
kernel: 21.6.0
os: macOSX 12.6
cpu: Darwin 21.6.0 arm64 core(10) Apple M1 Pro
vscode: 1.76.2
deno 1.33.4
v8 11.4.183.2
typescript 5.0.4
deno extensions: denoland.vscode-deno@3.19.1
+1 for this on Deno 1.37.1 with the same steps to reproduce as people above.
I can easily reproduce this with the deno_graph
project. When I open up https://github.com/denoland/deno_graph/blob/main/js/test.ts in vs code and click "run" on the first test I get:
running 1 test from ./js/test.ts
createGraph() ... ok (101ms)
ok | 1 passed | 0 failed | 21 filtered out (107ms)
But when I click "debug" I get:
running 1 test from ./js/test.ts
createGraph() ... FAILED (15ms)
ERRORS
createGraph() => ./js/test.ts:19:6
error: TypeError: WebAssembly.compile(): Argument 0 must be a buffer source
at eventLoopTick (ext:core/01_core.js:182:7)
FAILURES
createGraph() => ./js/test.ts:19:6
FAILED | 0 passed | 1 failed | 21 filtered out (21ms)
This is annoying because I'm trying to use createGraph
in fresh, but whenever I try to step past this call, the debugger fails.
I am getting the same error trying to use:
export { transpile } from "https://deno.land/x/emit@0.37.0/mod.ts";
Deno 1.40.5 Deno extension v3.33.3
I thought i'd throw a work around out there while this awaits resolution. If possible, wrap the call throwing this error in its own Worker, this throws the WebAssembly out on a separate thread, and make the rest of the app debug-able.
Describe the bug Debug wasm within Vscode will throw this error:
When I debug it within chrome, it works well:
So, I guess that the deno plugin for vscode may have a bug.
To Reproduce Here is a bad case example : https://github.com/ahuigo/deno-debug-example.
Expected behavior Not throw any error. (When I debug it within chrome, it works well)
Versions I tried both deno 1.23.1 and deno 1.24.3, same error:
My environment