如何使用Angular和Flatter(都是Dart)为工作区设置VS代码调试?
我有一个VS代码工作区,其结构如下:如何使用Angular和Flatter(都是Dart)为工作区设置VS代码调试?,angular,debugging,visual-studio-code,dart,flutter,Angular,Debugging,Visual Studio Code,Dart,Flutter,我有一个VS代码工作区,其结构如下: Root --[core] (basic Dart package) --[mobile] (Flutter) --[web] (Angular Dart) 如何为每个包配置调试器?到目前为止,我只有手机工作: // launch.json { "version": "0.2.0", "configurations": [ { "name": "Mobile", "program": "mobil
Root
--[core] (basic Dart package)
--[mobile] (Flutter)
--[web] (Angular Dart)
如何为每个包配置调试器?到目前为止,我只有手机工作:
// launch.json
{
"version": "0.2.0",
"configurations": [
{
"name": "Mobile",
"program": "mobile/lib/main.dart",
"request": "launch",
"type": "dart"
},
]
}
要通过CLI运行角度省道应用程序,请执行以下操作:
cd [web directory]
pub global activate webdev
webdev serve
您可以配置新任务并使用以下配置。只要运行任务,它就会成功
{
// 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
}
]
}