When trying to debug an Ionic Angular application in an older version of Visual Studio Code, this error shows up.
Follow the checklist
- Use a Visual Studio Code version that supports debugging, if your code is too old newer versions will stop working.
- Make sure the Chrome Debugger extension is installed and enabled, if it’s greyed out in the Extension list, uninstall and reinstall it.
- Do the same thing for Cordova Tools extension, if you can’t find it, use an even older version of VSC.
- The safest bet is to use the version used to develop the app.
The best way is to update your code base to newer versions of languages, frameworks and libraries so you can use newer tools to debug the application. Otherwise this is a workaround.