I was debugging a perl program on SuSe Linux using “perl -d” switch.
While debugging, the program was reporting XYZ variable is not set
How can I set the value of XYZ inside the debugger?
I tried following inside the debugger but not working.
set XYZ=ABC
my $XYZ=ABC
setenv XYZ ABC
I did a bit of google on this. But couldn’t find what I wanted.
The debug console takes Perl expressions, so you need to quote the value if it is a string.
You will have to move the program to before the line that throws the error (look at breakpoints, it’s
b <line>in the debugger) and then set the value.Here’s a good resource: http://obsidianrook.com/devnotes/talks/perl_debugger/