Skip to content

Instantly share code, notes, and snippets.

@teerasej
Last active February 27, 2021 13:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save teerasej/524266a57c911061a5845891342f2513 to your computer and use it in GitHub Desktop.
Save teerasej/524266a57c911061a5845891342f2513 to your computer and use it in GitHub Desktop.
VSCode's launch.json that can be used in debugging deno RESTful web api
{
"configurations": [
{
"type": "pwa-node",
"request": "launch",
"name": "Debug Deno",
"program": "index.ts",
"cwd": "${workspaceFolder}",
"runtimeExecutable": "deno",
"runtimeArgs": [
"run",
"--inspect-brk=127.0.0.1:3010",
"-A"
],
"attachSimplePort": 3010,
"outputCapture": "std"
}
]
}
@teerasej
Copy link
Author

teerasej commented Feb 27, 2021

There's some modifications before you use it in your workspace:

  1. program is the startup file for your project. For example: index.ts, app.ts, App.ts
  2. runtimeArgs, you can add or remove run argument here (The inspect-brk is a must-have)
  3. check the port in --inspect-brk and attachSimplePort has the same value
  4. outputCapture is required to output log into VSCode's debug console.

Thank you everyone from this issue denoland/vscode_deno#233

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment