[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/realgud 4c66076 072/140: Start nodejs -> node debug ren
From: |
Rocky Bernstein |
Subject: |
[elpa] externals/realgud 4c66076 072/140: Start nodejs -> node debug rename... |
Date: |
Sat, 25 May 2019 19:35:35 -0400 (EDT) |
branch: externals/realgud
commit 4c66076312b1f96b3d9dcf93ca27af41eaf36f44
Author: rocky <address@hidden>
Commit: rocky <address@hidden>
Start nodejs -> node debug rename...
node inspect: add "eval", fix "backtrace"
and remove up/down/frame
---
realgud.el | 16 ++++++++++++----
realgud/debugger/nodejs/core.el | 2 +-
realgud/debugger/nodejs/init.el | 30 ++++++++++++++++++++++++------
realgud/debugger/nodejs/nodejs.el | 11 ++++++++---
test/test-send.el | 7 ++++++-
5 files changed, 51 insertions(+), 15 deletions(-)
diff --git a/realgud.el b/realgud.el
index ff0e9cd..c9a5848 100644
--- a/realgud.el
+++ b/realgud.el
@@ -36,7 +36,7 @@
;; Once upon a time in an Emacs far far away and a programming-style
;; deservedly banished, there was a monolithic Cathederal-like
;; debugger front-end called gud. This interfaced with a number of
-;; debuggers, many now dead. Is there anyone still alive that
+;; debuggers, many now dead.[1] Is there anyone still alive that
;; remembers sdb from UNIX/32V circa 1980?
;;
;; This isn't that. Here we make use of more modern programming
@@ -49,13 +49,15 @@
;; Oh, and because global variables are largely banned, we can support
;; several simultaneous debug sessions.
-;; If you don't see your favorite debugger, see URL
+;; RealGUD supports many external debuggers. See URL
+;; `https://github.com/realgud/realgud/wiki/Debuggers-Supported' for a
+;; list. However, if you don't see your favorite debugger, see URL
;; `https://github.com/realgud/realgud/wiki/How-to-add-a-new-debugger/'
;; for how you can add your own.
;; The debugger is run out of a comint process buffer, or you can use
-;; a `realgud-track-mode' inside an existing comint shell, shell, or
-;; eshell buffer.
+;; a `realgud-track-mode' inside an existing comint shell, or eshell
+;; buffer.
;; To install you will need a couple of other Emacs packages
;; installed. If you install via melpa (`package-install') or
@@ -64,6 +66,12 @@
;; `https://github.com/realgud/realgud/wiki/How-to-Install' for all
;; the ways to to install and more details on installation.
+;; [1] Four or more years in, as of 2018 realgud sports a number of
+;; old debuggers too. However we *mark* them as such, and move them
+;; out of the main code base. See for example:
+;; https://github.com/realgud/realgud-old-debuggers. So that's
+;; another difference: this code better *maintained*.
+
;;; Code:
;; Press C-x C-e at the end of the next line configure the program in
diff --git a/realgud/debugger/nodejs/core.el b/realgud/debugger/nodejs/core.el
index f27b4ed..c60af97 100644
--- a/realgud/debugger/nodejs/core.el
+++ b/realgud/debugger/nodejs/core.el
@@ -126,7 +126,7 @@ Note that path elements have been expanded via
`expand-file-name'.
(defun realgud:nodejs-suggest-invocation (debugger-name)
"Suggest a nodejs command invocation via `realgud-suggest-invocaton'"
- (realgud-suggest-invocation (or debugger-name realgud:nodejs-command-name)
+ (realgud-suggest-invocation realgud:nodejs-command-name
realgud:nodejs-minibuffer-history
"js" "\\.js$"))
diff --git a/realgud/debugger/nodejs/init.el b/realgud/debugger/nodejs/init.el
index 70634af..14b23ac 100644
--- a/realgud/debugger/nodejs/init.el
+++ b/realgud/debugger/nodejs/init.el
@@ -1,4 +1,4 @@
-;; Copyright (C) 2015-2016 Free Software Foundation, Inc
+;; Copyright (C) 2015-2016, 2018 Free Software Foundation, Inc
;; Author: Rocky Bernstein <address@hidden>
@@ -14,6 +14,10 @@
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+;;; "node debug" debugger
+
+;;; Note: this code is obsolete. FIXME: Move into another repository
;;; Regular expressions for nodejs Javascript debugger.
(eval-when-compile (require 'cl-lib)) ;For setf.
@@ -45,7 +49,7 @@ realgud-loc-pat struct")
:file-group 1
:line-group 2))
-;; Regular expression that describes a nodejs command prompt
+;; Regular expression that describes a node-debug command prompt
;; For example:
;; debug>
(setf (gethash "prompt" realgud:nodejs-pat-hash)
@@ -84,7 +88,7 @@ realgud-loc-pat struct")
(defconst realgud:nodejs-frame-module-regexp "[^ \t\n]+")
(defconst realgud:nodejs-frame-file-regexp "[^ \t\n]+")
-;; Regular expression that describes a nodejs location generally shown
+;; Regular expression that describes a node-debug location generally shown
;; Regular expression that describes a debugger "backtrace" command line.
;; For example:
;; #0 module.js:380:17
@@ -142,18 +146,28 @@ realgud-loc-pat struct")
(setf (gethash realgud:nodejs-debugger-name realgud-pat-hash)
realgud:nodejs-pat-hash)
+;; Prefix used in variable names (e.g. short-key-mode-map) for
+;; this debugger
+
+(setf (gethash "nodejs" realgud:variable-basename-hash)
+ "nodejs")
+
(defvar realgud:nodejs-command-hash (make-hash-table :test 'equal)
"Hash key is command name like 'finish' and the value is
the nodejs command to use, like 'out'")
-(setf (gethash "backtrace" realgud:nodejs-command-hash) "T")
+(setf (gethash realgud:nodejs-debugger-name
+ realgud-command-hash)
+ realgud:nodejs-command-hash)
+
+(setf (gethash "backtrace" realgud:nodejs-command-hash) "backtrace")
(setf (gethash "break" realgud:nodejs-command-hash)
"setBreakpoint('%X',%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 "eval" realgud:nodejs-command-hash) "*not-implemented*")
+(setf (gethash "eval" realgud:nodejs-command-hash) "exec('%s')")
;; We need aliases for step and next because the default would
;; do step 1 and nodejs doesn't handle this. And if it did,
@@ -162,6 +176,10 @@ realgud-loc-pat struct")
(setf (gethash "next" realgud:nodejs-command-hash) "next")
;; Unsupported features:
-(setf (gethash "jump" realgud:nodejs-command-hash) "*not-implemented*")
+(setf (gethash "jump" realgud:nodejs-command-hash) "*not-implemented*")
+(setf (gethash "up" realgud:nodejs-command-hash) "*not-implemented*")
+(setf (gethash "down" realgud:nodejs-command-hash) "*not-implemented*")
+(setf (gethash "frame" realgud:nodejs-command-hash) "*not-implemented*")
+
(provide-me "realgud:nodejs-")
diff --git a/realgud/debugger/nodejs/nodejs.el
b/realgud/debugger/nodejs/nodejs.el
index 3670820..055d004 100644
--- a/realgud/debugger/nodejs/nodejs.el
+++ b/realgud/debugger/nodejs/nodejs.el
@@ -1,4 +1,4 @@
-;; Copyright (C) 2014-2016 Free Software Foundation, Inc
+;; Copyright (C) 2014-2016, 2018 Free Software Foundation, Inc
;; Author: Free Software Foundation, Inc
@@ -76,7 +76,12 @@ fringe and marginal icons.
;; )
))
-;; There is already a nodejs command in `nodejs-repl'.
-;; (defalias 'nodejs 'realgud:nodejs)
+;; Note: There is already a nodejs command in `nodejs-repl'.
+
+;;;###autoload
+(defalias 'realgud:node-debug 'realgud:nodejs)
+
+;;;###autoload
+(defalias 'node-debug 'realgud:nodejs)
(provide-me "realgud-")
diff --git a/test/test-send.el b/test/test-send.el
index 580cfd5..5eec304 100644
--- a/test/test-send.el
+++ b/test/test-send.el
@@ -7,7 +7,12 @@
(load-file "../realgud/common/regexp.el")
(load-file "../realgud/debugger/trepan/init.el")
-(declare-function realgud-srcbuf-init 'realgud-buffer-source)
+(declare-function realgud-get-srcbuf 'realgud-buffer-source)
+(declare-function realgud-srcbuf-init 'realgud-buffer-source)
+(declare-function realgud-cmdbuf-init 'realgud-buffer-command)
+(declare-function realgud-command 'realgud-buffer-cmds)
+(declare-function realgud-expand-format 'realgud-send)
+
(test-simple-start)
(eval-when-compile
- [elpa] externals/realgud 5d52fbf 056/140: fix spelling error, (continued)
- [elpa] externals/realgud 5d52fbf 056/140: fix spelling error, Rocky Bernstein, 2019/05/25
- [elpa] externals/realgud 8480545 041/140: Merge branch 'master' of github.com:realgud/realgud, Rocky Bernstein, 2019/05/25
- [elpa] externals/realgud a5853d5 064/140: Merge branch 'master' of github.com:realgud/realgud, Rocky Bernstein, 2019/05/25
- [elpa] externals/realgud c593d0c 060/140: Merge branch 'master' of github.com:realgud/realgud, Rocky Bernstein, 2019/05/25
- [elpa] externals/realgud 2c8caa5 068/140: Merge pull request #208 from dangirsh/patch-1, Rocky Bernstein, 2019/05/25
- [elpa] externals/realgud 5e07d91 062/140: Use boxed attributes in breakpoint enable/disable faces, Rocky Bernstein, 2019/05/25
- [elpa] externals/realgud 937bea0 059/140: Add realgud-populate-common-fn-keys-none to not set function keys..., Rocky Bernstein, 2019/05/25
- [elpa] externals/realgud 8258521 071/140: Small typo, Rocky Bernstein, 2019/05/25
- [elpa] externals/realgud 2bf62ee 086/140: Better Emacs compatibility, Rocky Bernstein, 2019/05/25
- [elpa] externals/realgud 0c3592b 078/140: Merge branch 'master' into filter-lists, Rocky Bernstein, 2019/05/25
- [elpa] externals/realgud 4c66076 072/140: Start nodejs -> node debug rename...,
Rocky Bernstein <=
- [elpa] externals/realgud b4ff2c3 092/140: Check major mode with derived-mode-p, Rocky Bernstein, 2019/05/25
- [elpa] externals/realgud b78f3b9 091/140: Merge pull request #214 from xuchunyang/master, Rocky Bernstein, 2019/05/25
- [elpa] externals/realgud d25fd0e 090/140: Remove pdb alias, Rocky Bernstein, 2019/05/25
- [elpa] externals/realgud 0a3befb 079/140: File remap is session specific..., Rocky Bernstein, 2019/05/25
- [elpa] externals/realgud da2a74b 101/140: Merge branch 'master' of github.com:realgud/realgud, Rocky Bernstein, 2019/05/25
- [elpa] externals/realgud ad64b70 081/140: Correct testing for API change..., Rocky Bernstein, 2019/05/25
- [elpa] externals/realgud dc349f8 075/140: Make calls consistent in light of changes, Rocky Bernstein, 2019/05/25
- [elpa] externals/realgud f966711 093/140: Merge pull request #217 from muffinmad/patch-1, Rocky Bernstein, 2019/05/25
- [elpa] externals/realgud 251eb8c 070/140: Small changes, Rocky Bernstein, 2019/05/25
- [elpa] externals/realgud 09431a4 076/140: Commit stable version before a minor upheaval, Rocky Bernstein, 2019/05/25