REditorSupport / vscode-R

R Extension for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=REditorSupport.r
MIT License
1.07k stars 128 forks source link

Code excecution in radian terminal randomly stops #882

Closed martinottmann closed 1 year ago

martinottmann commented 2 years ago

Hello there,

I have set up radian to run R code - and I did so successfully as R generally works in VSCode. However, fairly regularly some code snippets do not get executed when I hit 'control enter' or - when working with a RMarkdown document - I press the "Run Chunk" button. The code is sent to radian but then it appears to not get executed. The terminal doesn't even show the next line. Sometimes it helps to send the next command (or just even some random letter sequence plus hitting enter) and then the code gets executed. But sometimes even that doesn't help and I have to kill the terminal and start a new one. There is no error message of any sort.

It's not a code issue as it is never the same code snippet that causes this problem. The issue appears with any kind of code (e.g., loading data, plotting, basic data transformations). Also, when working on a RMarkdown document, I have no issues knitting it - even if I just encountered the problem described above with some code block contained therein.

Below are my relevant R settings in VSCode:

"r.sessionWatcher": true,
"r.rterm.windows": "C:\\\\Users\\\\XXXXX\\\\AppData\\\\Roaming\\\\Python\\\\Python37\\\\Scripts\\\\radian.exe",
"r.lsp.path": "C:\\Program Files\\R\\R-4.1.0\\bin\\R.exe",
"r.lsp.debug": false,
"r.rterm.option": [],
"r.plot.useHttpgd": true,
"r.session.viewers.viewColumn": {
        "viewer": "Active",
        "pageViewer": "Two",
        "view": "Active"
    },
"r.alwaysUseActiveTerminal": true,
"r.bracketedPaste": true

I searched far and wide for a solution but wasn't able to get to the bottom of this (or even solve it). Any help or pointers of how to fix is very much welcome.

I'm using:

randy3k commented 2 years ago

I just realize that it could be a trailing new line issue: see this for discussion.

github-actions[bot] commented 1 year ago

This issue is stale because it has been open for 365 days with no activity.

github-actions[bot] commented 1 year ago

This issue was closed because it has been inactive for 14 days since being marked as stale.