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
Leon Timmermans
February 23, 2022 13:03
Re: Pre-RFC: check if we're running under the debugger
Message ID:
On Wed, Feb 23, 2022 at 1:55 PM Ovid via perl5-porters <> 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{'
> '}.
> It would be nice to be able to do something like:
>         ...
>     }
> (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?


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About