想必習(xí)慣使用vscode的人突然使用HBuilder很不習(xí)慣吧,但是HBuilder創(chuàng)建的項目本身沒有調(diào)試功能。當你有一個app項目但又不想使用HBuilder編寫,需要瀏覽器調(diào)試的時候,你這時就需要一個插件了:uni run
插件
基于HBuilderX的采用uniapp-cli命令的方式,進行編譯且可以自動打開第三方開發(fā)者工具的VS Code插件
本項目適用于沒有采用CLI命令的uniapp項目,原需要HBuilderX進行編譯的
配置
在.vscode
文件夾下的launch.json
配置如下:
{
"version": "0.2.0",
"configurations": [
{
"type": "uniapp-run",
"request": "launch",
"name": "h5",
"platform": "h5",
}
]
}
配置Hbuilder安裝地址:
輸入你安裝的HBuilder地址即可文章來源:http://www.zghlxwxcb.cn/news/detail-600688.html
運行
選擇運行啟動調(diào)試即可訪問地址文章來源地址http://www.zghlxwxcb.cn/news/detail-600688.html
到了這里,關(guān)于在vscode中運行Hbuilder創(chuàng)建的項目的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!