develooper Front page | perl.perl5.porters | Postings from February 2022

Re: Pre-RFC: check if we're running under the debugger

Thread Previous | Thread Next
From:
Leon Timmermans
Date:
February 23, 2022 13:03
Subject:
Re: Pre-RFC: check if we're running under the debugger
Message ID:
CAHhgV8g6+KjVYMk1u4btS6T_t4UZNDfw83p+=HMEsJDehJJjiA@mail.gmail.com
On Wed, Feb 23, 2022 at 1:55 PM Ovid via perl5-porters <
perl5-porters@perl.org> wrote:

> Hi all,
>
> For those of us who use the debugger heavily, it's useful to know if we're
> running under the debugger. Unfortunately, the debugger doesn't natively
> export a way to do that. I've hacked on the debugger numerous times and I
> see that people do things like checking $DB::{single} or $INC{'perl5db.pl
> '}.
>
> It would be nice to be able to do something like:
>
>     if ( $ENV{PERL_DEBUGGER_RUNNING} ) {
>         ...
>     }
>
> (A better name or approach is welcome)
>
> This is a small itch to scratch, but it also seems very easy to scratch.
>
> Thoughts? Or have I missed some documented, dead-trivial way of getting
> this information?
>

You can check if $^P is not 0?

Leon

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About