Is is it possible debug NODE REPL. node cmd bring the repl prompt >. within the prompt is it possible to start the debugger. say for eg
> hello = function(){
....debugger;
....console.log('hello');
}
>hello() --> should run in the debugger..
Is is it possible debug NODE REPL. node cmd bring the repl prompt >. within the prompt is it possible to start the debugger. say for eg
> hello = function(){
....debugger;
....console.log('hello');
}
>hello() --> should run in the debugger..
Copyright © 2021 Jogjafile Inc.
Yes
New way: node 8 >=
node --debugis marked for deprecation.node --inspectis the way moving forward.Old way
Start the repl with
node --debug. Then you can can usenode-inspector(an npm package) from a separate terminal, and debug in your browser with the chrome developer tools by openinghttp://localhost:8080/debug?port=5858in chrome. You can, for example, set a breakpoint in therepl.jsfile in thecompletefunction, and if you go to the node repl and hitTAB, it will trigger the breakpoint and you can debug it.If you want the coffee-script repl, it's
coffee --nodejs --debug.