You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Session watcher not attaching R and not showing plots #552
After Remote-SSH-ing into the host, I clicked to open a folder, and selected my home directory, so I believe my workspace in this case is my home directory.
r$> ls.str(.vsc)
attach : function ()
capture_str : function (object)
check_null_dev : function ()
dataview_data_type : function (x)
dataview_table : function (data)
dir_extension : chr "/home/cmr46993/.vscode-R"
dir_plot_history : chr "/tmp/RtmpJP79ua/vscode-R/images"
dir_session : chr "/tmp/RtmpJP79ua/vscode-R"
get_timestamp : function ()
globalenv_file : chr "/tmp/RtmpJP79ua/vscode-R/globalenv.json"
globalenv_lock_file : chr "/tmp/RtmpJP79ua/vscode-R/globalenv.lock"
homedir : chr "/home/cmr46993"
inspect_env : function (env)
new_plot : function ()
null_dev_id : Named int 2
null_dev_size : num [1:2] 10.1 10.1
path_to_uri : function (path)
pid : int 175564
plot_file : chr "/tmp/RtmpJP79ua/vscode-R/plot.png"
plot_history_file : NULL
plot_lock_file : chr "/tmp/RtmpJP79ua/vscode-R/plot.lock"
plot_updated : logi FALSE
print.help_files_with_topic : function (h, ...)
print.hsearch : function (x, ...)
rebind : function (sym, value, ns)
request : function (command, ...)
request_browser : function (url, title, ..., viewer)
request_file : chr "/home/cmr46993/.vscode-R/request.log"
request_lock_file : chr "/home/cmr46993/.vscode-R/request.lock"
rstudioapi_enabled : function ()
show_browser : function (url, title = url, ..., viewer = getOption("vsc.browser", "Active"))
show_dataview : function (x, title, viewer = getOption("vsc.view", "Two"))
show_globalenv : logi TRUE
show_page_viewer : function (url, title = NULL, ..., viewer = getOption("vsc.page_viewer", "Active"))
show_plot : logi TRUE
show_view : logi TRUE
show_viewer : function (url, title = NULL, ..., viewer = getOption("vsc.viewer", "Two"))
show_webview : function (url, title, ..., viewer)
tempdir : chr "/tmp/RtmpJP79ua"
unbox : function (x)
update_globalenv : function (...)
update_plot : function (...)
wd : chr "/home/cmr46993"
As an alternative, I tried also right now: after Remote-SSH-ing into the host, I clicked to open a single R script, rather than a folder, but I still don't get R attached, and ls.str(.vsc) looks the same.
Hi @renkun-ken I think I've figured out the issue!!
As I said above, when I use R: Create R Terminal I am able to view plots. I noticed that the plots are saved to: /tmp/<random_id>/vscode-R/plot.png
However, I mistakenly left out a key step in how I was trying to use session viewer, I'll rewrite it out bolding the missing step I forgot to mention I was doing:
From VSCode in Windows 10, connect to linux host login node with Remote-SSH
Open home directory ~/
Open new terminal with VS Code
Use srun to get an interactive compute node. Activate conda environment where R and radian are installed
Run radian from Terminal pane (I do see my print statement 'this is my rprofile')
If I run plot(1:10, 1:10) I don't see a plot.
The key here is that login-node/tmp/ is different from compute-node/tmp/
My remote host is an HPC, so I don't want to do heavy computational work on the login node. I want to use a compute node. I think what is happening is that r session watcher is still looking for vscode-r plots in login-node/tmp/ but my plots are actually saved to the compute-node/tmp directory.
Is there a way to change the tmp directory? For e.g., if I can put it in $HOME/tmp then I think this could solve my problem since $HOME is the same, whether I'm on a login or compute node?
EDIT: indeed, I have confirmed that r session watcher works if I don't get an interactive node :)
Reacted by Adarsh Mathew, Gabriel Medeiros Abrahão and Zessi-C
Activity
renkun-ken commentedon Feb 10, 2021
What's your workspace folder in vscode remote-ssh session?
What's the value of
ls.str(.vsc)in your R session?radlinsky commentedon Feb 10, 2021
After Remote-SSH-ing into the host, I clicked to open a folder, and selected my home directory, so I believe my workspace in this case is my home directory.
As an alternative, I tried also right now: after Remote-SSH-ing into the host, I clicked to open a single R script, rather than a folder, but I still don't get R attached, and
ls.str(.vsc)looks the same.radlinsky commentedon Feb 11, 2021
Hi @renkun-ken I think I've figured out the issue!!
As I said above, when I use
R: Create R TerminalI am able to view plots. I noticed that the plots are saved to:/tmp/<random_id>/vscode-R/plot.pngHowever, I mistakenly left out a key step in how I was trying to use session viewer, I'll rewrite it out bolding the missing step I forgot to mention I was doing:
The key here is that
login-node/tmp/is different fromcompute-node/tmp/My remote host is an HPC, so I don't want to do heavy computational work on the login node. I want to use a compute node. I think what is happening is that r session watcher is still looking for vscode-r plots in
login-node/tmp/but my plots are actually saved to thecompute-node/tmpdirectory.Is there a way to change the tmp directory? For e.g., if I can put it in
$HOME/tmpthen I think this could solve my problem since $HOME is the same, whether I'm on a login or compute node?EDIT: indeed, I have confirmed that r session watcher works if I don't get an interactive node :)
fabern commentedon Mar 22, 2021
I'm myself just getting started using SSH in VSCode.
@radlinsky As an alternative to your statements:
and:
Have you considered SSH'ing directly into the compute node with VSCode? Following: https://stackoverflow.com/a/66389686
Does that make any difference?
github-actions commentedon May 22, 2022
This issue is stale because it has been open for 365 days with no activity.
github-actions commentedon Jun 5, 2022
This issue was closed because it has been inactive for 14 days since being marked as stale.