Skip to content

Commit d21201d

Browse files
committed
📝 docs(CONTRIBUTING): introduce how to debug in vscode [no ci]
Signed-off-by: Haili Zhang <[email protected]>
1 parent c87aef7 commit d21201d

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

CONTRIBUTING.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,16 @@ All submissions, including submissions by project members, require review. We us
2020

2121
## Testing
2222

23+
### Debugging in VS Code
24+
25+
VS Code provides awesome Node.js debugging features, including the ability to automatically attach debugging to certain Node.js processes that have been launched from VS Code's Integrated Terminal.
26+
27+
Please refer this [guide](https://code.visualstudio.com/docs/nodejs/nodejs-debugging#_auto-attach) to toggle "Auto Attach" feature, and the default `smart` mode is already good enough for debugging our framework.
28+
29+
Once set up Auto Attach, you can create some breakpoints in your codes and run `npm t` in VS Code's Integrated Terminal to check whether the breakpoints work as expected.
30+
31+
> After enabling Auto Attach, you'll need to restart your terminal. This can be done by clicking the ⚠ icon in the top right of the terminal, or just creating a new one.
32+
2333
### Unit Tests
2434

2535
All pull requests should have an associated test to ensure foward compatibility.

0 commit comments

Comments
 (0)