-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
node --inspect: dev tools console not working #9382
Comments
This is not a Node.js bug but a Chrome DevTools issue. |
@eugeneo Shall I post it at bugs.chromium.org ? |
Yes, please. Can you also try Node 7 - either nightly build or build from the sources? It uses newer devtools, the bug might not be reproducible there. |
Sure, I can try from the nightly build it in an hour and will post my results here. I'm a meagre front end developer so I might not be able to build it myself from the sources. |
@eugeneo Yep! The console is working fine in the But one original problem which was also there in the previous issue still remains which is that I need to replace For example the URL chrome-devtools://devtools/bundled/inspector.html?experiments=true&v8only=true&ws=localhost:9229/0bd7 Becomes chrome-devtools://devtools/bundled/inspector.html?experiments=true&v8only=true&ws=127.0.0.1:9229/0bd7 |
This sounds like something odd in Windows networking - so it has to be looked into. |
I tried digging around a bit more on this issue. I'm using this plugin called Inspect Process. It tries to read the debugger URL and launch debug tools in a new process (Source). I was expecting the console to work when I replaced The only way I could see this working is when I manually open Chrome and then paste the debug URL replacing I now feel maybe there is something wrong with my Windows itself or my copy of Chrome so today I will create a fresh Windows 7 VM and then try it inside the VM and report it here. |
@eugeneo tried it inside a new Windows VM
everything worked perfectly fine for the first time. And then from the second time onwards the same problem reflects, i.e using |
Looks like some Windows7 setups are not able to resolve localhost. This can either be addressed with changing the Windows setup or by using 127.0.0.1 as a host name. |
@eugeneo Thanks for pushing the Also, one last question about localhost not resolving on Windows 7 setups. Did you mean the resolution is setting up the line However localhost in the browser points to the webserver if it's running. |
@atif089 I have never being able to reproduce this problem as it seems like some pecularity with Windows7 setups and/or specific network environments. Some browsers might be using different resolution facilities so the results may differ ever so slightly. Right now I need to wait 48 hours before actually submitting this patch (there might be some issues that I have not thought about so I would like other Node contributors take a look). So it should be in by the Tuesday build. |
@eugeneo Weird part is that I use this plugin called I changed it's source to replace
The problem still exists. But if I manually open Google Chrome and then paste that link with 127.0.0.1, it works. Video -> https://www.youtube.com/watch?v=0mll_sCzSAI I posted this because maybe it might not work even after your last commit due to this problem. |
Quickly tested on a Windows 8 and Windows 10 VM. And it exists there too. I also see this error in console
|
Hi @eugeneo, I tried using Visual Studio Code's debugger last weekend and it seems to work without any problem. Does it work differently than the Chrome's debug tools? |
Probably they are not using "localhost" - just the IP address. On Mon, Nov 7, 2016 at 2:55 AM Mohammed Ameenuddin Atif <
|
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: 6.9.1 and 7.0
Platform: Windows 7 x64 (Chrome 54.0.2840.71 m)
Subsystem:
test.js
withconsole.log("Hello World");
node --inspect --debug-brk test.js
On the console tab, I don't see any input field. When I press escape and open the smaller console tab, I have suggest for input, but I can't execute code.
The latter works when I change the URL query param from
ws=localhost:9229/node
tows=127.0.0.1:9229/node
I made a small video to display the problem that I have been facing.
The text was updated successfully, but these errors were encountered: