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
{{ message }}
Repository navigation
Allow setting a default value for launch config's "console" field if not explicitly specified #3169
Describe the bug
As instructed, I set "console" : "terminal" in my launch.json. I expected that running my command-line app would then send output to the integrated terminal, and accept typing as stdin for the app.
No, the stdout still went to the debug console, and I am unable to provide input.
To Reproduce
Steps to reproduce the behavior:
Set launch.json as indicated.
Start dart debugging a CLI app that prints to stdout, and reads from stdin.
Expected behavior
I expected that running my command-line app would then send output to the integrated terminal, and accept typing as stdin for the app.
Screenshots
If applicable, add screenshots to help explain your problem.
Versions (please complete the following information):
VS Code version: 1.53.2 (mac)
Dart extension version: 3.19.2
Dart/Flutter SDK version: Dart SDK version: 2.12.0-259.16.beta (beta) (Tue Feb 23 00:10:18 2021 +0100) on "macos_x64"
This issue has been marked stale because it is tagged awaiting-info for 30 days with no activity. Remove the stale label or comment to prevent the issue being closed in 10 days.
Aha. I see it. "debug":"console" must be not only be in a newly created launch.json (aside: why can't I set this globally?), but also doesn't trigger if you select the "debug" option from "run | debug" just above main(). But with those caveats, the feature does work... it's just an annoying extra step to have to edit launch.json for each new project.
but also doesn't trigger if you select the "debug" option from "run | debug" just above main()
Ah yes, that's because those are their own launch configurations, they're not the same as using the commands (which run the selected confirmation from the debug side bar).
changed the title [-]"console" : "terminal" not using integrated terminal for debugging[/-][+]Allow setting a default value for launch config's "console" field if not explicitly specified[/+]on Apr 1, 2021
Sounds like a fair request - I'll reuse this issue for having an option to set a default, for if it's not specified on the launch config. That would also make the default Run/Debug codelens links use it.
Activity
DanTup commentedon Mar 1, 2021
I've not been able to reproduce this, it seems to work from my testing:
Could you try capturing a log ("Dart: Capture Debugging Logs") when launching the app?
github-actions commentedon Apr 1, 2021
This issue has been marked stale because it is tagged awaiting-info for 30 days with no activity. Remove the stale label or comment to prevent the issue being closed in 10 days.
RandalSchwartz commentedon Apr 1, 2021
Aha. I see it. "debug":"console" must be not only be in a newly created launch.json (aside: why can't I set this globally?), but also doesn't trigger if you select the "debug" option from "run | debug" just above main(). But with those caveats, the feature does work... it's just an annoying extra step to have to edit launch.json for each new project.
DanTup commentedon Apr 1, 2021
Ah yes, that's because those are their own launch configurations, they're not the same as using the commands (which run the selected confirmation from the debug side bar).
You can, however, add custom code lens links (see https://dartcode.org/docs/custom-codelens/), so you could have "Run in Terminal". / "Debug in Terminal" links there.
[-]"console" : "terminal" not using integrated terminal for debugging[/-][+]Allow setting a default value for launch config's "console" field if not explicitly specified[/+]DanTup commentedon Apr 1, 2021
Sounds like a fair request - I'll reuse this issue for having an option to set a default, for if it's not specified on the launch config. That would also make the default Run/Debug codelens links use it.