* Python debugger: To run pdb, how fix wrong path & filename & scriptname on command line???
@ 2003-10-22 22:14 Christian Seberino
2003-10-23 15:12 ` Kevin Rodgers
0 siblings, 1 reply; 3+ messages in thread
From: Christian Seberino @ 2003-10-22 22:14 UTC (permalink / raw)
When you try to run the Python debugger in Emacs with pdb command
it asks you what the desired command line to invoke pdb is.
It assumes script is pdb and not pdb.py. Also, the path is missing
so Emacs says it cannot find pdb.py script.
Also, the filename is not always correct.
How fix the entire command line for all invocations of pdb??
Chris
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Python debugger: To run pdb, how fix wrong path & filename & scriptname on command line???
2003-10-22 22:14 Python debugger: To run pdb, how fix wrong path & filename & scriptname on command line??? Christian Seberino
@ 2003-10-23 15:12 ` Kevin Rodgers
2003-10-29 19:24 ` Christian Seberino
0 siblings, 1 reply; 3+ messages in thread
From: Kevin Rodgers @ 2003-10-23 15:12 UTC (permalink / raw)
Christian Seberino wrote:
> When you try to run the Python debugger in Emacs with pdb command
> it asks you what the desired command line to invoke pdb is.
>
> It assumes script is pdb and not pdb.py. Also, the path is missing
> so Emacs says it cannot find pdb.py script.
>
> Also, the filename is not always correct.
>
> How fix the entire command line for all invocations of pdb??
Does this work?
(defadvice pdb (before gud-query-cmdline activate)
"Provide a better default command line when called interactively."
(interactive
(list (gud-query-cmdline '/usr/local/bin/pdb.py
(file-name-nondirectory buffer-file-name)))))
--
Kevin Rodgers
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Python debugger: To run pdb, how fix wrong path & filename & scriptname on command line???
2003-10-23 15:12 ` Kevin Rodgers
@ 2003-10-29 19:24 ` Christian Seberino
0 siblings, 0 replies; 3+ messages in thread
From: Christian Seberino @ 2003-10-29 19:24 UTC (permalink / raw)
Kevin
Thanks. It worked! This is really quite nice to have. I really appreciate it.
Is it easy to add more things after this successfull code snippet gets run??
1. Even though path and rest of command line is correct, Emacs still asks
a question to verify it is correct. I must press RETURN to approve.
*Can I make code snippet do the RETURN automatically?*
2. For various reasons, it is ALWAYS necessary to execute the same command twice
in pdb when started. (The "step" command.)
*Can I even run "step" twice in pdb interface automatically too?*
Thanks!
Chris
Kevin Rodgers <ihs_4664@yahoo.com> wrote in message news:<3F97EFE1.5070304@yahoo.com>...
> Christian Seberino wrote:
>
> > When you try to run the Python debugger in Emacs with pdb command
> > it asks you what the desired command line to invoke pdb is.
> >
> > It assumes script is pdb and not pdb.py. Also, the path is missing
> > so Emacs says it cannot find pdb.py script.
> >
> > Also, the filename is not always correct.
> >
> > How fix the entire command line for all invocations of pdb??
>
> Does this work?
>
>
> (defadvice pdb (before gud-query-cmdline activate)
> "Provide a better default command line when called interactively."
> (interactive
> (list (gud-query-cmdline '/usr/local/bin/pdb.py
> (file-name-nondirectory buffer-file-name)))))
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-10-29 19:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-22 22:14 Python debugger: To run pdb, how fix wrong path & filename & scriptname on command line??? Christian Seberino
2003-10-23 15:12 ` Kevin Rodgers
2003-10-29 19:24 ` Christian Seberino
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).