Click here to Skip to main content
15,883,986 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

I am new to an angular 2 project. The project is using Web Api as services and the front end have been developed using Angular 2 (Typescript).

They are using Visual Studio Code editor for the front end. I can be able to run the application using nodejs command (gulp). But, I want to debug the code while the application is running.

For example:
we used to put breakpoint in the login function in c# and after running the application, on clicking the button, it used to hit the function automatically.
So, how to accomplish this in Visual studio code? I have set the breakpoints and after running the application using "Gulp" command, its not hitting the breakpoints.

Please help me out with this situation.

What I have tried:

I have put the breakpoints in visual studio code and ran the application using "Gulp" command, its not hitting the breakpoints
Posted
Comments
Richard MacCutchan 21-Dec-16 2:44am    
Visual Studio Code has limited debug facilities. you should check the help to see whether it is supported for you project.
Member 11072126 21-Dec-16 3:50am    
Ok. I was trying to understand the flow of login in my application. So, I put a breakpoint in Login button and ran the application using "Gulp" command in nodejs command prompt. the application ran and when I clicked the button, it didn't hit the login code.
Then, I stopped the application and clicked the "Debug" option, in Visual studio code editor. Nothing happened actually
Richard MacCutchan 21-Dec-16 4:57am    
Did you actually read my comment above?
F-ES Sitecore 21-Dec-16 4:09am    
You need to attach the debugger to the process that is housing your code. It's unclear from your question quite what that is, if it's the webapi you are trying to debug it will probably be in a process called w3wp.exe. Use "debug->attach to process" from Visual Studio.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900