How to debug Deno applications in WebStorm

Viewed 398
2 Answers

WebStorm supports the V8 Inspector Protocol, so you're good:

  1. Go to "Debug Configurations" (Alt+Shift+9)
  2. Add a configuration ("+" on top left corner)
  3. Select "Attach to Node.js/Chrome"
  4. Make sure the "Chrome" option is selected (should be default)

enter image description here

  1. Click "Apply" and "Debug" to start the debugger

  2. Create your breakpoints

  3. With the debugger running, run your script with the --inspect-brk option:

deno run --inspect-brk -A app.ts

Now it will work as intended with the IDE. You can use the Debug view to step in, over, etc.

enter image description here

We should expect a plugin some time in the future.

From deno debugger:

Deno supports the V8 Inspector Protocol.

It's possible to debug Deno programs using Chrome Devtools or other clients that support the protocol (eg. VSCode).

You can run and debug files using Deno with the Deno plugin.

Related