@@ -40,6 +40,32 @@ const SHORTCUTS = {
4040 run : 'r' ,
4141} ;
4242
43+ const HELP = `
44+ run, restart, r Run the application or reconnect
45+ kill Kill a running application or disconnect
46+
47+ cont, c Resume execution
48+ next, n Continue to next line in current file
49+ step, s Step into, potentially entering a function
50+ out, o Step out, leaving the current function
51+ backtrace, bt Print the current backtrace
52+ list Print the source around the line where execution is currently paused
53+
54+ setBreakpoint, sb Set a breakpoint
55+ clearBreakpoint, cb Clear a breakpoint
56+ breakpoints List all known breakpoints
57+
58+ watch(expr) Start watching the given expression
59+ unwatch(expr) Stop watching an expression
60+ watchers Print all watched expressions and their current values
61+
62+ exec(expr) Evaluate the expression and print the value
63+ repl Enter a debug repl that works like exec
64+
65+ scripts List application scripts that are currently loaded
66+ scripts(true) List all scripts (including node-internals)
67+ ` . trim ( ) ;
68+
4369function getRelativePath ( filename ) {
4470 const dir = `${ Path . resolve ( ) } /` ;
4571
@@ -629,6 +655,10 @@ function createRepl(inspector) {
629655
630656 function initializeContext ( context ) {
631657 copyOwnProperties ( context , {
658+ get help ( ) {
659+ print ( HELP ) ;
660+ } ,
661+
632662 get run ( ) {
633663 return inspector . run ( ) ;
634664 } ,
0 commit comments