Breakpoint information

Is there a way to keep breakpoints for all modules when debugging?

I can put the "-d" parameter in my scripts and it breaks as expected. I can then step into routines and setup breakpoints and they work as expected. However, the next time I run the script, it doesn't remember any breakpoints in modules other than the top-level script.

Is there something I'm missing? Is there an easy way to keep those breakpoints across multiple runs of a script.

It seems like this might be a good thing for a plug-in.  Can the plug-in API access the ServerTalk box on the interface so I could reload my breakpoints automatically on each run?

Thanks,
Mike

Answer:
Breakpoints in general are not reloaded, if they where added while remote debugging in the temporary open script. Try adding them in the original files before the debugger starts, so they will be initialized correctly when the connection is made.

Another case might be if they where added in a module that was loaded dynamically. In this case, if you don't trace at least into the beginning of the code of that module, the breakpoints cannot work, since the debugger can't know while running when the module is loaded to add the breakpoints.

Below is the way optiperl adds breakpoints:

1) When you start the debugger, breakpoints are added for the starting script and all modules.
2) For modules that had breakpoints and are not found in the initialization of the script, breakpoints are added instead to command perl to stop on *loading* the module.
3) If perl stops on module load, then the breakpoints that had not been added from the first pass are re-entered, and a command is given to continue execution.

However if the module is loaded dynamically, in some cases step 3 does not occur.

27.02.2004. 14:57

This article hasn't been commented yet.

Write a comment

:

:

:


1 + 7 =