我正在尝试使用 VSCode 调试 Flutter 应用程序,但它没有找到任何设备并显示消息 Cannot launch without an active device
。
我可以从终端使用命令 flutter run --no-sound-null-safety
启动应用程序,但我想使用 VSCode 调试工具来启动。
规格:
我的launch.json文件:
{
"configurations": [
{
"name": "Flutter",
"program": "lib/main.dart",
"request": "launch",
"type": "dart",
"console": "terminal",
"args": ["--no-sound-null-safety"],
}
]
}
我的 settings.json 文件:
{
"dart.flutterAdditionalArgs": [
"--no-sound-null-safety"
],
"dart.vmAdditionalArgs": [
"--no-sound-null-safety"
],
}