Skip to content

Session watcher cannot attach to session with httpgd device open #832

@renkun-ken

Description

@renkun-ken

Describe the bug

If an httpgd device is open, then session watcher cannot attach to the session if r.plot.useHttpgd is enabled.

To Reproduce
Steps to reproduce the behavior:

Ensure httpgd is installed and r.plot.useHttpgd is enabled.

  1. Open a workspace folder.
  2. Create R terminal and session watcher attaches to the R session.
  3. Run plot(rnorm(100)) and close the httpgd plot viewer.
  4. Create another R terminal and session watcher attaches to the new R session.
  5. Go to the first R terminal and run "Attach active terminal" or click the status bar item.
  6. The plot created in the first R terminal shows but the session watcher does not attach to it as indicated by the pid shown in the status bar item.
  7. Use dev.off() to close the device in the first terminal, and then it could be attached.

It is caused by that attaching the first R terminal makes it write two consecutive requests to ~/.vscode-R/request.log, the request to reveal the plot viewer overwrites the attach request.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions