Support debug as console project in flutter project
See original GitHub issueI have a flutter project, and now I want to test some dart grammar. I configure the launch.json but extension launch the code on web browser. It would be better to provider an option to let me debug code in dart console application environment.
{
"version": "0.2.0",
"configurations": [
{
"name": "dart",
"type": "dart",
"request": "launch",
"program": "${file}",
}
]
}
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Debugging Flutter apps
DevTools · Setting breakpoints · The Dart analyzer · Logging · Debugging application layers · Debug mode assertions · Debugging animations · Measuring...
Read more >Debugging Flutter apps programmatically
This doc describes debugging features that you can enable in code. For a full list of debugging and profiling tools, see the Debugging...
Read more >Using the debugger - Flutter documentation
Console output for the running app (stdout and stderr) is displayed in the console, below the source code area. You can also see...
Read more >Visual Studio Code - Flutter documentation
Start debugging by clicking Run > Start Debugging from the main IDE window, or press F5 . Selecting a target device. When a...
Read more >Flutter's build modes
By default, flutter run compiles to debug mode. Your IDE supports this mode. Android Studio, for example, provides a Run > Debug… menu...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for the clarification. I think using the
bin
folder makes most sense here - I don’t think it’s common to put executable scripts inside thelib
folder of a Flutter project so I don’t think it’s worthwhile to change how the debugger is selected only for this purpose.Another option is to create a sibling project alongside your Flutter app and open them both in VS Code together - scripts in a non-Flutter app would always run with the Dart VM.
Hope this makes sense!
Recently I am studying flutter in depth through some code test, and I both want to study dart grammar in both project. like bellow:
I configure the launch.json and so I can debug dart code as console app, but now I have to put code to
bin
folder.