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
Support targeting different terminals for running/debugging #99
Seems that MS have done debug support for integrated terminal; I've asked if they might ship it in the August release but we should branch this from debugger for now just in case it doesn't.
@devoncarew I had a quick look at this to see how complicated it could be. I've pushed a minor change to a branch as a PoC. It seems to mostly work! There are some issues:
Can't get stdout when launching, so we need to set the observatory port up-front (I'm currently leaving it as default, but we'll probably have to randomly generate? Need to check if MS do something better in their node one)
If you launch "without debugger", Code doesn't know when it terminates and so appears to be stuck "running" even when it terminates (there's some dirty hack in their node sample that polls for the process; wonder if we could do something better?)
I've left the original code as runStandalone but if we can confirm that Code >=1.5 always sends supportsRunInTerminal=true and the constraint changes will disallow installing in 1.4, we could ditch all that.
Interested in your thoughts! Feel free to make changes if you want; it's unlikely I'll get any more time on this before late Friday.
Seems like this debug feature is being shipped disabled in 1.5, so bumping this to later. I really want to ship rename/codefixes/basic debugging in the next week or so.
I can not still satisfied because my terminal is exist running the code within 3s and I did not even notice what was the output. can someone explain this to me?
@Aung-Thiha112 Do you mean the output is disappearing? The Terminal should remain available after the application finishes - is that not what you see? If not, please file a new issue with details.
hello, why my flutter project doesn't support setting "console": "terminal", in the launch.json? but the dart project allow that
➜ ~ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.7.11, on macOS 13.6 22G120 darwin-arm64, locale en-CN)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.0)
[✓] Android Studio (version 2022.3)
[✓] VS Code (version 1.83.1)
[✓] VS Code (version 1.83.1)
[!] Proxy Configuration
! NO_PROXY is not set
[✓] Connected device (2 available)
[✓] HTTP Host Availability
! Doctor found issues in 1 category.
@kyrosle it's not possible because of the way Flutter works. That setting is to tell VS Code to execute the script so you can use things like stdin.readline(). In Flutter, this isn't possible because a) the program may be running on another device where you can't access stdin and b) the debugger has to interact with the flutter tool over stdin/stdout (which it can't do if it's running in a terminal it has no access to).
my project has lots of log, info, warn, debug and error, i used to writing code in vscode and running the program in jetbrain android studio, but recently i want to make all development in vscode, and then i found that the vscode debug consle is so hard to watch the log message. vscode debug console only support filter the log message...
i think i could using the intergate terminal instead of the debug console, cos of, the intergate terminal support the searching text, or i can watch the log message in the output window, btw, it is possible that similar with jb debug console by open a new window to show the flutter output?
Thanks for the info. Unfortunately I don't know a great way to do this - it sounds like it might be worth filing a VS Code issue for being able to Find (not filter) in the Debug Console.
As a workaround, you could use flutter run to run your application in the terminal, but you would lose debug functionality. You could get some of this back by then running Debug: Attach to Flutter to attach the debugger to the instance you're running from the terminal, but it's a little clunky.
@kyrosle yes, that's an existing feature request for Find in the Debug Console. I thought there was already an issue but hadn't been able to find it when I wrote the comment above. Please add your 👍 to that issue.
Activity
DanTup commentedon Aug 29, 2016
Seems that MS have done debug support for integrated terminal; I've asked if they might ship it in the August release but we should branch this from
debuggerfor now just in case it doesn't.Feature info: microsoft/vscode#10574
Implementation in the Node debugger: microsoft/vscode-node-debug#85
We'll need to bump our code version to 1.5 for this and the debug adapter/protocol versions too. I believe it'll work in Insiders builds from Monday.
DanTup commentedon Aug 31, 2016
@devoncarew I had a quick look at this to see how complicated it could be. I've pushed a minor change to a branch as a PoC. It seems to mostly work! There are some issues:
runStandalonebut if we can confirm that Code>=1.5always sendssupportsRunInTerminal=trueand the constraint changes will disallow installing in 1.4, we could ditch all that.Interested in your thoughts! Feel free to make changes if you want; it's unlikely I'll get any more time on this before late Friday.
DanTup commentedon Aug 31, 2016
Seems like this debug feature is being shipped disabled in 1.5, so bumping this to later. I really want to ship rename/codefixes/basic debugging in the next week or so.
59 remaining items
Implement basic support for running in terminal to support reading st…
Implement basic support for running in terminal to support reading st…
Thiha112 commentedon May 30, 2020
I can not still satisfied because my terminal is exist running the code within 3s and I did not even notice what was the output. can someone explain this to me?
DanTup commentedon Jun 1, 2020
@Aung-Thiha112 Do you mean the output is disappearing? The Terminal should remain available after the application finishes - is that not what you see? If not, please file a new issue with details.
kyrosle commentedon Oct 25, 2023
hello, why my flutter project doesn't support setting
"console": "terminal",in the launch.json? but the dart project allow thatDanTup commentedon Oct 25, 2023
@kyrosle it's not possible because of the way Flutter works. That setting is to tell VS Code to execute the script so you can use things like
stdin.readline(). In Flutter, this isn't possible because a) the program may be running on another device where you can't access stdin and b) the debugger has to interact with thefluttertool over stdin/stdout (which it can't do if it's running in a terminal it has no access to).Can you explain what it is you're trying to do?
kyrosle commentedon Oct 25, 2023
my project has lots of log, info, warn, debug and error, i used to writing code in vscode and running the program in jetbrain android studio, but recently i want to make all development in vscode, and then i found that the vscode debug consle is so hard to watch the log message. vscode debug console only support filter the log message...
i think i could using the intergate terminal instead of the debug console, cos of, the intergate terminal support the searching text, or i can watch the log message in the output window, btw, it is possible that similar with jb debug console by open a new window to show the flutter output?
DanTup commentedon Oct 25, 2023
Thanks for the info. Unfortunately I don't know a great way to do this - it sounds like it might be worth filing a VS Code issue for being able to Find (not filter) in the Debug Console.
As a workaround, you could use
flutter runto run your application in the terminal, but you would lose debug functionality. You could get some of this back by then running Debug: Attach to Flutter to attach the debugger to the instance you're running from the terminal, but it's a little clunky.kyrosle commentedon Oct 31, 2023
is any possible to achive it by this way? microsoft/vscode#4338 (comment)
DanTup commentedon Oct 31, 2023
@kyrosle yes, that's an existing feature request for Find in the Debug Console. I thought there was already an issue but hadn't been able to find it when I wrote the comment above. Please add your 👍 to that issue.