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

console.error(error.stack) does not display clickable stack traces. #811

Closed
probablycorey opened this issue Nov 11, 2014 · 3 comments
Closed

Comments

@probablycorey
Copy link

In Chrome, calling console.error(error.stack) results in a clickable calls in the stack trace. In atom-shell the stack trace isn't clickable if the error is caught and displayed this way.

http://cl.ly/image/2K2b1a3A260u/Image%202014-11-11%20at%201.14.41%20PM.png

The code that generated this behavior can be found at https://github.com/probablycorey/atom-shell/compare/stack-bug

zcbenz added a commit to electron/node that referenced this issue Nov 14, 2014
This makes it easy to browser the files in devtools, see electron/electron#811.
zcbenz added a commit that referenced this issue Nov 14, 2014
@zcbenz
Copy link
Member

zcbenz commented Nov 14, 2014

Fixed with atom/node@8c26bda.

@zcbenz zcbenz closed this as completed Nov 14, 2014
@zcbenz
Copy link
Member

zcbenz commented Nov 14, 2014

Implementing this requires setting the internal representing filename to file://blabla, which is fine for most cases since it is only used when displaying the line of error or listing the scripts in the page.

However this causes troubles when throwing an exception from .coffee file, because CoffeeScript is very smart to translate the filenames in stack trace from .js to .coffee, and it can not recognize file://blabla, so one it met one it would throw exceptions.

We can work around this by either patching CoffeeScript or making necessary node APIs recognize file://blabla, but it is too much for such a simple feature, so I'm reverting the fix and marking this as won't fix.

@basarat
Copy link

basarat commented Apr 17, 2015

Just putting it out there. I would have liked this 🌹 Doesn't mean it has to be done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants