ManuelHentschel / VSCode-R-Debugger

R Debugger Extension for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=RDebugger.r-debugger
MIT License
170 stars 11 forks source link

Can't view data and print figures at the same time. #180

Open hjnnjh opened 12 months ago

hjnnjh commented 12 months ago

I just add a .Rprofile according to this. I can view data in vscode now. However, the function of printing figures vanished. Before adding the .Rprofile, Quartz will provide the function to show figures but I can't view data via X11. The X11 support of my R seems incomplete because I installed R via brew. BTW, I' m using httpgd to show figures in vscode. May I ask why there is such a problem? Is there a way to fix this? image

hjnnjh commented 12 months ago

Maybe reinstall R from CRAN is an alternative way to solve this problem.

ManuelHentschel commented 12 months ago

From personal experience, this extension does not work well with httpgd + vscode-R. In my personal .Rprofile I have therefore disabled httpgd in debug sessions:

if(Sys.getenv('VSCODE_DEBUG_SESSION')=='1'){
    options(vsc.plot = FALSE)
    options(vsc.use_httpgd = FALSE)
}
hjnnjh commented 11 months ago

From personal experience, this extension does not work well with httpgd + vscode-R. In my personal .Rprofile I have therefore disabled httpgd in debug sessions:

if(Sys.getenv('VSCODE_DEBUG_SESSION')=='1'){
  options(vsc.plot = FALSE)
  options(vsc.use_httpgd = FALSE)
}

Thanks for your reply! I solved this problem by adding it to my .Rprofile.