Hey Guys!

I am in the process of getting back in to Perl after being away from programming as a whole for quite a while. I thought this might be a good time to learn how to use the built-in debugger. Previously I ran 'EPIC' inside 'Eclipse', but ended up very much disliking that IDE. Therefore this time around I intend to write programmes in a text editor called 'EditPad Pro' and then employ the native Perl debugger as necessary. Unfortunately I have run in to some problems straight out of the gate,

As a test I started with the simplest of all one-line programmes, saved as 'debug_test.pl':

say "Hello";

Next, at the console window I used the command:

perl -d debug_test.pl

This is the output I received from Perl:

Loading DB routines from perl5db.pl version 1.51 Editor support available. Enter h or 'h h' for help, or 'perldoc perldebug' for more help. <main::(test.plx:1): print "hello"; Unable to get Terminal Size. The Win32 GetConsoleScreenBufferInfo call + didn't work. The COLUMNS and LINES environment variables didn't work +. at C:/StrawberryPERL/perl/vendor/lib/Term/ReadLine/readline.pm line 41 +0. at C:/StrawberryPERL/perl/vendor/lib/Term/ReadKey.pm line 462. Term::ReadKey::GetTerminalSize(GLOB(0x28025f4)) called at C:/S +trawberryPERL/perl/vendor/lib/Term/ReadLine/readline.pm line 410 readline::get_window_size called at C:/StrawberryPERL/perl/ven +dor/lib/Term/ReadLine/readline.pm line 1114 readline::init called at C:/StrawberryPERL/perl/vendor/lib/Ter +m/ReadLine/readline.pm line 208 require Term/ReadLine/readline.pm called at C:/StrawberryPERL/ +perl/vendor/lib/Term/ReadLine/Perl.pm line 63 eval {...} called at C:/StrawberryPERL/perl/vendor/lib/Term/Re +adLine/Perl.pm line 63 Term::ReadLine::Perl::new("Term::ReadLine", "perldb", GLOB(0x2 +8b27bc), GLOB(0x28025f4)) called at C:/StrawberryPERL/perl/lib/perl5d +b.pl line 6868 DB::setterm() called at C:/StrawberryPERL/perl/lib/perl5db.pl +line 1849 DB::_DB__read_next_cmd(undef) called at C:/StrawberryPERL/perl +/lib/perl5db.pl line 2786 DB::DB called at test.plx line 1 SetConsoleMode failed, LastError=|6| at C:/StrawberryPERL/perl/vendor/ +lib/Term/ReadKey.pm line 346. at C:/StrawberryPERL/perl/vendor/lib/Term/ReadLine/readline.pm line 1 +581. readline::readline(" DB<1> ") called at C:/StrawberryPERL/per +l/vendor/lib/Term/ReadLine/Perl.pm line 11 Term::ReadLine::Perl::readline(Term::ReadLine::Perl=ARRAY(0x61 +1b1c), " DB<1> ") called at C:/StrawberryPERL/perl/lib/perl5db.pl li +ne 7367 DB::readline(" DB<1> ") called at C:/StrawberryPERL/perl/lib/ +perl5db.pl line 1858 DB::_DB__read_next_cmd(undef) called at C:/StrawberryPERL/perl +/lib/perl5db.pl line 2786 DB::DB called at test.plx line 1

I am using a fresh install of the newest Strawberry Perl (32Bit), which is release 5.26.2.1. I run this in Windows 7 (64Bit), patched with the latest updates. For what it is worth the same error occurs if I try the 64Bit edition of Strawberry Perl either. Other than this, Perl programmes themselves run without any problem. It is only when I try to execute them under the native debugger that I encounter an issue.

Can any of you chaps suggest a solution for this?

A quick search of the forum came up with a very similar issue reported by 'Ovid' way back in 2007. However that gentleman encountered the error while employing something called 'Prove', which I have never come across before and is certainly not something I am using myself. I think most of the suggestions in that thread related to using 'Prove', so I do not know how to apply them in my own far simpler situation.

UPDATE:

Well... A degree more persistence with the search function, both here and over at Google suggested another approach to sort this out that was not centred on 'Prove'; create an environment variable 'TERM' and set its value to 'dumb' (case sensitive for each I believe). After doing so perl -d debug_test.pl began working like a charm!!! So... I guess that is the fix. Which is good of course, but I have no idea why I couldn't find that result the first half-dozen times I searched for an answer... Weird indeed. Still. The jobs a good'un--problem solved!

"Aure Entuluva!" - Hurin Thalion at the Nirnaeth Arnoediad.

In reply to Problems starting the debugger by morelenmir

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.