Alex Andru (@QuantGeekDev)A
Denoβ€’2y agoβ€’
4 replies
Alex Andru (@QuantGeekDev)

How to debug tests in Deno on VSCODE

Hello everyone, I am trying to debug a unit test in Deno. I have tried using deno test --inspect-brk and I tried generating a launch.json with the deno extension for vscode. Here is my launch.json
{
  // Use IntelliSense to learn about possible attributes.
  // Hover to view descriptions of existing attributes.
  // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
  "version": "0.2.0",
  "configurations": [
    {
      "request": "launch",
      "name": "Debug tests",
      "autoAttachChildProcesses": true,
      "type": "node",
      "cwd": "${workspaceFolder}",
      "runtimeExecutable": "C:\\Users\\alex0\\.deno\\bin\\deno.EXE",
      "runtimeArgs": [
        "test",
        "--config",
        "./deno.jsonc",
        "--inspect-brk=127.0.0.1:9229",
        "--allow-all"
      ],
      "attachSimplePort": 9229
    }
  ]
}
image.png
Was this page helpful?