Re: CGI PERL Remote Debugging
by thomas895 (Deacon) on Dec 26, 2011 at 07:36 UTC
|
I assume that you have SSH access to the server, and PuTTY or another terminal slient on your Windows machine.
If you do, it is as simple as this:
- Open your favourite terminal client.
- cd to the directory where the script is located
- run a command like the following:
perl -dw script.pl
(Notice the -d switch)
Use the perl debugger provided, which is quite good. If you have VNC and X11 on the server, Devel-ptkdb is very handy.
| [reply] [d/l] |
|
|
Thanks for the Response Thomas.
Above steps did not helped for my actual question. I need to debug the PERL CGI code from Windows(client) using IDE.
The source code exists and runs in a Linux server. Now I use to connect Linux server using Putty and debugging the PERL code. However, to ease the job, it would be fine if we have a Komodo kind of IDE but free or open, which has the ability to do remote debugging.
Note: The linux server has limited access to the developer, so installing VNC or X11 in the server is not possible as of now.
| [reply] |
|
|
Like thomas895 said, all you need is ssh2 access, no X11 required. Once you connect, you change the shebang for the CGI to <C>#!/usr/bin/perl -d and you set perl5db.pl RemotePort option to localhost:666119 ...
http://docs.activestate.com/komodo/4.4/debugperl.html# Debugging Perl
http://community.activestate.com/forum/help-interactive-debugging-windows# Help: Interactive debugging on Windows
http://plosquare.blogspot.com/2009/04/debugging-modperl-applications-with.html# Debugging mod_perl with EPIC
http://www252.pair.com/comdog/mastering_perl/Chapters/04.debugger.html# Mastering Perl: Debugging Perl
http://wiki.eprints.org/w/EclipseEpicPerlDebug
Enabling GUI Debugging under Mod_Perl
http://books.google.com/books?id=UDUmoHOUXiMC&pg=PA142&lpg=PA142&dq=perl5db+Remote+Port+tutorial&source=bl&ots=_7fyyfZ2VK&sig=IBHqYwf7yXF0JKKx0Oh2VsZF9v0&hl=en
Devel::ebug, ebug_http, ebug-client, ebug-server
| [reply] |
Re: CGI PERL Remote Debugging
by cavac (Prior) on Dec 26, 2011 at 18:49 UTC
|
You could also load your modules into a HTTP::Server::Simple::CGI environment. This way you could run them as "normal" Perl script in your debugger (one of the reasons i wrote my Maplat server, actually).
Of course, this depends on what exactly you are trying to achieve and what kind of environments you actually require.
BREW /very/strong/coffee HTTP/1.1
Host: goodmorning.example.com
418 I'm a teapot
| [reply] |
Re: CGI PERL Remote Debugging
by TJPride (Pilgrim) on Dec 26, 2011 at 18:39 UTC
|
Depending on what the script does, you could maybe debug it on your own system using ActivePerl. Short of that, you can log in via SSH (Putty, as you said) and run it via the command line for simple errors, or use Data::Dumper and a log file to dump out values at various key points if you need to detect a logic error. | [reply] |
Re: CGI PERL Remote Debugging
by Anonymous Monk on Dec 27, 2011 at 03:29 UTC
|
| [reply] |
|
|
Hey Guys, Thanks for the response.
Again, none of the responses helped for my actual question. No one talks about the REMOTE DEBUGGING.
It's not the question about how to debug? it's a question about how the source code runs in a linux server can be debugged from a windows client.
| [reply] |
|
|
| [reply] |
|
|
|
|
|
|