Closed brucejo75 closed 7 years ago
Hi @weinand, @roblourens, any update on this? Thanks!
Meteor writes sourcemaps with fake meteor://
paths that the legacy node debugger has trouble resolving to files on disk. Your best shot is probably
"meteor://💻app/server/main.js"
(if this is possible)"protocol": "inspector"
which is able to deal with the special meteor pathsThanks @roblourens, any thoughts on why node-inspector
is able to handle the fake meteor://
paths?
I am writing an issue for the meteor folks and want to make sure I understand this.
Thanks!
Because it doesn't need to map the paths to files on disk, which is the hard part. It just takes them as is.
Got it! Thanks @roblourens!
Hi @roblourens Strange thing here....
If I open node-inspector (I mean http://localhost:8080/?port=5858 in Chrome) once, then I can put break points on vscode (I have VSCode connected to 5959 in legacy mode) and have it stop there and show debug infos, that is even after closing the node-inspector window completely.
I just need to open http://localhost:8080/debug once, let it load everything and the close it.
What do you think ?
Many thanks in advance
Sure, that could work. The app will be in debug mode even when node-inspector is detached. I'm not sure what you're asking.
Hi @roblourens
What I am saying is that if I just launch vscode and attach , no breakpoints work.
now if I just launch node-inspector once, let it load then close the window, I go back to VSCode and everything works. I can set breakpoints IN VSCode and I don't need to leave node-inspector open.
So basically I just need to launch node-inspector once at the start of the debugging session and close it immediately (I don't need to keep it open, nor I need to set breakpoints or anything in it))... Then I can work debugging in VSCode for as long as I want.
Previously I didn't need to launch node-inspector at all, it would work out of the box from VSCode.
Hope I am making myself clearer this time....
I see. Can you open a new issue for that? Sounds like it's not related to this one.
@teknologist did you make a new issue for this? I'm interested as well.
@matthova Haven't had the time. but I can confirm, I can only set breakpoints in Node inspector. As soon as I set them in NodeInspector , VSCode stops at the breakpoints and the debug IDE works fine. Breakpoints set in VSCode are plainly ignored.
Feel free to open an issue.
I connected with @weinand, on my stackoverflow posting. Adding issue as requested.
Steps to Reproduce:
launch.json
attach:NODE_OPTIONS
environment variableset NODE_OPTIONS=--debug=5838
meteor
Result:
Does not stop debugger at breakpoint set in my source file.
Other observations:
if I put a
debugger;
statement into the code\1001\
.if instead of attaching a VS Code debugger, I attach
node-inspector
everything works as I expect. After attachingnode-inspector
all of my set breakpoints hit. Nodebugger;
statements required.node-debug --debug-port=5838
node-inspector
hit as expected.I understand source maps in concept, but I do not understand the format of the file. But in the sources array, the references to my source files look like this
It looks a little odd to me... what is with this 💻 character?
7117 touches on this problem. But more research was not performed. Also, note that meteor now uses node v4.8 instead of node v0.10.43
Comments