Is there a way to make stacktraces work with sourc...
# javascript
k
Is there a way to make stacktraces work with source maps? I do get the line the error was thrown on originally in symbol-version, but the stacktraces show the js line numbers.
k
I don't know. For me this works. Can you provide additional information? Browser version, attach a small project that reproduces the issue? Did you try another browser?
k
I'll try to create a small project that reproduces this.
Firefox doesn't even show line numbers or stack traces at all.
k
Yes, I could reproduce the problem. However, there's a workaround: after I push F5 (keeping devtools open) the application re-runs, error get re-thrown and I can see proper stack trace.
^ @karelpeeters
Looks like it's a problem in Google Chrome. I could reproduce it with a plain JavaScript:
Copy code
function MyError() {
    this.name = "MyError";
    this.message = "!!!";
    Error.captureStackTrace(this, MyError);
}
MyError.prototype = Object.create(Error.prototype);
function foo() {
    bar();
}
function bar() {
    throw new MyError("!!!");
}
foo();
k
I see, I'll try that when I get the chance.
Hmm, the F5 trick doesn't appear to work for me, although somethings definitely changing. Before:

https://i.imgur.com/Jvwr9M7.png

, after:

https://i.imgur.com/cJOtv1O.png

.
Still only JS line numbers though.
k
You press wrong button
Did you see a small triangle to the left from "Uncaught" on the second picture?
k
Ah, you're right, thanks!
Is this something that should be reported to google?
k
I guess, yes