Summary
If I try to debug an angular app with Visual Studio Code after I have logged in, logged out and then logged in again, error messages are displayed or the debugger stops in the wrong places. This is annoying if you want to debug the application several times to see what happens after the user logs in. In our main project, this also happens with a functioning postLogoutRedirectUri.
Repo to reproduce: https://github.com/MatthewJer/TestBreakPointsAfterCallback
Steps to reproduce
- Run the App via ng serve or start or use vs code launch task
- Click the login button
- Login with username bob und password bob
- Click the logout button.
- Navigate back to http://localhast:4200/
- Login again.
- Set a breakpoint in the logout method (app.component.ts line 37)
- Click the logout button.
Result
The Debugger stopps somewhere in the node_modules or alternatively you get the error message “Could not load source ‘localhost꞉4200/main.js’: Source not found.”.
Environment
Node v20.16.0, Chrome 127.0.6533.120, Angular 18.2.0
What I expect
I expect the debugger to continue to work properly or a tip on how to get it to work properly again.
user3360631 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.