Skip to content
This repository has been archived by the owner on Sep 14, 2023. It is now read-only.

chore: add VSCode debugging configuration #212

Merged
merged 2 commits into from
Sep 12, 2022
Merged

Conversation

kratico
Copy link
Contributor

@kratico kratico commented Sep 9, 2022

Description

Configure VSCode launch.json for Deno scripts debugging

How Has This Been Tested?

  • add a breakpoint to a *.ts file, run the Debug current file and validate that the VSCode debugger stops at the breakpoint
  • add a breakpoint to a *.test.ts file, run the Debug current test file and validate that the VSCode debugger stops at the breakpoint

"name": "Debug current test file",
"program": "${file}",
"cwd": "${workspaceFolder}",
"attachSimplePort": 9229
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is not explicitly set, VSCode launches this task with the following arguments

/path/to/deno run --inspect-brk=127.0.0.1:53033 --allow-all ./the/current/file.ts

@harrysolovay
Copy link
Contributor

Just tried it & it works like a charm! No more of Chrome's clunky inspector.

Looks merge-ready. One question: is there a reason to leave those commented regions?

@kratico
Copy link
Contributor Author

kratico commented Sep 12, 2022

Looks merge-ready. One question: is there a reason to leave those commented regions?

I left the comments related to env variable setup for those users that do not want to add polkadot to their user PATH env var.

@kratico kratico force-pushed the chore/setup-vscode-debugging branch from f496c74 to 3fa14b1 Compare September 12, 2022 15:46
@kratico kratico merged commit b56fbc5 into main Sep 12, 2022
@kratico kratico deleted the chore/setup-vscode-debugging branch September 12, 2022 15:52
harrysolovay pushed a commit that referenced this pull request Oct 19, 2022
* chore: add VSCode debugging configuration

* chore: remove comments from VSCode launch.json
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants