roeya
Posts: 181
|
Posted: 12/12/2004, 12:02 PM |
|
I use a debugger with codecharge studio to debug my scripts on live server.
To do it follow the instructions below:
1.You will need Apache 2 for win32 running it as a process and not as service.
2.Download and install Devel:: ptkdb, as this depends on Tk, use the ppm tool (if you use Perl from ActiveState ).
3.In the published script change the first line from something like this
#!/apache2/perl/bin/perl
to this
#!/apache2/perl/bin/perl -d:ptkdb
4.Use the browser to access the page and… the debugger opens magically….
5.You can put break points and save them, however when you need to break in a required file (where you put your custom code) you need small trick:
when the script loads in the debugger find the require statement and put breakpoint on it, run the script. It will stop on the break point. Step over the break point and you go to the file with the custom code, put a break point where you need and continue to run the script. Your next stop is in the custom code. There is one problem though -
The debugger forgets the break point in the required file so you have to reset it it everytime.
_________________
http://www.infoneto.com/ |