-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
V8 Inspector ignores/squelches evaluation in console panel #9188
Comments
/cc @nodejs/v8-inspector |
To evaluate something in console we use Runtime.evaluate protocol command. We have two different strategy to run command:
I'm not sure how we run commands in Node.js, I think that @eugeneo knows everything about it. V8 interrupt allows us to run code even in most kind of nested loop but this technique doesn't solve all the problems because V8 able to call interrupt callback only at the moment of function call and I hope in some special places like assignment in for-loop. If you have infinite loop without functions calls (or with inlined by optimizer function calls) and without any assignments then interrupt callback will never be called and V8 inspector will never get a chance to run protocol command. |
I haven't been able to reproduce this issue - I wonder if it is Windows-specific. I will need to add a test case and see if it is intermittent or platform dependent. |
@ak239 , I am able to reproduce this even without an infinite loop:
and then, After attaching, I have tried sending code via the console as well, as by setting a breakpoint inside the request handler, opening the page, and breaking on that line, then trying to evaluate things like I also tried modifying the code to As for OS, I'm on Windows 10 Home Edition, 64 bit, build 14393.321 |
Looks like the issue is Windows specific. Here's what I'm seeing:
Following object was printed in the console: "ServerResponse {domain: null, _events: EventHandlers, _eventsCount: 1, _maxListeners: undefined, output: Array[0]…}" |
Update: I am also able to reproduce the issue if I run |
Does it work if you replace "localhost" in the URL with the "127.0.0.1"? |
Looks like it works: Set a breakpoint @ |
It looks like this is a duplicate of #9382 |
There are multiple reports of Windows7 not being able to resolve localhost on some setups (web search also confirms that). This change will advertise "127.0.0.1" as inspector host name. Fixes: #9382 Fixes: #9188 PR-URL: #9451 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
There are multiple reports of Windows7 not being able to resolve localhost on some setups (web search also confirms that). This change will advertise "127.0.0.1" as inspector host name. Fixes: #9382 Fixes: #9188 PR-URL: #9451 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Version: v6.9.0
Platform: Windows 10 64bit Home (Running node in Git Bash MINGW64_NT-10.0 Alex 2.6.0(0.304/5/3) 2016-09-09 09:46 x86_64 Msys)
Subsystem: V8 Inspector
Chrome version: Version 53.0.2785.143 m
Issue: Can't evaluate expressions in inspector's console.
Reproduce:
node --inspect -e "var q = { foo: 'bar'}; while(1);"
After opening the inspector window, I type
q
into the console panel, expecting to see{foo: "bar"}
as the evaluation result, but instead see nothing. My own input is also cleared away, as if I had never typed it at all. I also triedprocess
andmodule
to the same effect.The text was updated successfully, but these errors were encountered: