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

Use vscode debug console for output instead of terminal when "type": "cppdbg" #9696

Closed
yh-sb opened this issue Aug 7, 2022 · 3 comments
Closed

Comments

@yh-sb
Copy link

yh-sb commented Aug 7, 2022

Feature Request

Debug Console is a cool feature, but it turns out that it works with program output only when "type": "cppvsdbg" in launch.json.
In case of cppdbg type, common terminal is used for output.

Or am I using something wrong or this feature should be definitely added.

UPDATE: I found that "avoidWindowsConsoleRedirection": true fixes the problem and output is printed to debug console. I don't quite understand what's going on, Was it intentional? But why?

@yh-sb yh-sb changed the title Use Debug Console when debugging with "type": "cppdbg" Use Debug Console for output when "type": "cppdbg" Aug 7, 2022
@yh-sb yh-sb changed the title Use Debug Console for output when "type": "cppdbg" Use vscode debug console for output instead of terminal when "type": "cppdbg" Aug 7, 2022
@WardenGnaw
Copy link
Member

"avoidWindowsConsoleRedirection": true is the correct way to force the output to show in the Debug Console. If that is not set, we determine that users want to use the integrated terminal for input and output.

See https://code.visualstudio.com/docs/cpp/launch-json-reference#_avoidwindowsconsoleredirection

This is the default since Debug Console does not support input.

@github-actions
Copy link

github-actions bot commented Aug 9, 2022

This issue has been closed because the described behavior was determined to be by design.

@github-actions github-actions bot closed this as completed Aug 9, 2022
@yh-sb
Copy link
Author

yh-sb commented Sep 19, 2022

I found that "avoidWindowsConsoleRedirection": true has no effect on Linux. What is the way to output to Debug Console on Linux?

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

No branches or pull requests

2 participants