R: Evaluating commands in the console while debugging focuses debug editor
Reported in https://github.com/posit-dev/positron-beta/discussions/148#discussioncomment-9434927 Also reported by @hadley.
https://github.com/posit-dev/positron/assets/4465050/46daadc5-91f9-4c0a-a563-602b2c694fcf
Ideally we would only focus the debug editor after a step.
Also reported by @jeremy-allen in https://positpbc.slack.com/archives/C05M2EZCPGR/p1716043709791679.
Possibly related to #2786.
This is a serious issue for me. I often write long pipelines using tools like targets, and the ability to go into a function to explore local objects is a must. I often even start with an empty function with only a browser() call inside, and write everything while in debugger. This makes debugging almost impossible. Might need to go back to RStudio for a while because of this...
This is quite annoying and also appears when one saves any document while debugging. In the example below, when I save the changes in bar.R, the focus is brought back to the browser() call in foo.R:
https://github.com/user-attachments/assets/43daab4c-d2c8-445a-ae2f-a7ea3f3d943f
Verified Fixed
Positron Version(s) : 2025.06.0-124 OS Version(s) : MacOS
Test scenario(s)
Confirmed focus is preserved when user evaluates expression during debug session.
Link(s) to test cases run or created:
https://github.com/posit-dev/positron/pull/7800