john-jones
john-jones

Reputation: 7780

Perl ptkdb different outcome with breakpoint

I have a perl script, if i run it normally, it doesn't work right.
But if i run it with the debugger and set a breakpoint at a very specific line, then the script operates correctly.

What side effects can the, breakpoints of the ptkdb module, have?

Upvotes: 1

Views: 90

Answers (1)

bvr
bvr

Reputation: 9697

Loading of any perl debugger has quite significant impact on all environment -- for an idea look into perldebguts. While the debuggers try hardly to minimize its effects, there are additional packages loaded, some special variable has different contents, timing of runtime changes, etc. Without more detail it is hard to say what difference is affecting you.

I would recommend to debug using logger (I found easy mode of Log::Log4perl very handy for this). Also many useful hints on debugging art is in perldebtut.

Upvotes: 2

Related Questions