VS Code运行HBuilder X中的uni-app项目

1、插件市场下载插件uniapp run
2、配置打开插件设置,填入:
  • HBuilderX 安装路径(路径不能有中文、空格)
  • 微信开发者工具路径(需要调试小程序时填写)
3、在项目根目录新建 .vscode/launch.json
复制代码
{
    "version": "0.2.0",
    "configurations": [
        {
            "type": "uniapp-run",
            "request": "launch",
            "name": "运行 H5",
            "platform": "h5",
            "openBrowser": true,
            "vueVersion": "v2" // vue2 改成 v2
        },
        {
            "type": "uniapp-run",
            "request": "launch",
            "name": "运行 微信小程序",
            "platform": "mp-weixin",
            "openDevTools": true,
            "vueVersion": "v2" // vue2 改成 v2
        }
    ],
    "compounds": [
        {
            "name": "同时启动 H5 + 微信小程序",
            "configurations": ["运行 H5", "运行 微信小程序"],
            "stopAll": true
        }
    ]
}

拓展:使用trae开发工具时需要下载插件uni-app run 插件市场搜索不到

1、插件市场vscode 插件市场
2、在搜索结果中,点击你所需的插件。你会前往该插件的详情页。
3、在详情页中,点击 Version History 。如想省去麻烦我已下载完成uni-app run插件
复制代码
模板:
https://marketplace.visualstudio.com/_apis/public/gallery/publishers/${itemName.fieldA}/vsextensions/${itemName.fieldB}/${version}/vspackage

示例:
https://marketplace.visualstudio.com/_apis/public/gallery/publishers/denoland/vsextensions/uniapp-run/0.0.13/vspackage
4、下载后拖入插件市场
5、就可以自定义运行
相关推荐
码兄科技3 天前
24小时自助健身房系统软件开发实战指南:功能设计与部署方案
java·spring boot·uni-app
2501_916007473 天前
苹果商店iOS应用上架费用全面解析:开发者计划与审核费用计算
android·ios·小程序·https·uni-app·iphone·webview
2501_916008893 天前
如何实现iOS App代码混淆:SwiftShield使用指南
android·ios·小程序·https·uni-app·iphone·webview
2501_915909063 天前
移动端开发工具链怎么组合比较好,iOS、Android、跨端三套配置方案
ide·vscode·ios·objective-c·个人开发·swift·敏捷流程
sunoo-2293 天前
【ARM嵌入式学习笔记Day6】一文打通i.MX6ULL时钟体系:PLL/PFD/预分频+滞回比较器全解析
arm开发·笔记·vscode·单片机·imx6ull·汇编语言
明天…ling3 天前
gitee与vscode远程连接
vscode·gitee
2501_916008893 天前
怎么用 Godot 导出 iOS 应用并上架 App Store?签名字段该填什么?
android·ios·小程序·https·uni-app·iphone·webview
2501_915918414 天前
iOS编程用什么软件好?主流工具Xcode、AppCode、CodeRunner与新兴快蝎对比
ide·vscode·ios·objective-c·个人开发·swift·敏捷流程
郑州光合科技余经理4 天前
同城外卖小程序开发:下单成功后,后台导出能不能对上用户端状态
开发语言·前端·git·后端·uni-app·php·ai编程
__pop_4 天前
VSCode Remote SSH 远程连接 glibc 高版本依赖问题
vscode