From c@@rdi@g@bor @ending from gm@il@com  Tue May 22 18:07:56 2018
From: c@@rdi@g@bor @ending from gm@il@com (=?UTF-8?B?R8OhYm9yIENzw6FyZGk=?=)
Date: Tue, 22 May 2018 17:07:56 +0100
Subject: [Rd] debugonce() functions are not considered as debugged
In-Reply-To: <63f24fd9-a224-7997-fb3a-ef8f87a24306@gmail.com>
References: <CABtg=K=Q2k8Qr7uk=XQ2Qa76NWUcG0PmDMseZ37E2RZm4=XqDQ@mail.gmail.com>
 <63f24fd9-a224-7997-fb3a-ef8f87a24306@gmail.com>
Message-ID: <CABtg=KkU6wEoDWCUK8RqRv=3Z+PW1aNsK1Px7goF_K429vtphA@mail.gmail.com>

On Mon, May 21, 2018 at 5:01 PM Tomas Kalibera <tomas.kalibera at gmail.com>
wrote:
[...]
> Do you have a good use case when it would be useful to query/unset the
> mark for debugonce?

Well, I suppose the same use cases when it is useful to query/unset the
other debug
mark.

To be more specific, in debug helpers for a tool that works with callbacks
from a central event loop, it is nice to be able to tell which callbacks are
"debugged" currently, either via `debug()` or  `debugonce()`.

Gabor

> Best,
> Tomas

> On 04/28/2018 01:57 PM, G?bor Cs?rdi wrote:
> > debugonce() sets a different flag (RSTEP), and this is not queried by
> > isdebugged(), and it is also not unset by undebug().
> >
> > Is this expected? If yes, is there a way to query and unset the RSTEP
flag
> > from R code?
> >
> > ? f <- function() { }
> > ? debugonce(f)
> > ? isdebugged(f)
> > [1] FALSE
> >
> > ? undebug(f)
> > Warning message:
> > In undebug(f) : argument is not being debugged
> >
> > ? f()
> > debugging in: f()
> > debug at #1: {
> > }
> > Browse[2]>
> >
> > ______________________________________________
> > R-devel at r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-devel



[Rd] debugonce() functions are not considered as debugged
=?UTF-8?B?R8OhYm9yIENzw6FyZGk=?=