You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
webSocketDebuggerUrl returned by v8_inspector in /json is invalid #7227
The webSocketDebuggerUrl returned by v8_inspector in /json HTTP endpoint is invalid, and causes 3rd party clients like VS Code and Sublime to fail connecting to the new CDP endpoint.
In addition then devtoolsFrontendUrl is served without the ?ws= querystring, which is returned by Chrome and Edge.
@pavelfeldman I'm digging into this right now. It seems like it isn't going to be straight forward afaict as SendTargentsListResponse and a variety of callbacks that call it are all static. At the moment I cannot find a way to get the port in the static function.
The call stack
SendTargentsListResponse (static) RespondToGet (static) Agent::OnInspectorHandshakeIO (static) Agent::OnSocketConnectionIO (static) (last place we have access to uv_stream_t* server) Agent::WorkerRunIO (first non static function in call stack, have access to port_)
Agent::OnSocketConnectionIO is passed to uv_listen so that is likely the end of the line here as to where we can do anything. I'm digging through the libuv docs right now but I'm not entirely sure if it is possible to get the port from uv_stream_t or not... I'm going to continue digging but would appreciate any help
edit: it is worth mentioning that the instance of uv_stream_t is a recast instance of uv_tcp_t
Activity
MylesBorins commentedon Jun 8, 2016
@nodejs/diagnostics
pavelfeldman commentedon Jun 8, 2016
Yes, it is a bug in inspector_agent.cc. Would you be able to send a PR?
MylesBorins commentedon Jun 8, 2016
@pavelfeldman would this be against the v8 repo? @auchenberg if you do not have time to do this I'd be more than happy to, just let me know
pavelfeldman commentedon Jun 8, 2016
@thealphanerd It is Node: https://github.com/nodejs/node/blob/master/src/inspector_agent.cc#L103
pavelfeldman commentedon Jun 8, 2016
It'd be nice if we could extract hash into a const and reuse it as well. I can see that entire block is wrong. Should be using same hash as https://github.com/nodejs/node/blob/master/src/inspector_agent.cc#L37
MylesBorins commentedon Jun 8, 2016
@pavelfeldman I'm digging into this right now. It seems like it isn't going to be straight forward afaict as
SendTargentsListResponseand a variety of callbacks that call it are all static. At the moment I cannot find a way to get the port in the static function.The call stack
SendTargentsListResponse(static)RespondToGet(static)Agent::OnInspectorHandshakeIO(static)Agent::OnSocketConnectionIO(static) (last place we have access to uv_stream_t* server)Agent::WorkerRunIO(first non static function in call stack, have access to port_)Agent::OnSocketConnectionIOis passed touv_listenso that is likely the end of the line here as to where we can do anything. I'm digging through the libuv docs right now but I'm not entirely sure if it is possible to get the port from uv_stream_t or not... I'm going to continue digging but would appreciate any helpedit: it is worth mentioning that the instance of
uv_stream_tis a recast instance ofuv_tcp_tpavelfeldman commentedon Jun 8, 2016
Look at how
Agent::OnRemoteDataIOunwraps Agent from stream:MylesBorins commentedon Jun 8, 2016
@pavelfeldman thanks! figured it out and pushed a PR
src: fix json payload from inspector
nojvek commentedon Jun 25, 2016
Not sure if someone's already fixed this. In the latest nightly this is the url I get.
webSocketDebuggerUrl: "ws://localhost:9999/node"