0
  • 聊天消息
  • 系統(tǒng)消息
  • 評(píng)論與回復(fù)
登錄后你可以
  • 下載海量資料
  • 學(xué)習(xí)在線(xiàn)課程
  • 觀看技術(shù)視頻
  • 寫(xiě)文章/發(fā)帖/加入社區(qū)
會(huì)員中心
創(chuàng)作中心

完善資料讓更多小伙伴認(rèn)識(shí)你,還能領(lǐng)取20積分哦,立即完善>

3天內(nèi)不再提示

VSCode插件的安裝和使用

嵌入式應(yīng)用研究院 ? 來(lái)源:嵌入式應(yīng)用研究院 ? 2024-11-04 15:36 ? 次閱讀

來(lái)源 | 嵌入式應(yīng)用研究院

整理&排版| 嵌入式應(yīng)用研究院

今天介紹一款我工作上經(jīng)常用到的一款VSCode的插件-VsCode Action Buttons,這個(gè)插件可以釋放手敲命令行清除、編譯、運(yùn)行、部署到目標(biāo)機(jī)等操作,具體功能可由開(kāi)發(fā)者自由定義,詳細(xì)功能的使用可以參考官網(wǎng)。

安裝插件并使用

選擇擴(kuò)展設(shè)置:

81a0eb86-9a62-11ef-a511-92fbcf53809c.jpg

在settings.json中編輯:

81ae867e-9a62-11ef-a511-92fbcf53809c.jpg

根據(jù)個(gè)人的需求定制功能:

以下是我經(jīng)常用來(lái)編譯應(yīng)用設(shè)置的腳本:

{
"actionButtons":{

"align":"left",
"defaultColor":"White",
"loadNpmCommands":false,
"reloadButton":"刷新",
"commands":[
{
"cwd":"${workspaceFolder}",
"name":"編譯",
"color":"white",
"singleInstance":true,
"command":"rm-rftest_imx6ull&&arm-buildroot-linux-gnueabihf-gcc-gimx6ull.c-otest_imx6ull"
},
{
"cwd":"${workspaceFolder}",
"name":"清除",
"color":"white",
"singleInstance":true,
"command":"rm-rftest_imx6ull"
},
{
"cwd":"${workspaceFolder}",
"name":"運(yùn)行",
"color":"white",
"singleInstance":true,
"command":"cdbuild&&./test&"
},
{
"cwd":"${workspaceFolder}",
"name":"部署",
"color":"white",
"singleInstance":true,
"command":"scp/home/bruce/workspace/test_imx6ullroot@192.168.31.173:/root"
}
]
},
"local-history.path":"/opt/workspace/.history",
"security.allowedUNCHosts":[
"192.168.31.173"
],
"security.workspace.trust.untrustedFiles":"open",
"remote.SSH.remotePlatform":{
"192.168.31.173":"linux"
},
"workbench.iconTheme":"material-icon-theme",
}

然后底部狀態(tài)欄處右鍵將插件使能后將可以愉快的使用類(lèi)似IDE一樣的功能了:

81b39ac4-9a62-11ef-a511-92fbcf53809c.jpg

點(diǎn)擊清除:

81b86e50-9a62-11ef-a511-92fbcf53809c.png

點(diǎn)擊編譯:

81c067fe-9a62-11ef-a511-92fbcf53809c.png

點(diǎn)擊部署:

81d2b7d8-9a62-11ef-a511-92fbcf53809c.png

在目標(biāo)機(jī)上運(yùn)行:

81e7819a-9a62-11ef-a511-92fbcf53809c.png

以上還可以將gdb遠(yuǎn)程調(diào)試部署上去,基于目標(biāo)機(jī)的遠(yuǎn)程調(diào)試就更容易定位問(wèn)題找Bug了,非常方便!大家在工作中有哪些好用的生產(chǎn)力工具呢?歡迎分享!

聲明:本文內(nèi)容及配圖由入駐作者撰寫(xiě)或者入駐合作網(wǎng)站授權(quán)轉(zhuǎn)載。文章觀點(diǎn)僅代表作者本人,不代表電子發(fā)燒友網(wǎng)立場(chǎng)。文章及其配圖僅供工程師學(xué)習(xí)之用,如有內(nèi)容侵權(quán)或者其他違規(guī)問(wèn)題,請(qǐng)聯(lián)系本站處理。 舉報(bào)投訴
  • 嵌入式
    +關(guān)注

    關(guān)注

    5058

    文章

    18971

    瀏覽量

    301889
  • 代碼
    +關(guān)注

    關(guān)注

    30

    文章

    4721

    瀏覽量

    68213
  • vscode
    +關(guān)注

    關(guān)注

    1

    文章

    154

    瀏覽量

    7648

原文標(biāo)題:工欲善其事,必先利其器-讓Vscode調(diào)試代碼就像IDE一樣好用

文章出處:【微信號(hào):嵌入式應(yīng)用研究院,微信公眾號(hào):嵌入式應(yīng)用研究院】歡迎添加關(guān)注!文章轉(zhuǎn)載請(qǐng)注明出處。

收藏 人收藏

    評(píng)論

    相關(guān)推薦

    WSL2下VSCode插件安裝失敗的原因?

    Collecting gevent<2.0,>=1.2.2 (from gdbgui==0.13.2.0->-r /home/qinge/esp/esp-idf/requirements.txt (line 26)) Using cached gevent-1.5.0.tar.gz (5.3 MB) Installing build dependencies: started Installing build dependencies: still running... Installing build dependencies: finished with status \'done\' Getting requirements to build wheel: started Getting requirements to build wheel: finished with status \'error\' Installing Python packages from /home/qinge/esp/esp-idf/requirements.txt error: subprocess-exited-with-error × Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> [315 lines of output] Compiling src/gevent/resolver/cares.pyx because it changed. [1/1] Cythonizing src/gevent/resolver/cares.pyx performance hint: src/gevent/libev/corecext.pyx:1291:5: Exception check on \'_syserr_cb\' will always require the GIL to be acquired. Possible solutions: 1. Declare \'_syserr_cb\' as \'noexcept\' if you control the definition and you\'re sure you don\'t want the function to raise exceptions. 2. Use an \'int\' return type on \'_syserr_cb\' to allow an error code to be returned. warning: src/gevent/libev/corecext.pyx:1288:0: Global name __SYSERR_CALLBACK matched from within class scope in contradiction to to Python \'class private name\' rules. This may change in a future release. warning: src/gevent/libev/corecext.pyx:1288:0: Global name __SYSERR_CALLBACK matched from within class scope in contradiction to to Python \'class private name\' rules. This may change in a future release. warning: src/gevent/libev/corecext.pyx:1288:0: Global name __SYSERR_CALLBACK matched from within class scope in contradiction to to Python \'class private name\' rules. This may change in a future release. warning: src/gevent/libev/corecext.pyx:1288:0: Global name __SYSERR_CALLBACK matched from within class scope in contradiction to to Python \'class private name\' rules. This may change in a future release. Error compiling Cython file: ------------------------------------------------------------ ... if events & ~(libev.EV__IOFDSET | libev.EV_READ | libev.EV_WRITE): raise ValueError(\'illegal event mask: %r\' % events) # All the vfd_functions are no-ops on POSIX cdef int vfd = libev.vfd_open(fd) libev.ev_io_init(&self._watcher, gevent_callback_io, vfd, events) self.__watcher = &self._watcher ^ ------------------------------------------------------------ src/gevent/libev/corecext.pyx:1027:25: Cannot convert \'ev_watcher *\' to Python object Error compiling Cython file: ------------------------------------------------------------ ... raise ValueError(\'illegal event mask: %r\' % events) # All the vfd_functions are no-ops on POSIX cdef int vfd = libev.vfd_open(fd) libev.ev_io_init(&self._watcher, gevent_callback_io, vfd, events) self.__watcher = &self._watcher self.__ss = &io_ss ^ ------------------------------------------------------------ src/gevent/libev/corecext.pyx:1028:20: Cannot convert \'start_and_stop *\' to Python object
    發(fā)表于 06-06 08:07

    用離線(xiàn)安裝安裝的idf,其創(chuàng)建的Python虛擬環(huán)境無(wú)激活腳本是怎么回事?

    如題,用離線(xiàn)安裝安裝的idf,其創(chuàng)建的Python虛擬環(huán)境無(wú)激活腳本,具體如下圖所示: 反而用vscode插件安裝的idf有,如下圖:
    發(fā)表于 06-11 06:49

    VSCode關(guān)閉重啟后插件就會(huì)失效,提示重新安裝怎么解決?

    安裝完esp-idf離線(xiàn)版后,使用Use existing setup安裝插件,可以成功編譯運(yùn)行hello world。 關(guān)閉VScode并重新打開(kāi),就會(huì)提示以下
    發(fā)表于 06-19 08:28

    ubuntu下的vscode插件安裝idf時(shí),總是找不到git,為什么?

    總是提示:Git is not found in current environment 但是我已經(jīng)在setting.json下設(shè)置了\"git.path\": \"/bin/git\" 同行,命令行里查看git版本和路徑都是可以的。為什么還是不行呢?
    發(fā)表于 06-21 07:16

    【合宙Air551G雙頻定位開(kāi)發(fā)板試用體驗(yàn)】之b站視頻

    ?https://www.bilibili.com/video/BV1si4y1y7eC/這個(gè)是視頻的鏈接。按照文檔中的提示,我進(jìn)行相關(guān)vscode插件安裝,并繼續(xù)隨后的調(diào)試工作。但是這個(gè)是
    發(fā)表于 03-30 07:35

    如何在RT-THREAD上生成doxygen呢

    vscode 插件安裝我們先講講doxygen怎么寫(xiě)。傳統(tǒng)方法直接用文本編輯器來(lái)寫(xiě),這個(gè)我這邊就不多介紹了。這邊我們用一個(gè)工具來(lái)幫助我們來(lái)寫(xiě)常用的doxygen。打開(kāi)vscode,
    發(fā)表于 08-09 10:50

    ubuntu下的vscode插件安裝idf時(shí),總是找不到git的原因?

    總是提示:Git is not found in current environment但是我已經(jīng)在setting.json下設(shè)置了"git.path": "/bin/git"同行,命令行里查看git版本和路徑都是可以的。為什么還是不行呢?
    發(fā)表于 02-20 06:24

    vscode常用插件有哪些

    vscode是一個(gè)不錯(cuò)的開(kāi)源IDE,可以完全替代sublime,又是跨平臺(tái),使用起來(lái)還比較方便。使用一段時(shí)間后,我覺(jué)得有些插件,值得推薦一下。我這里的開(kāi)發(fā)環(huán)境是win10下vscode+node.在
    發(fā)表于 12-23 10:42 ?2w次閱讀

    ubuntu18安裝vscode搭建嵌入式linux開(kāi)發(fā)環(huán)境

    ubuntu18安裝vscode搭建嵌入式linux開(kāi)發(fā)環(huán)境安裝vscode配置vscode(安裝
    發(fā)表于 11-01 16:57 ?10次下載
    ubuntu18<b class='flag-5'>安裝</b><b class='flag-5'>vscode</b>搭建嵌入式linux開(kāi)發(fā)環(huán)境

    配置VScode編譯、調(diào)試STM32(二)Cortex-Debug插件

    配置VScode編譯、調(diào)試STM32(二)Cortex-Debug插件
    發(fā)表于 12-01 12:21 ?17次下載
    配置<b class='flag-5'>VScode</b>編譯、調(diào)試STM32(二)Cortex-Debug<b class='flag-5'>插件</b>

    分享幾個(gè)vscode必備精品插件

    今天分享幾個(gè) vscode 必備精品插件,讓你的 vscode 更牛逼!
    的頭像 發(fā)表于 09-07 09:13 ?3014次閱讀

    VSCODE如何安裝ChatGPT插件

      zh1:首先在插件商店搜索ChatGPT中文版。然后點(diǎn)擊安裝就可以   chatGPT插件目前需要登陸賬號(hào)才能使用,官方介紹下一個(gè)版本會(huì)有升級(jí)(不需要登陸)   a:前往
    發(fā)表于 02-13 10:02 ?0次下載
    <b class='flag-5'>VSCODE</b>如何<b class='flag-5'>安裝</b>ChatGPT<b class='flag-5'>插件</b>

    VSCode批量遷移插件

    代碼的路 打開(kāi)之前電腦,找到原電腦VS Code的插件安裝目錄: 如: C:\\\\Users\\\\用戶(hù)名\\\\.vscode\\\\extensions 將extensions文件夾拷貝到
    的頭像 發(fā)表于 11-06 16:04 ?60次閱讀
    <b class='flag-5'>VSCode</b>批量遷移<b class='flag-5'>插件</b>

    下載vscode老版本離線(xiàn)插件vsix文件的流程

    下載vscode老版本離線(xiàn)插件vsix文件的流程如下
    的頭像 發(fā)表于 12-20 09:26 ?1.1w次閱讀
    下載<b class='flag-5'>vscode</b>老版本離線(xiàn)<b class='flag-5'>插件</b>vsix文件的流程