VsLinuxDebug icon indicating copy to clipboard operation
VsLinuxDebug copied to clipboard

[Enhancement] Writing to stdin while debugging

Open markoheric opened this issue 3 months ago • 3 comments

Is there a way to capture stdin? For example, when the console program asks user for input, and user needs to write or select an option.

Of course the workaournd is to run the program in terminal and then attach to it to debug it. But this extension is very handay and I was looking if this would be possible to do.

markoheric avatar Nov 02 '25 18:11 markoheric

🤔

DamianSuess avatar Nov 03 '25 17:11 DamianSuess

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Nov 14 '25 18:11 stale[bot]

I'm sorry if I wasn't clear. The issue I am trying to get across is, if there is a way to have access to standard input of the program under debug from the visual studio to simplify the debugging workflow of the program that requires input.

markoheric avatar Nov 14 '25 18:11 markoheric

At this time, there is not. The current workaround we've been using for input parameters is to manually massage it during a breakpoint.

In a future release, I will be adding the ability to modify the launchSettings.json file and supply commandLineArgs. Of course, apps would have to have a "shim" to know this is for debugging only and to auto-input.

Would this suffice, or is there something else that you were thinking of?

DamianSuess avatar Nov 15 '25 13:11 DamianSuess