You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Kim X Goldov <kg...@goldov.com> on 2005/03/13 07:52:34 UTC
Apache::DB with Emacs editor support
Is it possible to use the Emacs GUD debugger when debugging handlers using Apache::DB? I've been successfully using Apache::DB with mod_perl1, and find the Emacs debugger useful for Perl scripts.
Kim Goldov
kgoldov@goldov.com
Re: Apache::DB with Emacs editor support
Posted by Vegard Vesterheim <Ve...@uninett.no>.
On Sat, 12 Mar 2005 22:52:34 -0800 Kim X Goldov <kg...@goldov.com> wrote:
> Is it possible to use the Emacs GUD debugger when debugging handlers
> using Apache::DB? I've been successfully using Apache::DB with
> mod_perl1, and find the Emacs debugger useful for Perl scripts.
>
> Kim Goldov
> kgoldov@goldov.com
http://www.jsw4.net/info/list-archives/mod_perl/04-wk18/msg00126.html
--
Vegard Vesterheim : Phone: +47 73 55 79 12
UNINETT : Fax: +47 73 55 79 01
N-7465 Trondheim, NORWAY : Email: Vegard.Vesterheim@uninett.no
Re: Apache::DB with Emacs editor support
Posted by Dominique Quatravaux <do...@idealx.com>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Issac Goldstand wrote:
| Out of curiostiy, will this also work with ActiveState's perl5db.pl
| for Komodo?
I have no idea as I don't use this setup, sorry. However, Apache::DB
has to provide an (albeit trivial) patch to perl5db.pl, so I suppose
that Komodo would not work out of the box either.
- --
Dominique QUATRAVAUX Ingénieur senior
01 44 42 00 08 IDEALX
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFCNGI+MJAKAU3mjcsRAu32AKC3eW/rppIZLZuhDw9oqJDsBIwdUACdGcSS
Nu2A12reEwCTbyWk1gEbrDk=
=OoJZ
-----END PGP SIGNATURE-----
Re: Apache::DB with Emacs editor support
Posted by Issac Goldstand <ma...@beamartyr.net>.
Out of curiostiy, will this also work with ActiveState's perl5db.pl for
Komodo?
Issac
Dominique Quatravaux wrote:
> Kim X Goldov wrote:
>
> | Is it possible to use the Emacs GUD debugger when debugging
> | handlers using Apache::DB? I've been successfully using Apache::DB
> | with mod_perl1, and find the Emacs debugger useful for Perl
> | scripts.
>
> Yes you can: you need the latest version of Apache::DB. For now, you
> have to run httpd -X to prevent it from forking, but I'm working on
> that limitation.
>
> You have to run a wrapper script around Apache, because Emacs insists
> on fiddling with command line switches assuming that the real
> /usr/bin/perl is used as the interpreter (which it won't). That
> wrapper should run apache -X, after setting the following environment
> variables:
>
> ~ * PERLDB_OPTS="TTY=$tty ReadLine=0 ornaments=0" where $tty is the
> ~ tty the wrapper script is attached to (obtained e.g. with
> ~ `/usr/bin/tty`)
> ~ * MOD_PERL_TRACE="dshg" (only relevant if mod_perl was compiled
> ~ with debugging on)
>
> Here are appropriate httpd.conf snippets to honor this setup:
>
> PerlPassEnv PERLDB_OPTS
> PerlPassEnv MOD_PERL_TRACE
> PerlPassEnv TERM
>
> <Perl>
> ~ BEGIN { if ($ENV{PERLDB_OPTS}) {
> ~ require Apache::DB;
> ~ Apache::DB->init;
> ~ require 'Apache/perl5db.pl';
> ~ warn "Support for editor embedding (e.g. Emacs) enabled\n\n";
> ~ $DB::slave_editor=1;
> ~ }}
>
> ~ $DB::single = 1;
>
> # Your usual <Perl> stuff goes here
> </Perl>
>
> Now launch Emacs, type M-x perldb <ret>, erase the minibuffer
> contents, type in the path of your wrapper script followed by a bogus
> command-line argument (e.g. "/home/dom/bin/apache-gud mod_perl"). The
> debugger should stop at the "$DB::single = 1" line above.
>
> Regards,
>
Re: Apache::DB with Emacs editor support
Posted by Dominique Quatravaux <do...@idealx.com>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Kim X Goldov wrote:
| Is it possible to use the Emacs GUD debugger when debugging
| handlers using Apache::DB? I've been successfully using Apache::DB
| with mod_perl1, and find the Emacs debugger useful for Perl
| scripts.
Yes you can: you need the latest version of Apache::DB. For now, you
have to run httpd -X to prevent it from forking, but I'm working on
that limitation.
You have to run a wrapper script around Apache, because Emacs insists
on fiddling with command line switches assuming that the real
/usr/bin/perl is used as the interpreter (which it won't). That
wrapper should run apache -X, after setting the following environment
variables:
~ * PERLDB_OPTS="TTY=$tty ReadLine=0 ornaments=0" where $tty is the
~ tty the wrapper script is attached to (obtained e.g. with
~ `/usr/bin/tty`)
~ * MOD_PERL_TRACE="dshg" (only relevant if mod_perl was compiled
~ with debugging on)
Here are appropriate httpd.conf snippets to honor this setup:
PerlPassEnv PERLDB_OPTS
PerlPassEnv MOD_PERL_TRACE
PerlPassEnv TERM
<Perl>
~ BEGIN { if ($ENV{PERLDB_OPTS}) {
~ require Apache::DB;
~ Apache::DB->init;
~ require 'Apache/perl5db.pl';
~ warn "Support for editor embedding (e.g. Emacs) enabled\n\n";
~ $DB::slave_editor=1;
~ }}
~ $DB::single = 1;
# Your usual <Perl> stuff goes here
</Perl>
Now launch Emacs, type M-x perldb <ret>, erase the minibuffer
contents, type in the path of your wrapper script followed by a bogus
command-line argument (e.g. "/home/dom/bin/apache-gud mod_perl"). The
debugger should stop at the "$DB::single = 1" line above.
Regards,
- --
Dominique QUATRAVAUX Ingénieur senior
01 44 42 00 08 IDEALX
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFCNCzyMJAKAU3mjcsRAnvhAKCbbALXfD9EWgktBr3zQNvaXpmMQQCgoQL4
qRcGq+v4uZJYu7iY+cJQVFg=
=P4uz
-----END PGP SIGNATURE-----