Stack trace from throw in debug console should hide everything below "eval"
See original GitHub issueIs your feature request related to a problem? Please describe.
When I do something in the debug console that throws, I get a huge massive error message, which I have to scroll all the way past to figure out what I did wrong (99% of the time, I’ve hit enter instead of tab when trying to auto-complete; that’s a different problem).
Describe the feature you’d like
The stack trace that is shown for errors that are thrown should drop anything past the eval, since that’s where the executed code is actually rooted from. Nothing below eval in the trace string is really controllable; that’s just where you are in the debug session.
Anything eval
and “above” is what should be kept, so you can see errors thrown from functions called from the console, like:
Issue Analytics
- State:
- Created a year ago
- Reactions:3
- Comments:10 (10 by maintainers)
Top Results From Across the Web
How can I get a JavaScript stack trace when I throw an ...
Save this answer. Show activity on this post. You can access the stack ( stacktrace in Opera) properties of an Error instance even...
Read more >A comprehensive guide to debugging Python scripts in VS Code
The basics · Variables Pane — here we can easily inspect the variables which are created while running the script. · Watch Pane...
Read more >The Most Diabolical Python Antipattern
You are throwing away the stack trace - a literally priceless body of information that can make the difference between troubleshooting a bug...
Read more >Error.prototype.stack - JavaScript - MDN Web Docs - Mozilla
The non-standard stack property of an Error instance offers a trace of which functions were called, in what order, from which line and...
Read more >Manage exceptions with the debugger in Visual Studio
In a Visual Basic application, the debugger manages all errors as exceptions, even if you use On Error-style error handlers. Tell the debugger...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have it working; will send something on Monday.
The code path I linked deals with the response from a REPL evaluation. However, yes, we need to know what frame in the stack was the expression. One way to do this would be to name the sources ahead of time by appending a
\n//# sourceURL=...
comment at the end prior to evaluation. We do that for internal scripts to avoid cluttering the Loaded Scripts view.