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
Iury O. G. Figueiredo edited this page Dec 30, 2019
·
2 revisions
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.
First steps
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>
Start with args
For starting with args just press:
<Key-2>
Enter the program arguments then hit enter.
Send a command
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.
Set a break point
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.
Send continue
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.
Evaluate selected text in the current context
Select the region to be sent to the debugger then hit:
<Key-p>
Check the output through syslog window with:
<Alt-q>
Evaluate expression
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>
Restart Debugger
Just hit in JAVASCRIPT mode:
<Key-r>
Then check the debugger output throgh syslog window.
Terminate the process
Hit:
<Key-Q>
in JAVASCRIPT mode. It will kill the debugger process.