positron icon indicating copy to clipboard operation
positron copied to clipboard

R: Evaluating commands in the console while debugging focuses debug editor

Open lionel- opened this issue 1 year ago • 2 comments

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.

lionel- avatar May 15 '24 07:05 lionel-

Also reported by @jeremy-allen in https://positpbc.slack.com/archives/C05M2EZCPGR/p1716043709791679.

jmcphers avatar May 18 '24 23:05 jmcphers

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...

FinYang avatar Aug 22 '24 16:08 FinYang

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

etiennebacher avatar Dec 09 '24 14:12 etiennebacher

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

midleman avatar May 22 '25 14:05 midleman