Open mmaechler opened 2 years ago
This is because eldoc calls methods()
on its argument, and then the ess-command
gets stuck in the browser. I guess ideally we'd disable browser()
for the duration of the command but I can't see any way of doing that.
This seems like this is a wontfix. Once we have solved #1152, we can restore the background command timeout and at least ESS won't be stuck for long in such cases.
In general, you probably want to disable background commands while debugging base R.
@mmaechler One way would be to introduce a global option to disable browsing in do_browser()
. Then it would be easy to set it temporarily in .ess.command()
.
@mmaechler One way would be to introduce a global option to disable browsing in
do_browser()
. Then it would be easy to set it temporarily in.ess.command()
.
I see; or just something like withoutBrowser(expr)
which would disable browsing only during the evaluation of expr
? I'd prefer that quite a bit to a global option with such a radical effect.
yup that sounds good. Compared to the global option, this would have the advantage that no R code could turn the browser back on.
@mmaechler Another way we could deal with this is at ESS level by detecting browser prompts in ess-command
. When detected, I see two possible recovery mechanisms:
Cancel the ESS command and send a base::return()
to R to return to the previous browse level, if any.
Assume the debugged function is still functional and keep sending f
until .ess.command()
returns.
(1) seems safer but implementing cancellation might be tricky. Cancellation is on the roadmap though. I'd like to detect errors occurring within .ess.command()
and handle them at the lisp level (logging the failure in the message buffer and interrupting the calling lisp code).
I hope this is reproducible:
then advance line by line, you can even use my favorite
ls.str()
which does work, however,str(.)
itself hangs ... only if all this is inside ESS. Some "transcript":