Skip to content

When in debugger, any action in console changes active document #9918

Closed

Description

@hadley

System details

RStudio Edition : Desktop
RStudio Version : 2021.12.0 Build 91
OS Version      : 
R Version       : 

Steps to reproduce the problem

  1. Add the following code to a file, save it, and source it:

    a <- function() b()
    b <- function() c()
    c <- function() {
      x <- 10
      browser()
      x
    }
    a()
  2. Open a new document.

  3. Type 1 in the console and press enter.

  4. The active tab moves away from the new document and back to the source file

Describe the problem in detail

Describe the behavior you expected

Running code in the console shouldn't change the active tab

  • I have read the guide for submitting good bug reports.
  • I have installed the latest version of RStudio, and confirmed that the issue still persists.
  • If I am reporting an RStudio crash, I have included a diagnostics report.
  • I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.

Activity

  1. hadley commented on Oct 5, 2021

    @hadley
    MemberAuthor

    I'm pretty sure this is a reasonable recent regression, and it's super annoying when debugging.

  2. jmcphers commented on Oct 5, 2021

    @jmcphers
    Member

    The debugger does this intentionally in many cases; e.g. if you use a stepping command then it switches you back to the source window so you can see where the instruction pointer has moved. However, it shouldn't be doing it for any statement you run.

  3. hadley commented on Oct 5, 2021

    @hadley
    MemberAuthor

    Ah makes sense!

  4. valerie-rstudio commented on Oct 7, 2021

    @valerie-rstudio

    Verified Fixed

    RStudio Edition : Desktop
    RStudio Version : 2021.12.0-daily+110
    OS Version      : mac os 11.5.2
    R Version       : 4.1.1
    

    Verified that in the case outlined above, the focus now remains on the new document and does not return to the source file after typing into the console and pressing enter.

  5. jcrodriguez1989 commented on Dec 3, 2021

    @jcrodriguez1989

    This is also happening in

    RStudio Workbench
    2021.09.0 Build 351.pro6
    © 2009-2021 RStudio, PBC
    "Ghost Orchid" Release (50423e45, 2021-09-23) for Ubuntu Bionic
    Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.164 Safari/537.36
    

    and it is really annoying.
    Is there a way of disabling the Source Viewer forever?

    Thanks,

  6. 7 remaining items

  7. added this to the Chocolate Cosmos milestone on Mar 4, 2024
  8. ronblum commented on Mar 13, 2024

    @ronblum
    Contributor

    Verified in

    • RStudio Desktop 2024.04.0-daily+573 on MacOS 14.4
    • RStudio Server 2024.04.0-daily+573 on Ubuntu 22.04 via Chrome on MacOS 14.4

    using the example above.

  9. self-assigned this
    on Mar 13, 2024
  10. kevinushey commented on Aug 14, 2024

    @kevinushey
    Collaborator

    It looks like this issue is still present in RStudio Workbench -- I was able to reproduce on an internal RStudio Pro instance.

    Strangely, I was not able to reproduce locally with RStudio Desktop, or with an RStudio Server development instance, on macOS.


    RStudio 2024.04.2+764.pro1 "Chocolate Cosmos" Release (6536115, 2024-06-05) for Ubuntu Jammy
    Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36, Quarto 1.4.555 (/usr/lib/rstudio-server/bin/quarto/bin/quarto)

  11. ronblum commented on Aug 26, 2024

    @ronblum
    Contributor

    Verified in

    • Posit Workbench 2024.08.0+351.pro61 on Ubuntu 24 via Edge in Windows 11
    • RStudio Desktop 2024.08.0+351 on Windows 11 (regression check)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions