Skip to content

Support global expression evaluation inc. while not paused #906

Closed

Description

@DanTup

This was less useful for Dart, but for Flutter it could be useful to interact with an app while it's not paused on a breakpoint.

Activity

  1. added
    is enhancementAn enhancement or improvement that should be listed in release notes but is not a bug fix.
    in debuggingRelates to the debug adapter or process of running debug sessions
    on May 16, 2018
  2. added this to the On Deck milestone on May 16, 2018
  3. changed the title [-]Support using the Watch window when not paused[/-] [+]Support using the Watch window/Debug console evaluation when not paused[/+] on May 27, 2018
  4. added a commit that references this issue on Jul 4, 2018
    80309cb
  5. modified the milestones: On Deck, v2.16.0 on Jul 10, 2018
  6. changed the title [-]Support using the Watch window/Debug console evaluation when not paused[/-] [+]Support global expression evaluation inc. while not paused[/+] on Jul 10, 2018
  7. DanTup commented on Jul 10, 2018

    @DanTup
    MemberAuthor
  8. DanTup commented on Jul 12, 2018

    @DanTup
    MemberAuthor

    We need to send a library (or class) for evaluation, and the debug adapter doesn't have one - to do that we'd need to let the debugger ask the editor where the user is - starting to feel messy. Will come back to this..

  9. modified the milestones: v2.16.0, Backlog on Jul 12, 2018
  10. AndreVNP commented on Jan 29, 2020

    @AndreVNP

    Still not working

    image

  11. Gowtham-mg commented on Jan 30, 2020

    @Gowtham-mg

    @AndreVNP me too facing the same issue..Please post the solution, if you have solved this issue

  12. removed this from the Backlog milestone on Jan 30, 2020
  13. 7 remaining items

  14. modified the milestones: On Deck, v3.11.0 on May 12, 2020
  15. judexes commented on May 12, 2020

    @judexes

    Next version will partially support this... The global evaluations will always be scoped to the "root library" on the root isolate (this will usually be your main.dart). I've opened a separate issue (#2446) for having it scoped to the active file in the editor, but that's a little more tricky (since the debug adapter does not know which file is active in the editor).

    Screenshot 2020-05-12 at 10 09 06

    Hopefully this handles most use cases, though I'm not completely familiar with what everyone is trying to use this for, so feel free to post your requirements here and I'll try to cover those I can.

    Thanks!

    Thanks a bunch for looking into this.
    is there a beta version with a fix we could support ourselves with while its not yet ready for release?

  16. added a commit that references this issue on May 13, 2020
    4eefc07
  17. DanTup commented on May 13, 2020

    @DanTup
    MemberAuthor

    There's a preview build here:

    https://github.com/Dart-Code/Dart-Code/releases/tag/v3.11.0-beta.1

    Install by downloading the attached vsix file and running the Extensions: Install from VSIX command from the VS Code Command Palette to select the vsix file and then reload VS Code.

  18. sarthak260 commented on May 16, 2020

    @sarthak260

    It is still not working..
    can anyone please help me out to get some solution on this!

    image

  19. DanTup commented on May 16, 2020

    @DanTup
    MemberAuthor

    @sarthak260 you're typing into the evaluation console here. If you want to accept input from the user for your Dart program, you need to configure your launch configuration to run in the terminal .- please see https://dartcode.org/releases/v3-9/#dart-cli-terminal-improvements

  20. temizmustafa commented on May 23, 2020

    @temizmustafa

    @DanTup you are right. In launch.json file, "Console" : "Terminal", it is working.
    https://dartcode.org/releases/v3-9/#dart-cli-terminal-improvements

  21. Thiha112 commented on May 30, 2020

    @Thiha112

    but what does I need to put in my main.dart in order to prevent by terminating the output

  22. DanTup commented on Jun 1, 2020

    @DanTup
    MemberAuthor

    @Aung-Thiha112 if you're running a standard Dart script, you're likely better just adding a breakpoint. Flutter apps don't quit at the end of running the entry point, so that's where this request mostly came up.

  23. Sormox commented on Feb 8, 2021

    @Sormox

    @sarthak260 you're typing into the evaluation console here. If you want to accept input from the user for your Dart program, you need to configure your launch configuration to run in the terminal .- please see https://dartcode.org/releases/v3-9/#dart-cli-terminal-improvements

    I add in launch.json file --> "console" : "terminal" . don't work dart version 3.19.2

  24. DanTup commented on Feb 8, 2021

    @DanTup
    MemberAuthor

    @Sormox could you file a new issue, and provide a detailed description of what you mean by it not working? Thanks!

  25. Rafieaydin commented on Mar 30, 2021

    @Rafieaydin

    im using dart 3.20.1 "console" : "terminal" dint work and still same erorr why? im using vscode extention

  26. DanTup commented on Mar 30, 2021

    @DanTup
    MemberAuthor

    @Rafieaydin it's not clear what what the issue is - the note about using terminal is for accepting input from user, not for global evaluation. If you file a new issue with a detailed description of what you're doing/seeing, I'll take a look. Thanks!

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