Skip to content

(vsc-ext:) Stale JGD_SOCKET prevents connection after VS Code reload #63

Closed

Description

@grantmcdermott

After reloading the VS Code window (or restarting VS Code), jgd::jgd() fails to connect with this message:

R 4.5.3> jgd::jgd()
jgd: cannot find socket path. Pass socket= to jgd() or start the rendering server.
Warning message:
In jgd::jgd() :
  jgd: could not connect to renderer. Plots will be recorded but not displayed until connection is established.

After troubleshooting with Claude a bit, I believe the underlying cause is that the extension's persistent (by default) environmentVariableCollection setting. So VS Code replays the old JGD_SOCKET value into terminals before the extension re-activates with a new socket path. Since JGD_SOCKET takes priority over discovery, R tries the stale path instead of reading the (correct) discovery file.

Hopefully a simple fix. PR incoming soon...

Related: REditorSupport/vscode-R#1706 (comment)

Activity

  1. added a commit that references this issue on Jun 4, 2026
    ae3283b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions