Uh oh!
There was an error while loading. Please reload this page.
loader: fix --inspect-brk - #18949
Conversation
devsnek
commented
Feb 23, 2018
targos
commented
Feb 23, 2018
Could you add a test? |
side question to anyone who can answer, why can't we just do something like voidPauseOnStart(const FunctionCallbackInfo<v8::Value>& args) {
Environment* env = Environment::GetCurrent(args);
env->inspector_agent()->PauseOnNextJavascriptStatement("Break on start");
}if(this.inspectBrk)process.binding('inspector').pauseOnStart();this.module.instantiate(); |
edit: i found test-inspector-esm.js 👍 |
TimothyGu
commented
Feb 23, 2018
@devsnek Because that would break on |
There was a problem hiding this comment.
Looks good - I just copied the approach from #17360 exactly when doing this initially to get this feature moving. Edit: ah, I see I tried to move the wrapper to avoid an instance property which was the issue here!
I did experiment wrapping the break on the execution function itself to no success, this only seems to be working when wrapping instantiate specifically. If there's a way to get a pauseOnStart going there'd be no reason not to though surely.
eugeneo
commented
Feb 23, 2018
We can't do it because next JS instruction will be before calling the function. I.e. instead of breaking inside the function (that is a user code) we will arrive to a function callsite, which is framework code. That will confuse the users a lot. |
i've been messing around with the tests but i just can't figure out this inspector stuff :( basically the test just needs to be modified to import one other module to ensure nothing is called out of band. i tried to make these changes but i started getting assertion errors from the test inspector wrapper about urls |
guybedford
commented
Feb 25, 2018
@devsnek could you share where exactly the test is giving you issues? It should just be adding another case https://github.com/nodejs/node/blob/master/test/parallel/test-inspector-esm.js#L107, or modifying that existing case to have a dependency right? |
@guybedford i did that earlier but but it keeps giving me an assertion error here: https://github.com/nodejs/node/blob/master/test/common/inspector-helper.js#L248 and i still really don't understand all this stuff but i've been slowly making my way through the devtools docs |
guybedford
commented
Feb 26, 2018
@devsnek what are the expected and actual values in that case that are failing? If it's pathing issues that may be a test bug. |
@guybedford i added uh constdepUrl=UrlResolve(session.scriptURL(),'message.mjs');session.waitForBreakOnLine(0,depUrl);which throws an assertion error for i also changed |
guybedford
commented
Feb 26, 2018
@devsnek does the |
devsnek
commented
Feb 26, 2018
@guybedford i have no idea which module.js it refers to, but yea these changes work perfectly |
0741fcd to
8e6594aCompare8e6594a to
19a0eadComparedevsnek
commented
Mar 1, 2018
@guybedford it seems the test i made is working now, i'm running a full test run on my laptop then i'll spin up a ci and if that passes hopefully land this 🙏 |
devsnek
commented
Mar 1, 2018
@addaleax if i land this tonight or tomorrow we can still squeeze it into 9.7.0 right? |
devsnek
commented
Mar 1, 2018
devsnek
commented
Mar 1, 2018
cc @nodejs/build |
addaleax
commented
Mar 1, 2018
@devsnek Sorry, I wasn’t around when you posted that comment – if you think something is important enough to let a release wait for it, commenting in the release proposal might be best… Then again, I’d be happy to also prepare another 9.x release next week. |
devsnek
commented
Mar 1, 2018
landed in abd0d79 |
PR-URL: nodejs#18949Fixes: nodejs#18948 Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Notable Changes: * crypto: - add cert.fingerprint256 as SHA256 fingerprint (Hannes Magnusson) #17690 * lib: - v8_prof_processor works again 🎉 (Anna Henningsen) #19059 * loader: - --inspect-brk now works properly for esmodules (Gus Caplan) #18949 * src: - handle exceptions in env-\>SetImmediates (James M Snell) #18297 - make process.dlopen() load well-known symbol (Ben Noordhuis) #18934 * trace_events: - add file pattern cli option (Andreas Madsen) #18480 PR-URL: #19181
Notable Changes: * crypto: - add cert.fingerprint256 as SHA256 fingerprint (Hannes Magnusson) #17690 * lib: - v8_prof_processor works again 🎉 (Anna Henningsen) #19059 * loader: - --inspect-brk now works properly for esmodules (Gus Caplan) #18949 * src: - handle exceptions in env-\>SetImmediates (James M Snell) #18297 - make process.dlopen() load well-known symbol (Ben Noordhuis) #18934 * trace_events: - add file pattern cli option (Andreas Madsen) #18480 PR-URL: #19181
Notable Changes: * crypto: - add cert.fingerprint256 as SHA256 fingerprint (Hannes Magnusson) #17690 * http2: - Fixed issues with aborted connections in the HTTP/2 implementation (Anna Henningsen) #18987#19002 * loader: - --inspect-brk now works properly for esmodules (Gus Caplan) #18949 * src: - make process.dlopen() load well-known symbol (Ben Noordhuis) #18934 * trace_events: - add file pattern cli option (Andreas Madsen) #18480 * Added new collaborators: - Chen Gang (MoonBall) https://github.com/MoonBall PR-URL: #19181
Notable Changes: * crypto: - add cert.fingerprint256 as SHA256 fingerprint (Hannes Magnusson) #17690 * http2: - Fixed issues with aborted connections in the HTTP/2 implementation (Anna Henningsen) #18987#19002 * loader: - --inspect-brk now works properly for esmodules (Gus Caplan) #18949 * src: - make process.dlopen() load well-known symbol (Ben Noordhuis) #18934 * trace_events: - add file pattern cli option (Andreas Madsen) #18480 * Added new collaborators: - Chen Gang (MoonBall) https://github.com/MoonBall PR-URL: #19181
PR-URL: nodejs#18949Fixes: nodejs#18948 Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Notable Changes: * crypto: - add cert.fingerprint256 as SHA256 fingerprint (Hannes Magnusson) nodejs#17690 * http2: - Fixed issues with aborted connections in the HTTP/2 implementation (Anna Henningsen) nodejs#18987nodejs#19002 * loader: - --inspect-brk now works properly for esmodules (Gus Caplan) nodejs#18949 * src: - make process.dlopen() load well-known symbol (Ben Noordhuis) nodejs#18934 * trace_events: - add file pattern cli option (Andreas Madsen) nodejs#18480 * Added new collaborators: - Chen Gang (MoonBall) https://github.com/MoonBall PR-URL: nodejs#19181
jasnell
commented
Aug 17, 2018
Should this be backported to 8.x? |
Fixes: #18948
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
loader