You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When R requests inputs, we don't know for sure what is the intent:
The next top-level command to execute
The next command to execute in a debugging session
The last command was incomplete and R requests more input to complete it
Some running R code requests input via readline() or menu()
We currently use heuristics to determine these cases (see prompt_info).
Since posit-dev/ark#346, we have made the detection of debug prompts more reliable at the expense of the detection of readline prompts. Here is a reprex:
Ark drops in the debugger again, inside readline().
Possible fixes:
Eventually we would like to contribute an extended ReadConsoleExt() hook to R where contextual information would be passed via a struct. Then we would know for sure what kind of prompts we're dealing with.
In the meantime we could detect readline() or menu() on the stack and never drop in the debugger in that case, and instead treat the prompt like a readline request. However that would get us in a weird state with debug(readline) (or a user stepping in it by accident with F11).
We could match Browse[%d]> in the prompt string. If it matches, it's a browser prompt, otherwise, it's a readline prompt running within a debug session. We could still be tricked by readline("Browse[0]> ") but I think that's ok.
The text was updated successfully, but these errors were encountered:
When R requests inputs, we don't know for sure what is the intent:
readline()
ormenu()
We currently use heuristics to determine these cases (see prompt_info).
Since posit-dev/ark#346, we have made the detection of debug prompts more reliable at the expense of the detection of readline prompts. Here is a reprex:
Ark drops in the debugger again, inside
readline()
.Possible fixes:
Eventually we would like to contribute an extended
ReadConsoleExt()
hook to R where contextual information would be passed via a struct. Then we would know for sure what kind of prompts we're dealing with.In the meantime we could detect
readline()
ormenu()
on the stack and never drop in the debugger in that case, and instead treat the prompt like a readline request. However that would get us in a weird state withdebug(readline)
(or a user stepping in it by accident with F11).We could match
Browse[%d]>
in the prompt string. If it matches, it's a browser prompt, otherwise, it's a readline prompt running within a debug session. We could still be tricked byreadline("Browse[0]> ")
but I think that's ok.The text was updated successfully, but these errors were encountered: