Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show httpgd plot on attach #852

Merged
merged 1 commit into from
Nov 13, 2021
Merged

Show httpgd plot on attach #852

merged 1 commit into from
Nov 13, 2021

Conversation

renkun-ken
Copy link
Member

@renkun-ken renkun-ken commented Nov 1, 2021

What problem did you solve?

Close #832

This PR moves the separate httpgd request url into the attach request. If a httpgd device is open, then its url is also sent to session watcher on attach.

This PR also removes the code to send vsc.plot back to session watcher as it is already defined as r.session.viewers.viewColumn.plot in vscode settings.

(If you do not have screenshot) How can I check this pull request?

  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 first session should be attached and the httpgd plot viewer should also appear.

@ElianHugh
Copy link
Collaborator

Thanks for this - it works as expected on my laptop. I'd like to double check the interaction with Live Share, but won't have access until tomorrow

@renkun-ken
Copy link
Member Author

In a live share session, it looks like the guest does not handle httpgd request in the first place. What's the expected behavior?

Copy link
Collaborator

@ElianHugh ElianHugh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your patience - LGTM! Guests should have the host's httpgd session shared with them, but technically it is the host that is doing the attaching.

@renkun-ken renkun-ken merged commit 4be0d04 into master Nov 13, 2021
@ManuelHentschel ManuelHentschel deleted the attach-plot branch November 27, 2021 13:03
ElianHugh pushed a commit to ElianHugh/vscode-R that referenced this pull request May 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Session watcher cannot attach to session with httpgd device open
2 participants