Uh oh!
There was an error while loading. Please reload this page.
debugger: bind to random port with --debug-port=0 - #5025
Conversation
ChALkeR
commented
Feb 1, 2016
This looks like a |
There was a problem hiding this comment.
It's the opposite of necessary, the return statement isn't necessary. :-)
There was a problem hiding this comment.
Duh :D In my defense I was Reviewing in mobile.
develar
commented
Feb 1, 2016
I think, new CLI parameter is not required. Old Also, debuggers use update: it seems, issue title is not correct — new logic is applied to all 3 flags and not bound only to |
develar
commented
Feb 1, 2016
We (JetBrains) like this solution. #4419 is too magic. Node is an engine. Strictly speaking, it should be handled on an application level. Node feature But as result, tools like AVA will be debuggable without any efforts from tool author. |
bnoordhuis
commented
Feb 1, 2016
It's not new, it's an existing command line switch.
Correct, but that doesn't fit in 50 columns. :-) |
thefourtheye
commented
Feb 1, 2016
LGTM |
1 similar comment
jasnell
commented
Feb 1, 2016
LGTM |
bnoordhuis
commented
Feb 1, 2016
There was a problem hiding this comment.
so could it be possible that an error was passed to the callback from listen and this.address().port is undefined? If so, that would cause an abort in debug-agent right? Should we guard for that?
There was a problem hiding this comment.
net.Server#listen() doesn't work that way, it emits an 'error' event when it can't bind to a port.
There was a problem hiding this comment.
Ah good point. I was incorrectly assuming that the connection listener would still be called, just with an error. Carry on
evanlucas
commented
Feb 2, 2016
LGTM |
bnoordhuis
commented
Feb 2, 2016
New CI attempt: https://ci.nodejs.org/job/node-test-pull-request/1504/ - previous one was hit by a network outage, it looks like. |
cjihrig
commented
Feb 2, 2016
LGTM |
bnoordhuis
commented
Feb 2, 2016
Grr, more RemotingSystemExceptions and IOExceptions. One more try: https://ci.nodejs.org/job/node-test-pull-request/1506/ |
bnoordhuis
commented
Feb 2, 2016
A seemingly genuine failure on one of the Windows buildbots: Exit code |
bnoordhuis
commented
Feb 4, 2016
I suspect the failure is unrelated and only exposed, not caused, by this change. Added another test to validate that. CI: https://ci.nodejs.org/job/node-test-pull-request/1543/ EDIT: To be clear, the second commit is not supposed to land as-is. |
bnoordhuis
commented
Feb 4, 2016
Interestingly, the new test passes on all platforms. The old test passes too except on win10+vs2015; win2012r2+vs2015 and win20082r2+vs2013 are fine. I'm inclined to scrap the previous test and go with the new one. |
3y3
commented
Feb 5, 2016
How we can receive information about debug port of each child from cluster master? |
bnoordhuis
commented
Feb 5, 2016
Can I get one more round of review? I worked over the test and added two more. The gist of the PR hasn't changed but I had to add some machinery to make testing reliable. |
bnoordhuis
commented
Feb 5, 2016
@3y3 Take a look at the cluster test I just added. If you start the master with |
There was a problem hiding this comment.
Yes, that would be more correct.
jasnell
commented
Mar 22, 2016
@bnoordhuis ... what's the status on this? |
bnoordhuis
left a comment
There was a problem hiding this comment.
Updated, @sam-github PTAL. CI: https://ci.nodejs.org/job/node-test-pull-request/8332/
Question: should the call to env->inspector_agent()->Start() call debug_options.set_port()?
sam-github
commented
May 27, 2017
I think the options should mirror what was set on the CLI (or the default), IMO., anything else is more confusing. When the listener is stopped and started the port will change. |
bnoordhuis
commented
May 28, 2017
@sam-github Can you (re)review? It's not clear to me if you were asking me to change anything. |
sam-github
commented
May 29, 2017
Ben:
Sam: |
Allow binding to a randomly assigned port number with `--inspect=0` or `--inspect-brk=0`. PR-URL: nodejs#5025 Refs: nodejs#4419 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
bjrmatos
commented
May 31, 2017
sorry to comment on a closed issue, just one question, is this change present in latest |
bnoordhuis
commented
May 31, 2017
I just replied to nodejs/help#649 but to answer your question, I expect it will be released in v8.1.0. |
bjrmatos
commented
May 31, 2017
thnks! |
* **Async Hooks** * When one `Promise` leads to the creation of a new `Promise`, the parent `Promise` will be identified as the trigger [[`135f4e6643`](nodejs@135f4e6643)] [nodejs#13367](nodejs#13367). * **Dependencies** * libuv has been updated to 1.12.0 [[`968596ec77`](nodejs@968596ec77)] [nodejs#13306](nodejs#13306). * npm has been updated to 5.0.3 [[`ffa7debd7a`](nodejs@ffa7debd7a)] [nodejs#13487](nodejs#13487). * **File system** * The `fs.exists()` function now works correctly with `util.promisify()` [[`6e0eccd7a1`](nodejs@6e0eccd7a1)] [nodejs#13316](nodejs#13316). * fs.Stats times are now also available as numbers [[`c756efb25a`](nodejs@c756efb25a)] [nodejs#13173](nodejs#13173). * **Inspector** * It is now possible to bind to a random port using `--inspect=0` [[`cc6ec2fb27`](nodejs@cc6ec2fb27)] [nodejs#5025](nodejs#5025). * **Zlib** * A regression in the Zlib module that made it impossible to properly subclasses `zlib.Deflate` and other Zlib classes has been fixed. [[`6aeb555cc4`](nodejs@6aeb555cc4)] [nodejs#13374](nodejs#13374).
* **Async Hooks** * When one `Promise` leads to the creation of a new `Promise`, the parent `Promise` will be identified as the trigger [[`135f4e6643`](135f4e6643)] [#13367](#13367). * **Dependencies** * libuv has been updated to 1.12.0 [[`968596ec77`](968596ec77)] [#13306](#13306). * npm has been updated to 5.0.3 [[`ffa7debd7a`](ffa7debd7a)] [#13487](#13487). * **File system** * The `fs.exists()` function now works correctly with `util.promisify()` [[`6e0eccd7a1`](6e0eccd7a1)] [#13316](#13316). * fs.Stats times are now also available as numbers [[`c756efb25a`](c756efb25a)] [#13173](#13173). * **Inspector** * It is now possible to bind to a random port using `--inspect=0` [[`cc6ec2fb27`](cc6ec2fb27)] [#5025](#5025). * **Zlib** * A regression in the Zlib module that made it impossible to properly subclasses `zlib.Deflate` and other Zlib classes has been fixed. [[`6aeb555cc4`](6aeb555cc4)] [#13374](#13374).
* **Async Hooks** * When one `Promise` leads to the creation of a new `Promise`, the parent `Promise` will be identified as the trigger [[`135f4e6643`](135f4e6643)] [#13367](#13367). * **Dependencies** * libuv has been updated to 1.12.0 [[`968596ec77`](968596ec77)] [#13306](#13306). * npm has been updated to 5.0.3 [[`ffa7debd7a`](ffa7debd7a)] [#13487](#13487). * **File system** * The `fs.exists()` function now works correctly with `util.promisify()` [[`6e0eccd7a1`](6e0eccd7a1)] [#13316](#13316). * fs.Stats times are now also available as numbers [[`c756efb25a`](c756efb25a)] [#13173](#13173). * **Inspector** * It is now possible to bind to a random port using `--inspect=0` [[`cc6ec2fb27`](cc6ec2fb27)] [#5025](#5025). * **Zlib** * A regression in the Zlib module that made it impossible to properly subclasses `zlib.Deflate` and other Zlib classes has been fixed. [[`6aeb555cc4`](6aeb555cc4)] [#13374](#13374).
gibfahn
commented
Jan 15, 2018
Release team decided not to backport to v6.x, as the inspector is substantially different in that version, let us know if you think it should be backported. |
james-rabbit
commented
Jul 3, 2018
Is this feature documented somewhere? I wasn't able to find much information about it. |
Allow binding to a randomly assigned port number with
--debug-port=0.Refs: #4419
R=@indutny