Skip to content
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

Add "console" option to open itegrated terminal instead of internal console #147

Open
eitsupi opened this issue Jul 25, 2021 · 2 comments
Open

Comments

@eitsupi
Copy link

eitsupi commented Jul 25, 2021

Related to microsoft/vscode-dev-containers#954 (comment)

The Python extension allows we to debug in the integrated terminal instead of the debug console.
https://github.com/microsoft/vscode-dev-containers/blob/6812f841c3e894963b83eefb091bcd7565fc6507/containers/python-3/.vscode/launch.json#L12

It may be easier for beginners to understand if the integrated terminal can be used in the same way as the Run sauce command in vscode-R.

@ManuelHentschel
Copy link
Owner

ManuelHentschel commented Jul 25, 2021

Thanks for the suggestion. I'd really like to add such a mode, but this requires some substantial changes/improvements to the R-package vscDebugger to work properly.

Currently, the "normal" debug mode works by launching a new R process in the background each time you launch the debugger. This is done so that the extension has full control over the input/output and program flow of the R process. Unfortunately, this is incompatible with having the R process run in an internal console and letting the user write to its stdin.

In order to manage the R process yourself, you can use the functions .vsc.listenForDAP() or .vsc.startWebsocket(), together with the debug config Attach to R process from the default launch config. These are rather experimental and buggy, though, so I wouldn't want to add them as a recommended debug mode.

@eitsupi
Copy link
Author

eitsupi commented Jul 26, 2021

@ManuelHentschel Thank you for your detailed answer. I now understand that it cannot be implemented immediately.

When adding RDebugger to the R container in microsoft/vscode-dev-containers, it seems best to describe the difference between normal execution and debugging behavior in the documentation at this time.

Thank you for your numerous great works!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants