Skip to content
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

src: fix json payload from inspector #7232

Merged
merged 1 commit into from
Jun 9, 2016

Conversation

MylesBorins
Copy link
Contributor

Checklist
  • make -j4 test (UNIX) or vcbuild test nosign (Windows) passes
  • the commit message follows commit guidelines
Affected core subsystem(s)

src

Description of change

Fix the webSocketDebuggerUrl and devtoolsFrontendUrl returned by
v8_inspector in /json HTTP endpoint to work with 3rd party clients.

Fixes: #7227

@nodejs-github-bot nodejs-github-bot added the c++ Issues and PRs that require attention from people who are familiar with C++. label Jun 8, 2016
@MylesBorins
Copy link
Contributor Author

MylesBorins commented Jun 8, 2016

ci: https://ci.nodejs.org/job/node-test-pull-request/2962/

/cc @nodejs/diagnostics @auchenberg @ofrobots

edit: ci failed due to linting error... new lint run https://ci.nodejs.org/job/node-test-linter/2880/

@MylesBorins MylesBorins added the inspector Issues and PRs related to the V8 inspector protocol label Jun 8, 2016
" \"faviconUrl\": \"https://nodejs.org/static/favicon.ico\","
" \"id\": \"%d\","
" \"title\": \"%s\","
" \"type\": \"node\","
" \"webSocketDebuggerUrl\": \"ws://%s\""
" \"webSocketDebuggerUrl\": \"ws://localhost:%d%s\""
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not 100% that this should be localhost... it should potentially be the ip associated with the addr incase there is remote debugging going on. Open to modifying this but wanted to check first

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice one!

Indeed, it would be nice to get rid of the hard coded localhost and use the
value from addr()

I'm not sure if it's binding to 0.0.0.0 or the local IP (enables remoting
over the network?)

On Wed, Jun 8, 2016 at 1:16 PM Myles Borins [email protected]
wrote:

In src/inspector_agent.cc
#7232 (comment):

   "  \"faviconUrl\": \"https://nodejs.org/static/favicon.ico\","
   "  \"id\": \"%d\","
   "  \"title\": \"%s\","
   "  \"type\": \"node\","
  •  "  \"webSocketDebuggerUrl\": \"ws://%s\""
    
  •  "  \"webSocketDebuggerUrl\": \"ws://localhost:%d%s\""
    

I'm not 100% that this should be localhost... it should potentially be the
ip associated with the addr incase there is remote debugging going on. Open
to modifying this but wanted to check first


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/nodejs/node/pull/7232/files/aca56db0c4691b6080290792ec8318c04dcb6347#r66331013,
or mute the thread
https://github.com/notifications/unsubscribe/AAKl9ySsaar49QaCCK7P28BUgi8ZlXSJks5qJyMlgaJpZM4IxWgR
.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd leave it as a localhost for now.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@auchenberg I'll dig into this some more and maybe make a different PR that builds on this one.

@pavelfeldman
Copy link
Contributor

PR lgtm as far as v8_inspector is concerned.

@cjihrig
Copy link
Contributor

cjihrig commented Jun 8, 2016

LGTM with the v8_inspector part signed off.

@ofrobots
Copy link
Contributor

ofrobots commented Jun 8, 2016

LGTM. Thanks for fixing this!

Fix the `webSocketDebuggerUrl` and `devtoolsFrontendUrl` returned by
v8_inspector in /json HTTP endpoint to work with 3rd party clients.

Fixes: nodejs#7227
PR-URL: nodejs#7232
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Ali Ijaz Sheikh <[email protected]>
@MylesBorins MylesBorins merged commit 853b845 into nodejs:master Jun 9, 2016
@MylesBorins
Copy link
Contributor Author

landed in 853b845

@MylesBorins MylesBorins deleted the fix-inspector-json branch June 13, 2016 18:05
@MylesBorins MylesBorins added this to the 7.0.0 milestone Jun 14, 2016
@MylesBorins MylesBorins removed their assignment Jun 14, 2016
Fishrock123 pushed a commit that referenced this pull request Jul 5, 2016
Fix the `webSocketDebuggerUrl` and `devtoolsFrontendUrl` returned by
v8_inspector in /json HTTP endpoint to work with 3rd party clients.

Fixes: #7227
PR-URL: #7232
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Ali Ijaz Sheikh <[email protected]>
@Fishrock123 Fishrock123 mentioned this pull request Jul 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ Issues and PRs that require attention from people who are familiar with C++. inspector Issues and PRs related to the V8 inspector protocol
Projects
None yet
Development

Successfully merging this pull request may close these issues.

webSocketDebuggerUrl returned by v8_inspector in /json is invalid
7 participants