Skip to content

Support targeting different terminals for running/debugging #99

Closed

Description

@DanTup

@devoncarew Looks like this is going into September release, so probably around 6 weeks away:

microsoft/vscode#10574

The initial terminal API is marked for August.

We need to check whether we can require that version of Code when it happens, else we'll have to make this conditional.

Marking as v1 because I'd love to have it, but it's probably wishful. If we end up wanting to ship a v1 before this is usable, we'll bump it back.

Activity

  1. added
    is enhancementAn enhancement or improvement that should be listed in release notes but is not a bug fix.
    on Aug 16, 2016
  2. added this to the v1.0 milestone on Aug 16, 2016
  3. modified the milestones: v1.0, on Aug 27, 2016
  4. DanTup commented on Aug 29, 2016

    @DanTup
    MemberAuthor

    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.

    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.

  5. DanTup commented on Aug 31, 2016

    @DanTup
    MemberAuthor

    @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:

    1. 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)
    2. 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?)
    3. 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.

  6. DanTup commented on Aug 31, 2016

    @DanTup
    MemberAuthor

    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.

  7. added this to the milestone on Aug 31, 2016
  8. 59 remaining items

  9. added a commit that references this issue on Nov 14, 2019
    3ed811b
  10. modified the milestones: v3.7.0, On Deck on Nov 14, 2019
  11. added a commit that references this issue on Nov 20, 2019
    304188e
  12. modified the milestones: On Deck, v3.7.0 on Nov 20, 2019
  13. Thiha112 commented on May 30, 2020

    @Thiha112

    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?

  14. DanTup commented on Jun 1, 2020

    @DanTup
    MemberAuthor

    @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.

  15. kyrosle commented on Oct 25, 2023

    @kyrosle

    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.
    
  16. DanTup commented on Oct 25, 2023

    @DanTup
    MemberAuthor

    @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).

    Can you explain what it is you're trying to do?

  17. kyrosle commented on Oct 25, 2023

    @kyrosle

    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?

  18. DanTup commented on Oct 25, 2023

    @DanTup
    MemberAuthor

    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.

  19. kyrosle commented on Oct 31, 2023

    @kyrosle

    is any possible to achive it by this way? microsoft/vscode#4338 (comment)

  20. DanTup commented on Oct 31, 2023

    @DanTup
    MemberAuthor

    @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.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    in dartRelates to running Dart programsin debuggingRelates to the debug adapter or process of running debug sessionsis enhancementAn enhancement or improvement that should be listed in release notes but is not a bug fix.

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions