Node.js debugger client and vim driver. Step-by-step debugging from vim.
npm install -g vimdebug
A debugger, agent and vim session will have to be launched. These can either all be started individually:
node --debug-brk yourprogram.js
vim -nb# or if you have vim already running, type `:nbs` in command mode
node-vim-inspector with a path to your script to do step 1&2 at once:
Or even give it the name of the window manager you're using for it to also launch a new vim session. Currently supported WMs are tmux and i3.
node-vim-inspector --windowmanager=tmux yourprogram.js# or:node --debug-brk yourprogram.jsnode-vim-inspector --windowmanager=tmux
The default configuration is as follows:
Any of these settings can be overridden either from the commondline, e.g.
.vimdebugrc json file selectively overriding properties or environment variables in the form of
.vimdebugrc can be placed either in the current working directory, any directory above the current or the current user's home directory. In case there are multiple they will override eachother in this order.
Settings for the vim-debug netbeans agent.
Port the agent uses to establish a connection.
Settings for the spawn debugger. Only relevant when the debugger spawn from the
node-vim-inspector client, e.e. it is called with the path of a NodeJS program to debug.
Port to spwan the debugger on.
Settings used by the vim client.
Key mappings inside vim to manipulate the debugger.
Add a breakpoint at current line and column.
Resume program execution until the next breakpoint is encountered, or the program terminates.
Move down one stack frame.
Step inside the current statement's execution.
Step to the next statement.
Step out of the current statement.
Move up one stack frame.