Function: perldb

perldb is an autoloaded, interactive and byte-compiled function defined in gud.el.gz.

Signature

(perldb COMMAND-LINE)

Documentation

Debug a perl program with gud.

Interactively, this will prompt you for a command line.

Noninteractively, COMMAND-LINE should be on the form
"perl -d perl-file.pl".

The directory containing the perl program becomes the initial working directory and source-file directory for your debugger.

View in manual

Probably introduced at or before Emacs version 29.1.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/gud.el.gz
;;;###autoload
(defun perldb (command-line)
  "Debug a perl program with gud.
Interactively, this will prompt you for a command line.

Noninteractively, COMMAND-LINE should be on the form
\"perl -d perl-file.pl\".

The directory containing the perl program becomes the initial
working directory and source-file directory for your debugger."
  (interactive
   (list (gud-query-cmdline 'perldb
			    (concat (or (buffer-file-name) "-E 0") " "))))

  (gud-common-init command-line 'gud-perldb-massage-args
		   'gud-perldb-marker-filter)
  (setq-local gud-minor-mode 'perldb)

  (gud-def gud-break  "b %l"         "\C-b" "Set breakpoint at current line.")
  (gud-def gud-remove "B %l"         "\C-d" "Remove breakpoint at current line")
  (gud-def gud-step   "s"            "\C-s" "Step one source line with display.")
  (gud-def gud-next   "n"            "\C-n" "Step one line (skip functions).")
  (gud-def gud-cont   "c"            "\C-r" "Continue with display.")
;  (gud-def gud-finish "finish"       "\C-f" "Finish executing current function.")
;  (gud-def gud-up     "up %p"        "<" "Up N stack frames (numeric arg).")
;  (gud-def gud-down   "down %p"      ">" "Down N stack frames (numeric arg).")
  (gud-def gud-print  "p %e"          "\C-p" "Evaluate perl expression at point.")
  (gud-def gud-until  "c %l"          "\C-u" "Continue to current line.")

  (gud-set-repeat-map-property 'gud-perldb-repeat-map)

  (setq comint-prompt-regexp "^  DB<+[0-9]+>+ ")
  (setq paragraph-start comint-prompt-regexp)
  (run-hooks 'perldb-mode-hook))