Skip to content

mamaz/typescript-breakpoint-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Add Breakpoint To Your Typescript

This example will show you how to activate breakpoint in .ts file.

Adding breakpoint is crucial for debugging your program.

Basics

You need to add and configure launch.json and tasks.json.

launch.json needs to be set so that debugger can read the source maps. It needs to have sourceMaps field to be set to true.

tasks.json needs to be set to run tsc before the debugger is running.

How to Run The Example

  1. Clone this repo.

  2. Install typescript: npm install -g typescript.

  3. Go to Debug section on the VSCode (Shift+Cmd D).

  4. Add breakpoint in src/index.ts.

  5. Run the Debug Typescript in Node.js config.

  6. See breakpoint in action.

Reference

Kudos to jyuhuan for the nice example.

License

MIT License.

About

Example Adding Breakpoint Feature on VSCode

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published