Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make FireFox Put the @URL Part on Its Own Column #15

Closed

Conversation

aaron-human
Copy link

On Firefox 72.0.2, noticed that the URL part of the stack trace isn't lined up like in the README. So manually added some periods to space things out.

Here's an example of what I'm seeing:

Stack:

init/imports.wbg.__wbg_new_59cb74e423758ede@http://localhost:1234/rust.js:303:23
console_error_panic_hook::Error::new::h21c6f8c021401ca7@http://localhost:1234/rust.wasm:wasm-function[1312]:0x7004a
console_error_panic_hook::hook_impl::h51d369253f11867c@http://localhost:1234/rust.wasm:wasm-function[240]:0x49b09
console_error_panic_hook::hook::h7240c976685d8fda@http://localhost:1234/rust.wasm:wasm-function[1407]:0x7179f
core::ops::function::Fn::call::hd089ec940b4dcbbd@http://localhost:1234/rust.wasm:wasm-function[1318]:0x701f6
std::panicking::rust_panic_with_hook::h4e529e530989255b@http://localhost:1234/rust.wasm:wasm-function[372]:0x543e3
std::panicking::begin_panic::h1f5bf870a56b785e@http://localhost:1234/rust.wasm:wasm-function[512]:0x5b698
BugCraft::game::Game::update::h168b1700ce7fdc84@http://localhost:1234/rust.wasm:wasm-function[16]:0xcd4d
BugCraft::update::hc4c0739190f6c8fa@http://localhost:1234/rust.wasm:wasm-function[1315]:0x70131
update@http://localhost:1234/rust.wasm:wasm-function[1103]:0x6c350
_on_update@http://localhost:1234/typescript.js:341:28

Testing

Verified cargo test still passes, that this doesn't affect Chrome, and that Firefox now looks like:

Stack:

init/imports.wbg.__wbg_new_59cb74e423758ede ............. @http://localhost:1234/rust.js:303:23
console_error_panic_hook::Error::new::hbe0bf58356f924b2 . @http://localhost:1234/rust.wasm:wasm-function[1405]:0x781b7
console_error_panic_hook::hook_impl::ha653d0da3dbebdd3 .. @http://localhost:1234/rust.wasm:wasm-function[38]:0x24828
console_error_panic_hook::hook::h4e971616aff3a927 ....... @http://localhost:1234/rust.wasm:wasm-function[1510]:0x79b76
core::ops::function::Fn::call::h8f08f944b67fcc08 ........ @http://localhost:1234/rust.wasm:wasm-function[1411]:0x78363
std::panicking::rust_panic_with_hook::h4e529e530989255b . @http://localhost:1234/rust.wasm:wasm-function[407]:0x5a67b
std::panicking::begin_panic::h1f5bf870a56b785e .......... @http://localhost:1234/rust.wasm:wasm-function[561]:0x624d2
BugCraft::game::Game::update::h168b1700ce7fdc84 ......... @http://localhost:1234/rust.wasm:wasm-function[16]:0xcdc3
BugCraft::update::hc4c0739190f6c8fa ..................... @http://localhost:1234/rust.wasm:wasm-function[1408]:0x7829e
update .................................................. @http://localhost:1234/rust.wasm:wasm-function[1188]:0x74269
_on_update .............................................. @http://localhost:1234/typescript.js:341:28

Copy link
Member

@fitzgen fitzgen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the pull request. Unfortunately, I don't think this is worth the additional code size. Furthermore, the format of the string could change at any time, and this parsing and reformatting code would all break. I think it is best to preserve the browser's default stack/error formatting.

@fitzgen fitzgen closed this Feb 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants