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

Unable to monitor http/https requests made by node #5341

Closed
harumando opened this issue Oct 2, 2016 · 11 comments
Closed

Unable to monitor http/https requests made by node #5341

harumando opened this issue Oct 2, 2016 · 11 comments

Comments

@harumando
Copy link

Hello,
When I make a request I don't see it in the developer tools. I can see the request only when it's made with jquery or native xmlhttprequest.

I've binded console.log on the 'end' event and I can see that node-webkit is actually doing the request and it's returning me a correct response. But doing these "blind requests" is very hard. May be i'm missing something? How can i debug native node http requests without console.log'ing them.
Thank you.

@gpetrov
Copy link

gpetrov commented Nov 7, 2016

I was actually wondering the same. Inspecting the background page where node runs, shows zero on the network traffic tab while a lot of node http/https requests are going on made by require('http") module

@rogerwang any chance on getting the node http traffic on the network tab there?

@rogerwang
Copy link
Member

It might be doable, but requires some effort since requests from Node don't go through Chromium's logic.

@gpetrov
Copy link

gpetrov commented Nov 7, 2016

@rogerwang actually it is already build in the latest NodeJS - so you can easily bind with the --inspect flag
See https://medium.com/@paul_irish/debugging-node-js-nightlies-with-chrome-devtools-7c4a1b95ae27#.x2ysytoqe

So it should be just a matter of activation ...

@rogerwang
Copy link
Member

The link describes JS debugging only. I don't think the network monitoring
feature is in there.

On Mon, Nov 7, 2016, 9:46 PM George Petrov notifications@github.com wrote:

@rogerwang https://github.com/rogerwang actually it is already build in
the latest NodeJS - so you can easily bind with the --inspect flag
See
https://medium.com/@paul_irish/debugging-node-js-nightlies-with-chrome-devtools-7c4a1b95ae27#.x2ysytoqe

So it should be just a matter of activation ...


You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub
#5341 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAKGGY_EGBmHOU-J_Y4HptvUYnW8zjohks5q7yvTgaJpZM4KMBTZ
.

@gpetrov
Copy link

gpetrov commented Nov 7, 2016

well other people have done it nicely in devtool: https://mattdesl.svbtle.com/debugging-nodejs-in-chrome-devtools

and also in node-inspector https://github.com/node-inspector/node-inspector

See also https://github.com/cyrus-and/chrome-remote-interface

It will be really neat to have the full debugging tools available in NWjs - it will make our lives really much more easier! Thanks for consideration @rogerwang !

@rogerwang
Copy link
Member

In the link you provided, network monitoring is done by using a xhr-request
module in application... Could you please make sure of it?

On Mon, Nov 7, 2016, 10:36 PM George Petrov notifications@github.com
wrote:

well other people have done it nicely in devtool:
https://mattdesl.svbtle.com/debugging-nodejs-in-chrome-devtools

and also in node-inspector
https://github.com/node-inspector/node-inspector

See also https://github.com/cyrus-and/chrome-remote-interface

It will be really neat to have the full debugging tools available in NWjs


You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub
#5341 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAKGGUFnFj0oHxlHNDpFq7VM6XoNwmEEks5q7zdbgaJpZM4KMBTZ
.

@gpetrov
Copy link

gpetrov commented Nov 7, 2016

Well the whole v8_inspector was landed in Node 6.3:

nodejs/node#6792

so check it and also:
https://chromium.googlesource.com/chromium/src/third_party/WebKit/Source/platform/v8_inspector

it should be all there

@rogerwang
Copy link
Member

The v8 inspector is used for inspecting V8 thus JS execution, nothing to do
with network monitoring.

Are you able to monitor traffic from http module in Node?

On Tue, Nov 8, 2016, 3:06 AM George Petrov notifications@github.com wrote:

Well the whole v8_inspector was landed in Node 6.3:

nodejs/node#6792 nodejs/node#6792

so check it and also:

https://chromium.googlesource.com/chromium/src/third_party/WebKit/Source/platform/v8_inspector

it should be all there


You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub
#5341 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAKGGUDKaEtYu03pDJMepxAmQEUrz0pLks5q73ZygaJpZM4KMBTZ
.

@gpetrov
Copy link

gpetrov commented Nov 7, 2016

My bad about the v8_inspector - will check for the http monitoring with it when using the --inspect command line in node.

But you should really check https://github.com/cyrus-and/chrome-remote-interface - it has the network monitoring in the very first sample...

@rogerwang
Copy link
Member

I came across that repo. It is just a API layer exposing devtools inside
Chromium. The feature you want has to be done in Node -- integrate http
module with devtools.

On Tue, Nov 8, 2016, 6:24 AM George Petrov notifications@github.com wrote:

My bad about the v8_inspector - will check for the http monitoring with it
when using the --inspect command line in node.

But you should really check
https://github.com/cyrus-and/chrome-remote-interface - it has the network
monitoring in the very first sample...


You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub
#5341 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAKGGagDfNG1WZwcZGwU5uUfL09_eKVJks5q76UngaJpZM4KMBTZ
.

@stale
Copy link

stale bot commented Aug 12, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Aug 12, 2018
@stale stale bot closed this as completed Aug 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants