flutter - Flutter web:连接服务器进行调试
问题描述
我想通过http-server启动我的flutter web项目,并连接vs代码来调试它。
- 我创建了一个颤振项目;
- 我用下一个命令构建了它
flutter build web --profile
; - 我已经使用 http-server 启动了应用程序
但我不知道如何在 vs 代码中连接到服务器 :(。
我debugServer
在 launch.json 文件中找到了参数,但在文档中找不到此参数,但此参数有说明:
For debug extension development only: if a port is specified VS Code tries to connect to a debug adapter running in server mode
也许,我应该安装任何调试适配器还是这个参数不起作用或不可能?
{
// 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": "connect to the server",
"request": "launch",
"type": "dart",
"debugServer": 3333
},
]
}
解决方案
推荐阅读
- android - 无法在 XML .Android 工作室中更改按钮的背景颜色
- c++ - 在 C++ 中的向量中使用 push_back vs at
- android - 无法实例化以下类: - androidx.recyclerview.widget.RecyclerView
- json - 选择与jsonb不同,左连接表
- reactjs - t.map 不是反应静态服务器上的函数错误
- python - 将原始 mf4 数据与 dbc 连接 - asammdf
- javascript - 使用新(2020 年秋季)界面下载 FKI IAM 手写数据库文件
- erlang - Erlang:如何杀死 wxe_master/wxe_server gen_server
- python - Python - 将转换矩阵拟合到马尔可夫模型
- amazon-web-services - 如何最小化 AWS k8s 的 Kops 的 IAM 角色权限