Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Breakpoints and GLOBAL_PHASE ($DB::single)

by tye (Sage)
on May 17, 2016 at 02:07 UTC ( [id://1163178]=note: print w/replies, xml ) Need Help??


in reply to [SOLVED] Breakpoints behaviour in some perl versions

I work around not being able to break inside of a module before the module has finished loading by just modifying the module's source code to add $DB::single = 1; before the line I want the debugger to break at.

You can also use "b load ...". Though, I found that command to be overly picky about how you specify the file name so I patched my perl5db.pl to make it less picky:

... sub cmd_b_load { my $file = shift; my @files; $file =~ s!::!/!g; # Added this line ... $signal = 1, print $OUT "'$filename' loaded...\n" # if $break_on_load{$filename}; # Replaced this line with the fol +lowing: if grep $break_on_load{$_}, $filename =~ m{(?:^|[/\\])(?=(.*))}g +; ...

- tye        

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1163178]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2024-04-24 03:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found