[debugger] added setBreakpoint and clearBreakpoint to help message
authorFedor Indutny <fedor.indutny@gmail.com>
Wed, 14 Sep 2011 09:36:26 +0000 (16:36 +0700)
committerRyan Dahl <ry@tinyclouds.org>
Wed, 14 Sep 2011 17:17:17 +0000 (10:17 -0700)
group commands in help message, added shortcuts info

lib/_debugger.js

index 174c56b..0126310 100644 (file)
@@ -617,24 +617,31 @@ Client.prototype.fullTrace = function(cb) {
 
 
 var commands = [
-  'help',
-  'run',
-  'restart',
-  'cont',
-  'next',
-  'step',
-  'out',
-  'repl',
-  'backtrace',
-  'breakpoints',
-  'kill',
-  'list',
-  'scripts',
-  'version'
+  [
+    'run (r)',
+    'cont (c)',
+    'next (n)',
+    'step (s)',
+    'out (o)',
+    'backtrace (bt)',
+    'setBreakpoint (sb)',
+    'clearBreakpoint (cb)',
+  ],
+  [
+    'repl',
+    'restart',
+    'kill',
+    'list',
+    'scripts',
+    'breakpoints',
+    'version'
+  ]
 ];
 
 
-var helpMessage = 'Commands: ' + commands.join(', ');
+var helpMessage = 'Commands: ' + commands.map(function(group) {
+  return group.join(', ');
+}).join(',\n');
 
 
 function SourceUnderline(sourceText, position) {