Reputation: 8012
I have a VS Code workspace with the following structure:
Root
--[core] (basic Dart package)
--[mobile] (Flutter)
--[web] (Angular Dart)
How do I configure the debugger for each package? So far, I only have mobile working:
// launch.json
{
"version": "0.2.0",
"configurations": [
{
"name": "Mobile",
"program": "mobile/lib/main.dart",
"request": "launch",
"type": "dart"
},
]
}
To run the angular dart app through CLI:
cd [web directory]
pub global activate webdev
webdev serve
Upvotes: 1
Views: 749
Reputation: 26
You can configure a new task and use the following configuration. just run the task and it will do the trick.
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"command": "$HOME/.pub-cache/bin/webdev",
"type": "shell",
"args": [],
"presentation": {
"echo": true,
"reveal": "always",
"focus": false,
"panel": "shared",
"showReuseMessage": true,
"clear": false
},
"options": {
"cwd": "./web"
},
"tasks": [
{
"label": "serve",
"args": [],
"isBackground": true
}
]
}
Upvotes: 1