branch: master
commit 9cf5e4d78690e4e9c4166b30aebcba900c8c10e6
Author: rocky <[email protected]>
Commit: rocky <[email protected]>
Add breakpoint set to nodejs
---
realgud/debugger/nodejs/init.el | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/realgud/debugger/nodejs/init.el b/realgud/debugger/nodejs/init.el
index 25c7e27..a988c36 100644
--- a/realgud/debugger/nodejs/init.el
+++ b/realgud/debugger/nodejs/init.el
@@ -64,11 +64,11 @@ realgud-loc-pat struct")
))
;; Regular expression that describes a "breakpoint set" line
-;; * 4 var count = 0;
-(setf (gethash "brkpt-set" realgud:nodejs-pat-hash)
- (make-realgud-loc-pat
- :regexp "^[*] \\([0-9]+\\) "
- :line-group 1))
+;;
+;; (setf (gethash "brkpt-set" realgud:nodejs-pat-hash)
+;; (make-realgud-loc-pat
+;; :regexp "^[*] \\([0-9]+\\) "
+;; :line-group 1))
;; Regular expression that describes a debugger "delete" (breakpoint) response.
;; For example:
@@ -139,10 +139,16 @@ realgud-loc-pat struct")
(setf (gethash "nodejs" realgud-command-hash realgud:nodejs-command-hash))
(setf (gethash "backtrace" realgud:nodejs-command-hash) "T")
+(setf (gethash "break" realgud:nodejs-command-hash)
+ "setBreakpoint(%l)")
(setf (gethash "continue" realgud:nodejs-command-hash) "cont")
(setf (gethash "quit" realgud:nodejs-command-hash) "quit")
(setf (gethash "finish" realgud:nodejs-command-hash) "out")
-(setf (gethash "shell" realgud:nodejs-command-hash) "repl")
+(setf (gethash "shell" realgud:nodejs-command-hash) "repl")
+
+;; We need aliases for step and next because the default would
+;; do step 1 and nodejs doesn't handle this. And if it did,
+;; it would probably look like step(1).
(setf (gethash "step" realgud:nodejs-command-hash) "step")
(setf (gethash "next" realgud:nodejs-command-hash) "next")