in reply to Perl Debugger degrades performance when reading large spreadsheet

To stop your program at a "good" place, you can enter the debugger at the interesting place using

$DB::single = 1;

Personally, I would first reduce the data read in from Spreadsheet::Read and/or replace it with static data to speed things up.

  • Comment on Re: Perl Debugger degrades performance when reading large spreadsheet
  • Download Code

Replies are listed 'Best First'.
Re^2: Perl Debugger degrades performance when reading large spreadsheet
by boleary (Scribe) on Aug 31, 2021 at 16:21 UTC

    Corion... Maybe I misunderstand your use of

    $DB::single=1

    To use that, doesn't the code needs to be loaded with the debugger?
    So every sub is already wrapped with a DB::sub() like Rolf suggests.
    and the whole script is already slowed down before I hit the $DB::single =1;

    If I don't load through debugger I get:

    Name "DB::single" used only once: possible typo at fix_ahdl_dcfx_const +raint_file.pl line 78.

    I can fix that warning by adding

    use DB;

    But I still can't interact with the debugger without running with the perl -d flag.

    Now I'm really done spending time on this :)
    But it has helped me understand the debugger a bit more.

      «…I'm really done…»

      See print for a human solution 🤪

      «The Crux of the Biscuit is the Apostrophe»