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 global expression evaluation inc. while not paused #906
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
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
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..
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).
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?
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.
@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.
@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!
Activity
[-]Support using the Watch window when not paused[/-][+]Support using the Watch window/Debug console evaluation when not paused[/+]Add basic global expression evaluation
[-]Support using the Watch window/Debug console evaluation when not paused[/-][+]Support global expression evaluation inc. while not paused[/+]DanTup commentedon Jul 10, 2018
flutter/flutter#18678 (comment)
DanTup commentedon Jul 12, 2018
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..
AndreVNP commentedon Jan 29, 2020
Still not working
Gowtham-mg commentedon Jan 30, 2020
@AndreVNP me too facing the same issue..Please post the solution, if you have solved this issue
7 remaining items
judexes commentedon May 12, 2020
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?
Add some basic support for expression evaluation using the rootLib of…
DanTup commentedon May 13, 2020
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
vsixfile and running the Extensions: Install from VSIX command from the VS Code Command Palette to select the vsix file and then reload VS Code.sarthak260 commentedon May 16, 2020
It is still not working..
can anyone please help me out to get some solution on this!
DanTup commentedon May 16, 2020
@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
temizmustafa commentedon May 23, 2020
@DanTup you are right. In launch.json file, "Console" : "Terminal", it is working.
https://dartcode.org/releases/v3-9/#dart-cli-terminal-improvements
Thiha112 commentedon May 30, 2020
but what does I need to put in my main.dart in order to prevent by terminating the output
DanTup commentedon Jun 1, 2020
@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.
Sormox commentedon Feb 8, 2021
I add in launch.json file --> "console" : "terminal" . don't work dart version 3.19.2
DanTup commentedon Feb 8, 2021
@Sormox could you file a new issue, and provide a detailed description of what you mean by it not working? Thanks!
Rafieaydin commentedon Mar 30, 2021
im using dart 3.20.1 "console" : "terminal" dint work and still same erorr why? im using vscode extention
DanTup commentedon Mar 30, 2021
@Rafieaydin it's not clear what what the issue is - the note about using
terminalis 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!