Chrome – Debug Angular/Typescript – how to navigate to ts file

Angular uses webpack and all type script files are listed under it. To select your target typescript file, Chrome’s Developer tool (F12). Go to Source tab, Select Chrome “webpack://”->”src/app” -> your typescript file. Or in older version of chrome follow this path “webpack://”->”.”->”src/app” -> your typescript file ( See the image file). Or Ctrl+P to … Read more

Visual Studio Code debugger with Chrome refused to connect to localhost

If anyone else is having this issue, I solved it by: 1)installing the ritwickdey/vscode-live-server available here: vscode-live-server link 2) restarting vscode 3) clicking the Go Live button at the bottom of the screen 4) getting the server address from the resulting Chrome window (ex: http://localhost:5500/) 5) changing the .vscode/launch.json file to include that server address: … Read more

Variable does not exist in the current context while debugging

It’s possible the local variables have been optimised away by the JIT compiler. Since you’re using Visual Studio you might be able to switch the configuration to Debug and rebuild. If not, you can configure the JIT compiler to disable optimisations and generate tracking information – see here on how to set the configuration. This … Read more