when I console log something,
I was pretty sure I got file name and line number before.
but now I can only see main.js and a number like this:
Does anyone know how to change it back? Thanks.
CodePudding user response:
If you wish to see a stacktrace with your logs, use console.error() or console.warn() instead of console.log().
If you don't like the red or yellow color, you can use console.log(new Error().stack) instead.
CodePudding user response:
I geuss you are looking for sourcemaps: https://developer.chrome.com/docs/devtools/javascript/source-maps/ .

