]> code.delx.au - gnu-emacs-elpa/blob - packages/realgud/realgud/debugger/pdb/pdb.el
Add 'packages/realgud/' from commit 'd811316e6a0f4eeee8a1347f504c196c86baa2cb'
[gnu-emacs-elpa] / packages / realgud / realgud / debugger / pdb / pdb.el
1 ;;; Copyright (C) 2012, 2014 Rocky Bernstein <rocky@gnu.org>
2 ;; `pdb' Main interface to pdb via Emacs
3 (require 'load-relative)
4 (require-relative-list '("core" "track-mode") "realgud:pdb-")
5 (require-relative-list '("../../common/run") "realgud:")
6 (require-relative-list '("core" "track-mode") "realgud:pdb-")
7
8 ;; This is needed, or at least the docstring part of it is needed to
9 ;; get the customization menu to work in Emacs 24.
10 (defgroup realgud:pdb nil
11 "The realgud interface to the Python pdb debugger"
12 :group 'realgud
13 :version "24.1")
14
15 ;; -------------------------------------------------------------------
16 ;; User-definable variables
17 ;;
18
19 (defcustom realgud:pdb-command-name
20 "pdb"
21 "File name for executing the stock Python debugger and command options.
22 This should be an executable on your path, or an absolute file name."
23 :type 'string
24 :group 'realgud:pdb)
25 ;; -------------------------------------------------------------------
26 ;; The end.
27 ;;
28
29 (declare-function pdb-track-mode 'realgud:pdb-track)
30 (declare-function pdb-query-cmdline 'realgud:pdb-core)
31 (declare-function pdb-parse-cmd-args 'realgud:pdb-core)
32 (declare-function realgud:run-debugger 'realgud:run)
33
34 ;;;###autoload
35 (defun realgud:pdb (&optional opt-cmd-line no-reset)
36 "Invoke the pdb Python debugger and start the Emacs user interface.
37
38 String OPT-CMD-LINE specifies how to run pdb. You will be prompted
39 for a command line is one isn't supplied.
40
41 OPT-COMMAND-LINE is treated like a shell string; arguments are
42 tokenized by `split-string-and-unquote'. The tokenized string is
43 parsed by `pdb-parse-cmd-args' and path elements found by that
44 are expanded using `realgud:expand-file-name-if-exists'.
45
46 Normally, command buffers are reused when the same debugger is
47 reinvoked inside a command buffer with a similar command. If we
48 discover that the buffer has prior command-buffer information and
49 NO-RESET is nil, then that information which may point into other
50 buffers and source buffers which may contain marks and fringe or
51 marginal icons is reset. See `loc-changes-clear-buffer' to clear
52 fringe and marginal icons.
53 "
54 (interactive)
55 (realgud:run-debugger "pdb" 'pdb-query-cmdline
56 'pdb-parse-cmd-args
57 'realgud:pdb-minibuffer-history
58 opt-cmd-line no-reset)
59 )
60
61
62 (defalias 'pdb 'realgud:pdb)
63
64 (provide-me "realgud-")