debugging multi-file scripts using perldb

Discussion in 'Perl Misc' started by Gaurav Shah, Oct 27, 2003.

  1. Gaurav Shah

    Gaurav Shah Guest

    I'm using perldb to debug scripts that call functions from many
    different files, which are included with the "require" command.

    How do I set a breakpoint in a function, or at a line, that is found
    in a file other than the main one?

    Thanks in advance,

    -Gaurav Shah.
     
    Gaurav Shah, Oct 27, 2003
    #1
    1. Advertising

  2. Gaurav Shah

    Peter Scott Guest

    In article <>,
    (Gaurav Shah) writes:
    >I'm using perldb to debug scripts that call functions from many
    >different files, which are included with the "require" command.
    >
    >How do I set a breakpoint in a function, or at a line, that is found
    >in a file other than the main one?


    If the function has already been compiled, 'b funcname' will do it.
    Of course, it may be in another package and hence 'b somepack::funcname'.

    To switch to another source file to use its line numbers, use the
    'f' command.

    If the function hasn't been compiled yet, you can use
    'b postpone funcname' to set a breakpoint on it when it is eventually
    loaded.

    --
    Peter Scott
    http://www.perldebugged.com
     
    Peter Scott, Oct 28, 2003
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Gaurav Shah

    debugging multi-file scripts

    Gaurav Shah, Oct 27, 2003, in forum: Perl
    Replies:
    0
    Views:
    478
    Gaurav Shah
    Oct 27, 2003
  2. bill

    perldb history dump?

    bill, Feb 26, 2004, in forum: Perl Misc
    Replies:
    2
    Views:
    99
  3. bill
    Replies:
    1
    Views:
    117
  4. Roman Kaganovich

    .perldb interface to DDD

    Roman Kaganovich, Jul 27, 2004, in forum: Perl Misc
    Replies:
    0
    Views:
    95
    Roman Kaganovich
    Jul 27, 2004
  5. using perldb in emacs

    , Aug 8, 2005, in forum: Perl Misc
    Replies:
    0
    Views:
    91
Loading...

Share This Page