Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to debug Angular SPA in either vs2019 or vscode

This may be a stupid question, but I can't figure out how to debug my whole application in either vscode or vs2019 community. If I use vs2019, I can debug the api, controllers, etc just fine, but can't debug the typescript or js. If I use vscode, I can debug the typescript, but it doesn't make the calls to the api so the app locks up...

Any suggestions? I've tried the google extension in vscode but still can't debug the typescript code.

Thanks in advance.

like image 385
John Baird Avatar asked May 12 '19 00:05

John Baird


People also ask

How do I debug console in VS Code?

Launch configurations. To run or debug a simple app in VS Code, select Run and Debug on the Debug start view or press F5 and VS Code will try to run your currently active file.


1 Answers

You do it in the Chrome dev tools, hit F12 in Chrome and go to the sources tab. Hit ctrl-p to search for the source file. You can set break point in the TypeScript.

like image 95
Adrian Brand Avatar answered Oct 05 '22 06:10

Adrian Brand