Skip to content

Commit

Permalink
Update How to debug TypeScript in VS Code V2.md
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangguanghuib authored Nov 27, 2023
1 parent 8e3eb90 commit f102483
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions How to debug TypeScript in VS Code V2.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
<h1>This doc shows how to debug TypeScript in Visual Studio Code</h1>

Step 1: Download and Install NodeJS<br/>
Step 2: Create your TS file to debug:
Step 2: Create your TS file to debug:<br/>
<img width="414" alt="image" src="https://github.com/zhangguanghuib/acwing/assets/14832260/aa0254ad-18fb-4dc9-bd4d-a597da37ec5d">
Step 3 : Install Typescript debug extension:
<br/>
Step 3 : Install Typescript debug extension:<br/>
<img width="844" alt="image" src="https://github.com/zhangguanghuib/acwing/assets/14832260/c61373b4-5f5f-4e0e-98e5-9c9114885233">

Step 4: Add config file:
<img width="300" alt="image" src="https://github.com/zhangguanghuib/acwing/assets/14832260/4d606c3c-cb1e-4717-84e7-95703b2cf266">
<img width="570" alt="image" src="https://github.com/zhangguanghuib/acwing/assets/14832260/3be6d128-393c-4b7f-9a8b-f308f766fb1d">
Finally the config file is like:
<img width="880" alt="image" src="https://github.com/zhangguanghuib/acwing/assets/14832260/3277f4e1-b3e6-4455-a18e-964b0f4bf40d">
<br/>
Step 4: Add config file:<br/>
<img width="300" alt="image" src="https://github.com/zhangguanghuib/acwing/assets/14832260/4d606c3c-cb1e-4717-84e7-95703b2cf266"><br/>
<img width="570" alt="image" src="https://github.com/zhangguanghuib/acwing/assets/14832260/3be6d128-393c-4b7f-9a8b-f308f766fb1d"><br/>
Finally the config file is like:<br/>
<img width="880" alt="image" src="https://github.com/zhangguanghuib/acwing/assets/14832260/3277f4e1-b3e6-4455-a18e-964b0f4bf40d"><br/>

Step 5: Install<br/>
npm i ts-node typescript <br/>

Please notice here please don't add -g
<img width="801" alt="image" src="https://github.com/zhangguanghuib/acwing/assets/14832260/ae166169-e5fc-43ab-aa0c-39122aad2035">
Please notice here please don't add -g<br/>
<img width="801" alt="image" src="https://github.com/zhangguanghuib/acwing/assets/14832260/ae166169-e5fc-43ab-aa0c-39122aad2035"><br/>

Step 6: Click Run->Start debugging, see the breakpoint is hit:<br/>
<img width="645" alt="image" src="https://github.com/zhangguanghuib/acwing/assets/14832260/35608d9e-d435-4b04-9d14-43772af40dec">
Expand Down

0 comments on commit f102483

Please sign in to comment.