debug your Deno programs with VS Code — NOW WITH LESS FUCKERY!!!
Exactly 77 days, 7 hours, 7 minutes and 7 seconds ago, this website published a piece called debug your Deno programs with VS Code, delineating derptastic Deno debugging debauchery through which a person could debug their Deno program in VS Code's graphical debugger.
Happily, the shenanigans explained in that article are no longer required. The relevant bug was fixed in the Deno 1.0.0 release, and now it's easy-peasy:
With Deno 1.0.0 and later, all that is required to debug a Deno program in VS Code is to have a run configuration file like the one shown below. (Run configurations are normally located at ./.vscode/launch.json
inside your project's folder.)
{
"version": "0.2.0",
"configurations": [
{
"console": "integratedTerminal",
"name": "Debug Deno (Allow All)",
"type": "node",
"request": "launch",
"cwd": "${workspaceFolder}",
"runtimeExecutable": "deno",
"runtimeArgs": ["run", "--inspect-brk", "-A", "${file}"],
"port": 9229
}
]
}
With this configuration enabled, you can now set a breakpoint, hit F5, and you are off to the race conditions! 🏇🏻🐛
KEYWORDS: Deno, VS Code, debug, debugger, TypeScript, Black Lives Matter, #GOP