question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Stack trace from throw in debug console should hide everything below "eval"

See original GitHub issue

Is 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:

image

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:3
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
jakebaileycommented, May 7, 2022

I have it working; will send something on Monday.

image

1reaction
connor4312commented, May 6, 2022

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found