large mods of code while running debugger

H

horos

hey all,

I'm aware of actions - ie: the ability to add statements to an already
running perl script that you are debugging.

However, is there a 'change' type of action, or a 'delete' type of
action? Suppose I want to replace one foreach loop with another foreach
loop without restarting the program, or suppose I want to comment out a
piece of upcoming code. Does anyone have a good way to do this?

Also, is there a way to maneuver up and down the stack, and to do like
gdb and basically continue until a subroutine returns to its caller, or
continues until a later line in the file is reached? And is there a way
to print out variables in the parent stack?

Thanks much,

Ed
 
P

Peter Scott

I'm aware of actions - ie: the ability to add statements to an already
running perl script that you are debugging.

However, is there a 'change' type of action, or a 'delete' type of
action? Suppose I want to replace one foreach loop with another foreach
loop without restarting the program, or suppose I want to comment out a
piece of upcoming code. Does anyone have a good way to do this?

Only ad hoc methods that depend on the original structure. You can skip
a foreach loop if it iterates over an array by emptying the array first.
But you can't replace statements. (Aside from deep magic that would be
far more effort than just editing the source.)
Also, is there a way to maneuver up and down the stack,

Not the way you want.
and to do like
gdb and basically continue until a subroutine returns to its caller,

I usually just keep hitting 'r' to do this.
or continues until a later line in the file is reached?

c said:
And is there a way to print out variables in the parent stack?

V if they're package variables, y if they're lexicals.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,181
Messages
2,570,969
Members
47,536
Latest member
VeldaYoung

Latest Threads

Top