Skip to content

Commit 5448689

Browse files
committed
vscode: add a Debug launch configuration
This repository has quite a few node.js scripts in it, and sometimes it is useful to debug them using a proper debugger, using single-stepping, break points, watch expressions, just like the one that comes with VS Code. So let's add a launch configuration that allows to do just that. By default, it starts the current file. That is not generally useful because these node.js scripts are meant to be included in the GitHub workflows and the function are expected to be called from `actions/github-script` steps. However, by appending something like this, debugging now gets a lot easier: ;(async () => { console.log('Hello world!') })().catch(e => { console.error(e) process.exit(1) }) Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 20d13d6 commit 5448689

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

.vscode/launch.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"type": "node",
9+
"name": "Run Current File",
10+
"request": "launch",
11+
"program": "${file}",
12+
"console": "integratedTerminal",
13+
}
14+
]
15+
}

0 commit comments

Comments
 (0)