I am trying to debug an angular/typescript application in Visual Code. Let's say I run the following code
try {
...
} catch (error) {
console.log(error);
}
Assume an error occurs, I will see in my console the error being logged for a normal execution. The issue I face is that if I run the same situation in debug mode ("Launch Chrome against localhost"). I will get:
"Uncaught ReferenceError: error is not defined"
If I look at the 'Closure' section instead of the 'Local' section in the debug view. I have access to error_
which indeed contains what normally gets logged in a normal execution.
Is there a way to view the error as error
instead of error_1
in debug mode for angular/typescript application?
I tried a suggestion from Typescript/babel import causing "_1.default is not a function" without any success.