-
Notifications
You must be signed in to change notification settings - Fork 130
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
Unable to attach terminal with Google Drive (Drive File Stream) #179
Comments
@Koohoko Good timing, we just updated the README today with a fix for Windows! Could you try changing the line in your
Thank you. |
@Koohoko Thanks for reporting! It looks like
If all above do not apply, would you like to post the output of the following command: ls.str(getOption("vscodeR")) and the path of your workspace folder you open in VSCode? |
@renkun-ken Thank you so much! The issue is fixed. It turns out that it was indeed the inconsistent workspace that caused the problem. Thanks for your amazing work. |
@andycraig Thanks for your comment, the updated version works just fine, but later I found out that my problem was caused by other wrong configurations. |
@renkun-ken |
@Koohoko It looks like there's a According to https://stat.ethz.ch/R-manual/R-devel/library/base/html/Startup.html, if a local We'll document this in README soon and probably add a command for user to edit |
Thanks @renkun-ken . I think I am on a right direction. It seems that things are more complicated on my environment, where my I did some experiment on my machine: Case 1 (session watcher working fine)
r$> ls.str(getOption("vscodeR"))
attach : function ()
dataview : function (x, title)
dataview_data_type : function (x)
dataview_table : function (data)
dir : chr "C:\\Users\\kooho\\.vscode\\vscode-R"
dir_session : chr "C:\\Users\\kooho\\.vscode\\vscode-R/14704"
globalenv_file : chr "C:\\Users\\kooho\\.vscode\\vscode-R/14704/globalenv.json"
pid : int 14704
plot_file : chr "C:\\Users\\kooho\\.vscode\\vscode-R/14704/plot.png"
plot_updated : logi FALSE
rebind : function (sym, value, ns)
respond : function (command, ...)
response_file : chr "C:\\Users\\kooho\\.vscode\\vscode-R/response.log"
tempdir : chr "C:\\Users\\kooho\\AppData\\Local\\Temp\\Rtmp881VBt"
update : function (...)
r$> Sys.getenv("R_USER")
[1] "C:\\Users\\kooho\\Documents"
r$> getwd()
[1] "C:/Users/kooho" Case 2 (session watcher not working, seems
|
@Koohoko Thanks for your detailed experimentation. Let me clarify more on the paths. On Windows, R will source normalizePath("~/.Rprofile") Let's ensure this file is correctly edited to contain the code to source source(file.path(Sys.getenv(if (.Platform$OS.type == "windows") "USERPROFILE" else "HOME"), ".vscode-R", "init.R")) When you say your VSCode workspace and R working directory are both |
Thanks @renkun-ken for the detailed explanation. Sorry I was not sure whether I am getting the workspace folder set up correctly, would you please take a look at the below screenshot which I tried to reproduce the Case 3 scenario. Thanks for your kind help! |
@Koohoko From your screenshots, the workspace folder in your VSCode is Would you like to go to When the session is attached, there will be logging about reading response file and got pid, etc. It looks like vscode-R cannot watch the |
It looks like Maybe I should file an PR that adds more logging to session watcher to show which part does not work in your case. Just notice that @Ikuyadeu released a new version very recently, would you please try the latest version and see if the problem still persists, @Koohoko? |
@Koohoko I build a version based on current master but adds more logging to session watcher (master...renkun-ken:more-logging). You may try this build and see the logging in the developer tools. |
@renkun-ken |
@Koohoko Thanks. It looks like the responseWatcher does not manage to capture any changes in |
@renkun-ken I think I know what happened here.. The |
@Koohoko It seems that VSCode does not work well with workspace open in a Google Drive (e.g. microsoft/vscode#74117, microsoft/vscode#69333). According to microsoft/vscode#79421, the virtual filesystem provider does not seem to implement |
@renkun-ken Thanks again for this amazing project! |
I am using Windows 10 OS, and when I tried to use the session watcher, the R terminal cannot be attached. (neither auto attach or manually
getOption('vscodeR')$attach()
)I observed
response.log
was changing over time (as below), but obviously there was no attached R session or any expected window pop-up for dataview.The text was updated successfully, but these errors were encountered: