Skip to content
Discussion options

You must be logged in to vote

Workaround: run R: Attach External R Session once per window. It writes an attach script that lives until your window closes or reloads. Source newest script from your debugged code, macOS path shown:

f <- Sys.glob("~/Library/Application Support/Code/User/globalStorage/reditorsupport.r/tmp/attach/vscode-r-*.R")
if (length(f)) source(f[which.max(file.mtime(f))])

Script path:

vscode-R/src/session.ts

Lines 1226 to 1229 in e2b28f1

function getAttachSessionScriptPath(pipePath: string): string {
const scriptBase = path.basename(pipePath).replace(/[^a-zA-Z0-9_.-]/g, '_') || 'attach_session';
return path.join(extensionContext.globalStorageUri.fsPath, 'tmp', 'attach', `${scri…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@katrinabrock
Comment options

@Alox1d
Comment options

Answer selected by ThomasSoeiro
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants