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
Describe the solution you'd like
Ctrl + Enter sends to the debug window if inDebugMode.
Describe alternatives you've considered
I have mapped editor.debug.action.selectionToRepl to Ctrl + Enter if inDebugMode is set. This works but I need to select the code I want to send. I'd like to take advantage of this extension's ability to detect the R code to send to the debug window.
Additional context
Thanks for the great extension!
I changed the "when" for Ctrl+Enter to include !inDebugMode, now I can select code and press Ctrl + Enter to send code to the debug console. The default command "editor.debug.action.selectionToRepl" does that. It would be great if this extension enhanced this to send the current line and/or expression to the REPL.
Do we need help from the R language server (or does this even belong there)?
Ideally, this should be possible without any changes to VSCode-R-Debugger, using something similar to the command editor.debug.action.selectionToRepl or debug.replPaste. It's a bit annoying that there seems to be no command to send arbitrary text to the repl, just the selection/clipboard.
A workaround might be to determine which code to send, using the existing functions from this package, then quickly select that text, call editor.debug.action.selectionToRepl and revert the selection (or accordingly using the clipboard, though at first glance that command only seems to paste the code without running it).
Not as far as I'm aware. An extension can send custom commands to a debug session, using vscode.DebugSession.customRequest or access any of the normal commands, but there seems to be no command/function to send arbitrary text.
A workaround might be to determine which code to send, using the existing functions from this package, then quickly select that text, call editor.debug.action.selectionToRepl and revert the selection (or accordingly using the clipboard, though at first glance that command only seems to paste the code without running it).
This could be implemented by the vscode-R extension instead, but feels a bit hacky.
Activity
krlmlr commentedon Mar 17, 2021
@ManuelHentschel Does this require help from VSCode-R-Debugger? AFAICT the Python extension has a similar command: microsoft/vscode-python#14494.
krlmlr commentedon Mar 17, 2021
I changed the "when" for Ctrl+Enter to include!inDebugMode, now I can select code and press Ctrl + Enter to send code to the debug console. The default command "editor.debug.action.selectionToRepl" does that. It would be great if this extension enhanced this to send the current line and/or expression to the REPL.Do we need help from the R language server (or does this even belong there)?
CC @renkun-ken.
ManuelHentschel commentedon Mar 17, 2021
Ideally, this should be possible without any changes to VSCode-R-Debugger, using something similar to the command
editor.debug.action.selectionToReplordebug.replPaste. It's a bit annoying that there seems to be no command to send arbitrary text to the repl, just the selection/clipboard.A workaround might be to determine which code to send, using the existing functions from this package, then quickly select that text, call
editor.debug.action.selectionToRepland revert the selection (or accordingly using the clipboard, though at first glance that command only seems to paste the code without running it).krlmlr commentedon Mar 17, 2021
Yeah, I forgot about "editor.debug.action.selectionToRepl". AFAICT this commands sends and executes, at least after I mark the line with Ctrl + L.
Can an extension send arbitrary text to the REPL?
ManuelHentschel commentedon Mar 17, 2021
Not as far as I'm aware. An extension can send custom commands to a debug session, using
vscode.DebugSession.customRequestor access any of the normal commands, but there seems to be no command/function to send arbitrary text.This could be implemented by the
vscode-Rextension instead, but feels a bit hacky.Sandy4321 commentedon Jul 22, 2022
will it work for python debugging ?
Send code to debug window for current code line with cursor
Sandy4321 commentedon Jul 22, 2022
like
https://www.youtube.com/watch?v=VXJChVF28jw
How To Run Selected Lines In VS Code (Visual Studio Code)
how to find exact text to update key binding json file ?