in reply to Debug import function code

What happens if you set a breakpoint in your module's import?

If that doesn't work, you could do module->import('load'); in the debugger. Or comment it out and do require module; module->import('load'); in the debugger.

Replies are listed 'Best First'.
Re^2: Debug import function code
by Anonymous Monk on Sep 02, 2011 at 10:44 UTC

    Actually when I executing the script with -d option its exiting somewhere in the middle of import code. Thats the reason i would want to debug import code. Any way to do this?

      Add $DB::single = 1 to the import routine. That should make the debugger break at that location.


      "There is no shame in being self-taught, only in not trying to learn in the first place." -- Atrus, Myst: The Book of D'ni.