-
Notifications
You must be signed in to change notification settings - Fork 715
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
Can't debug code supplied to eval(). #171
Comments
@jsdevel: Could you please attach a (minimal) test-case that I can run myself to reproduce the problem? |
Absolutely! I'm able to reproduce with the following: In a directory, save the following to a file named
As a sibling in the same directory, save the following to a file named
Follow these steps:
The interesting part, is that the I did find something from the chrome dev tools documentation that seemed promising: This doesn't seem to be too helpful however, if the evalled code is created dynamically which is often the case. |
Wait, Freaking Ureeka!! Doing exactly that fixed the issue to some degree.
However, there are still issues. The evalled code does appear as a new script tab in the window, however, it's fairly sketchy and I can't step through it. |
Made a bit of progress, but seeing the following error in the window where I started node-inspector as soon as I get to the evalled code:
|
Hi @jsdevel, thank you for investigating the issue and describing a solution. I like the idea of using source maps to let V8 know what file you are debugging, it's very elegant. Still, you should be able to debug eval-ed code out of the box, even without source maps. In the screenshot below, you can see how my node-inspector looks like after stepping into In both cases (with and without sourceMap), the debugger and inspector remained very responsive, I didn't have to wait at all. What version of node are you running? Is there anything else in your setup/environment that could explain the difference? |
I'm reading in a file for a test framework, and at the top of one of my tests I have the
debugger;
keyword. Node inspector stops on theeval(code)
line, but stepping into the function fails to show the code being evaluated.The text was updated successfully, but these errors were encountered: