You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when trying to debug a simple sample script in learnyounode, the learnyounode.js can be stepped through, but the sample script cannot be. according to the discussion below, this is a bug in learnyounode.
create sample script:-
var a = '2';
var b = '3';
debugger;
console.log(a + b);
save as debugme.js
launch debug from terminal
node --debug-brk /usr/local/lib/node_modules/learnyounode/learnyounode.js run debugme.js
hit debug button in eclipse
expected :- breakpoint is hit on the debugger; statement
actual :- can step through code in learnyounode.js, but then the debug session terminates before going in to the debugme.js but the output is printed to the terminal (not the console)
please fix as this will help with trickier scripts to figure out what is going on when they are running!
learnyounode is only just a nodejs script 😄
This message was deleted
dave00galloway 35 minutes ago
thanks for the reply .. so... how do i debug it? how do I pass the script that I want to debug (program.js) to learnyounode with the debug-brk argument?
(bash syntax)
npm root -g … will give you the path where global modules are stored
$(npm root -g)/learnyounode …… is the folder for the learnyounode code
node --debug /usr/local/lib/node_modules/learnyounode/learnyounode.js …. runs learnyounode in debug mode
node --debug /usr/local/lib/node_modules/learnyounode/learnyounode.js run 01.js … runs the 01.js script in debug mode
thanks again - getting closer but not quite there. the steps you describe take me into the learnyounode.js file and allow me to step through it. pretty cool, but at no point do I hit the breakpoint in program.js that I set just after variable declarations.
davids-MacBook-Pro:LearnYouNode dave$ node --debug-brk /usr/local/lib/node_modules/learnyounode/learnyounode.js run debugme.js
debugger listening on port 5858
23
davids-MacBook-Pro:LearnYouNode dave$ node /usr/local/lib/node_modules/learnyounode/learnyounode.js run debugme.js
23
so, the simple script you provided does get called, but I can only step through the learnyounode code, not the debugme.js code
any suggestions?
when trying to debug a simple sample script in learnyounode, the learnyounode.js can be stepped through, but the sample script cannot be. according to the discussion below, this is a bug in learnyounode.
steps to reproduce
https://github.com/joyent/node/wiki/using-eclipse-as-node-applications-debugger and http://www.nodeclipse.org/usage and http://sourceforge.net/projects/nodeclipse/files/Enide-Studio-2014/0.11-preview/Enide-Studio-2014-011-20140228-macosx-cocoa-x86_64.zip/download)
var a = '2';
var b = '3';
debugger;
console.log(a + b);
node --debug-brk /usr/local/lib/node_modules/learnyounode/learnyounode.js run debugme.js
expected :- breakpoint is hit on the debugger; statement
please fix as this will help with trickier scripts to figure out what is going on when they are running!
ref:- https://gitter.im/nodeschool/discussions
does anyone know how to debug learnyounode modules with nodeclipse?
@dave00galloway
@martinheidegger
@martinheidegger
@dave00galloway
@martinheidegger
@dave00galloway
@martinheidegger
@dave00galloway
@martinheidegger
@dave00galloway
@martinheidegger
@dave00galloway
@martinheidegger
The text was updated successfully, but these errors were encountered: