Skip to content
This repository has been archived by the owner on Feb 1, 2022. It is now read-only.

Commit

Permalink
feat: Add help command
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Krems committed Sep 8, 2016
1 parent 360580e commit b1b576e
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions lib/node-inspect.js
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,40 @@ function createCommandContext(inspector) {
}

const ctx = {
get help() {
const commands = [
[
'run (r)',
'cont (c)',
'next (n)',
'step (s)',
'out (o)',
'backtrace (bt)',
'setBreakpoint (sb)',
'clearBreakpoint (cb)',
],
[
'watch',
'unwatch',
'watchers',
'repl',
'exec',
'restart',
'kill',
'list',
'scripts',
'breakOnException',
'breakpoints',
'version',
],
];

const commandList = commands.map((group) => group.join(', ')).join(',\n');
const helpMessage = `Commands: ${commandList}`;

print(helpMessage);
},

debugEval(code) {
// Repl asked for scope variables
if (code === '.scope') {
Expand Down

0 comments on commit b1b576e

Please sign in to comment.