-
-
Notifications
You must be signed in to change notification settings - Fork 31.5k
inspector: add ability to use a constant websocket url #13840
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
Comments
You can also keep |
@vsemozhetbyt I've tried that but the detection doesn't seem to work when using node within a docker(-compose) context, even when adding hosts. Accessing through the url works though. |
cc @nodejs/v8-inspector |
@ArnaudRinquin there are a number of Chrome extensions that were made to mitigate this problem. They even support automatic reconnection. Do any of them work for you? Related issue: #9185 |
@cjihrig I've tried NIM without success. According to the websocket address, It tried to connect to the docker-machine without success. |
Ping @paulirish for the devtools issue of not showing up. |
A good night of sleep (actually it was a bod one) made me realise the potential cause of the issue: in our docker-compose environment we use nginx as a reverse proxy and I initially proxied the inspector websocket as well. Disabling the websocket proxy route and directly exposing the nodejs machine 9229 port fixed the issue and I can now find my instance in |
Using node
8.x.x
gives the ability use the Chrome DevTools and that's a great help.One thing that make the developer experience a bit less pleasant is the random bit of the web socket url because it forces this workflow:
chrome-devtools://devtools/bundled/inspector.html?experiments=true&v8only=true&ws=127.0.0.1:9229/dc9010dd-f8b8-4ac5-a510-c1a114ec7d29
)Step 2. and 3. are very tedious, especially when your app spits logs at startup. If the url was always the same, a simple refresh of the debug tab would be enough.
I understand there might be reasons for the url to be random (security?) but that'd be really nice to have the ability to make it constant.
I know a workaround would be to use
inspector.url()
to grab the url and open it programatically but Chrome does not allow that. As stated in this issue, it seems impossible to open Chrome Devtools in anyway other than copy-pasting the url in the bar.The text was updated successfully, but these errors were encountered: