Launch a specific project with releaseMode in a workspace by hitting ctrl+shift+b
See original GitHub issueIs your feature request related to a problem? Please describe.
When There is only 1 project, with such launch.json
(no tasks.json):
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "My_App",
"request": "launch",
"type": "dart",
"cwd": "${workspaceFolder}",
},
{
"name": "My_App(release mode)",
"request": "launch",
"type": "dart",
"flutterMode": "release",
"cwd": "${workspaceFolder}",
}
]
}
The dart/flutter project can be run in debug mode with F5
and release mode with ctrl+shift+b
.
But if there are multiple projects in a workspace( some others may not be dart projects), though the specific dart project can be run in debug mode by hitting F5
with specifying the corresponding launch file in Run and Debug Explorer
, it can’t be run in the release mode by hitting ctrl+shift+b
— vscode would just run another project which has a complete tasks.json
file.
Describe the solution you’d like
I hope there is a command that could generate all acquired files (maybe the missing tasks.json?) for any dart/flutter project, in which specified at least debug and release tasks. So that even in a workspace, users can easily doing debug and release building by easily hitting F5
and ctrl+shift+b
after choosing the specified launch file.
Describe alternatives you’ve considered
I’ve tried to build tasks.json
manually but failed. Because I don’t know how to add “device” in the command, be the Os is windows or Linux.
Issue Analytics
- State:
- Created a year ago
- Comments:17 (8 by maintainers)
Top GitHub Comments
Yes, both 2 approaches should be workable, and I prefer the latter approach. Thank you for your advice.
Ah, perfect 😃