ActiveState Powered by ActiveState

ActiveState Community


Komodo, Bugzilla, and debugging

Posted by skyhawk2891 on 2007-11-07 10:09
OS: Windows

Greetings. We are currently testing several IDE for debugging our homebrew bugzilla, and I have a question regarding yours.

We ran into a problem with just debugging a simple file (like show hierarchy.cgi)in that it would throw us back to bugzilla login, cause we didn't have a cookie with all the stuff we need.
We found a work around to hack in the cookie.
Ideally we'd like to be able to debug in firefox, so we could have all the cookie handling done there.

Perhaps I'm missing something?

skyhawk2891 | Wed, 2007-11-07 13:31

Additional regarding setting up "debugging cgi". following the instructions I've run into these problems:

commenting out ScriptInterpreterSource Registry-Strict in my httpd.conf breaks it

adding -d to my shebang line breaks it

I have no idea what to set "SetEnv DBGP_IDEKEY """ to

ericp | Wed, 2007-11-07 13:45

I'm not completely clear on what you're doing here, but it sounds like you're
trying to debug live bugzilla CGI scripts.

Rather than do this via a live web server, you can simulate CGI debugging
in Komodo by choosing the "Simulate CGI Environment" in the Debugging
Options panel that comes up at the start of a debug session, and then
enter the CGI Environment variables in the appropriate tab.

On the other hand, you could read the "Debugging Mod_Perl" section of
the online help, and then follow that. Debugging mod_perl is
a grayer area. It works on Windows for some people, not others. On
Unix, it works more reliably, although some people have found they need
to restart Apache after each request. In all cases, apache should be
launched with the -X argument to run it in single-threaded mode.

skyhawk2891 | Wed, 2007-11-07 13:51

We know about the simulate CGI Environment, but it'd be nicer if we could debug in komodo and use firefox's cookies? (and yes to, debugging live bugzilla cgi scrips).

The problem is grabbing every one of those cookies we need to properly debug one page, it is a pain.

I'm kinda unsure on what you mean on the whole mod_perl thing.

ericp | Wed, 2007-11-07 15:50

> I'm kinda unsure on what you mean on the whole mod_perl thing.

Great! Debugging CGI is simpler than debugging mod_perl, so avoiding
that approach is a good thing.

> Additional regarding setting up "debugging cgi". following the
> instructions I've run into these problems:

Which instructions are you referring to? The Komodo Help, or the bugzilla
notes? I ask because our documentation doesn't refer to "ScriptInterpreterSource",
as far as I know.

> commenting out ScriptInterpreterSource Registry-Strict in my httpd.conf breaks it

What happens if you leave it in?

> adding -d to my shebang line breaks it

> I have no idea what to set "SetEnv DBGP_IDEKEY """ to

Setting it to the empty string is fine. When you use a debugging proxy
you need to set it to a meaningful value.

In your httpd.conf are you setting the environment variables you need to
kick off a remote Perl debugging session? There's a bug in the CGI
Debugging section: those backslashes should be forward slashes for
the PERL5LIB value, and the PERL5DB value needs to be set to
"BEGIN { require q/perl5db.pl/ }". I'm not sure, and I haven't installed
Apache on this machine yet (rebuilt a couple of weeks ago), but
if you have installed Komodo in a path containing spaces, it might be
better to use the old-style DOS pathnames in the PERL5LIB setting.
So mine would be this:

SetEnv PERL5LIB "c:/PROGRA~1/ACTIVE~2.2/lib/support/dbgp/perllib"

You still need to make sure perl is invoked with the -d argument,
and not in the shebang line. It might be better to have Apache
launch a shell script wrapper that invokes the bugzilla script in
a remote debugger session.

Hope this helps. Unfortunately I didn't back up my httpd and mod_perl
conf files when I rebuilt the machine -- I forgot they were in the
Apache program files area, and not in my userdata area. So I can't
check this out right away, but it should point you in the right direction.
--
Eric Promislow
Komodo Team
ActiveState - Dynamic Tools for Dynamic Languages
http://www.ActiveState.com

-->