C
Clint Olsen
One of the things I can't stand about Perl is the debugger. It really
lacks compared to C debuggers, and I can't for the life of me figure out
why this has to be. Do most Perl programmers just use print to debug their
code?
When I get the runtime error 'Can't use string ("BLAH") as an ARRAY
ref...', the first thing you would expect is that the debugger stop
excution immediately so you can inspect what access caused the problem.
For example, in a multi-level data structure access, how can I tell which
particular access resulted in a violation?
$$hr{abc}[123][456] = $foo; # ????
Instead Perl bails out completely, so while the call stack is nice, that's
all you get!
Secondly, what's with the lack of ability to go up/down frames in the
stack? You can use 'T' to view the call stack, but in traditional
debuggers, you can view variables etc. at each stack frame to actually find
out /how/ you got into a particular predicament. So, I end up having to
put on my psychic hat to figure how how I /might/ have gotten there and
hope I can set a sensible breakpoint.
Thanks,
-Clint
lacks compared to C debuggers, and I can't for the life of me figure out
why this has to be. Do most Perl programmers just use print to debug their
code?
When I get the runtime error 'Can't use string ("BLAH") as an ARRAY
ref...', the first thing you would expect is that the debugger stop
excution immediately so you can inspect what access caused the problem.
For example, in a multi-level data structure access, how can I tell which
particular access resulted in a violation?
$$hr{abc}[123][456] = $foo; # ????
Instead Perl bails out completely, so while the call stack is nice, that's
all you get!
Secondly, what's with the lack of ability to go up/down frames in the
stack? You can use 'T' to view the call stack, but in traditional
debuggers, you can view variables etc. at each stack frame to actually find
out /how/ you got into a particular predicament. So, I end up having to
put on my psychic hat to figure how how I /might/ have gotten there and
hope I can set a sensible breakpoint.
Thanks,
-Clint