#3 Debugging in TS
In typescript,
*Debugging is used to check if the code is working properly by going through the each line of code*
A breakpoint is a location in code where the execution is paused for debugging purposes.
A breakpoint is placed in VS code by clicking on the red dot left side of the lines of code.
We create a launch.json by clicking the debug option and new debug.
We modify the launch,json by adding a preLaunchTask to "tsc : build - tsconfig.json".
We go to the debug section and press F5 or click on launch icon.
We do the stepOver or F10 ko run the next line of code until the code is executed.
We can look for the real time results in variables or watch section by adding the variable to look for.
Comments
Post a Comment