Remote debugging scripts & editing source files

Environment: Linux server, Windows XP editing.  Upload files to server via FTP.  Server environment is a non-CGI environment (i.e. I just want to run scripts on there via perl -d scriptname.pl).

Debugging works fine, however when I'm tracing through the code, setting breakpoints etc., those breakpoints and line number that is executing is the one on the server as transferred at debug runtime.

So, for example, I'm tracing through subroutines, notice some problems at line 2050 of the source file, I have to go back to my local file in the project, navigate to line 2050, publish and start again.  That whole navigation exercise can take a while.

Is there any way that I can debug against the local project version and, when I find something that needs fixing, stop the run of that script, edit at that exact point, re-publish the modified script and then start again debugging?

It seems that I can't get the debugging tracing and editing to work together.

Have I done something wrong in my setup of this environment?

Answer:
Usually after an error is corrected, the script must be restarted, so there is not much else that can be done than re-uploading and running again. So try to use bookmarks or goto line feature to navigate better.

On the other hand, it could help if it was possible to do testing while running the script on the same machine running optiperl. For hints on how to do this, see here: http://www.xarka.com/optiperl/help/index.html#advancedissues

This of course sometimes is not possible.

16.07.2004. 03:38

This article hasn't been commented yet.

Write a comment

:

:

:


1 + 6 =