-
Notifications
You must be signed in to change notification settings - Fork 54
Nodejs Debugger
The Nodejs Debugger plugin is meant to implement a basic integration with nodejs inspect debugger.
It allows setting breakpoints, removing breakpoints and watching the program flow through cursor jumps.
The interface is similar to the other vy debuggers although it is necessary to know about nodejs inspect commands.
Check out Nodejs inspect debugger for more info.
Once you're ready just pick up some nodejs files and open them with vy. Let us say:
vy file0.js file1.js file2.js
You will get three tabs, one for each file, consider file0.js contains the code to start the whole application thus switch the focus to the file0.js tab and put vy on JAVASCRIPT mode by pressing:
<Key-percent>
Once you're in javascript mode just start the debugging process by pressing:
<Key-1>
You can then check out the debugger outpupt through syslog window:
<Alt-q>
For starting with args just press:
<Key-2>
Enter the program arguments then hit enter.
The debugger supports many commands, you can set breakpoints, remove breakpoints etc in this way as well. For such just press:
<Key-m>
In javascript mode. It will allow you to enter a debugger command to be sent. Check the output through syslog window.
This is a shortcut to set breakpoints, just place the cursor over the desired line then hit:
<Key-b>
In JAVASCRIPT mode. Check whether it worked through syslog window.
This is another handy keystroke, just hit:
<Key-c>
In JAVASCRIPT mode. The debugger will probably jump to the next breakpoint and it will make the line being shaded.
Select the region to be sent to the debugger then hit:
<Key-p>
Check the output through syslog window with:
<Alt-q>
When the debugger hits a given breakpoint you might check the context/scope variables by evaluating expressions.
Just hit:
<Key-x>
Then enter your expression and check the result with:
<Alt-q>
Just hit in JAVASCRIPT mode:
<Key-r>
Then check the debugger output throgh syslog window.
Hit:
<Key-Q>
in JAVASCRIPT mode. It will kill the debugger process.