成人午夜视频全免费观看高清-秋霞福利视频一区二区三区-国产精品久久久久电影小说-亚洲不卡区三一区三区一区

Powershell與VSCode的集成配置

(一)在VSCode中安裝PowerShell插件

創(chuàng)新互聯(lián)公司堅(jiān)持“要么做到,要么別承諾”的工作理念,服務(wù)領(lǐng)域包括:網(wǎng)站設(shè)計(jì)制作、成都網(wǎng)站制作、企業(yè)官網(wǎng)、英文網(wǎng)站、手機(jī)端網(wǎng)站、網(wǎng)站推廣等服務(wù),滿(mǎn)足客戶(hù)于互聯(lián)網(wǎng)時(shí)代的衡南網(wǎng)站設(shè)計(jì)、移動(dòng)媒體設(shè)計(jì)的需求,幫助企業(yè)找到有效的互聯(lián)網(wǎng)解決方案。努力成為您成熟可靠的網(wǎng)絡(luò)建設(shè)合作伙伴!


需要在VSCode插件中心中進(jìn)行搜索安裝,安裝完成后如圖。

Powershell與VSCode的集成配置


(二)修改VSCode的配置文件,增加對(duì)PowerShell的支持,比如字符集、智能感知等


打開(kāi)VSCode,選擇文件——》首選項(xiàng)——》設(shè)置,然后選擇設(shè)置界面右側(cè)的花括號(hào){}進(jìn)行配置,需要增加的配置如下

{

"csharp.suppressDotnetRestoreNotification": true,

"editor.renderWhitespace": "all",

"editor.renderControlCharacters": true,

"omnisharp.projectLoadTimeout": 120,

"files.trimTrailingWhitespace": true,

"files.encoding": "utf8bom",

"files.autoGuessEncoding": true

}

如圖所示

Powershell與VSCode的集成配置

設(shè)置完成后,PS就可以進(jìn)行智能感知了,如圖。

Powershell與VSCode的集成配置

參考鏈接:

https://docs.microsoft.com/zh-cn/powershell/scripting/components/vscode/using-vscode?view=powershell-6


(三)與GitHub的自動(dòng)集成


如果您的本地已經(jīng)包含了GitHub倉(cāng)庫(kù),且倉(cāng)庫(kù)的目錄已經(jīng)在VSCODE中打開(kāi),那么VSCode會(huì)智能提示你倉(cāng)庫(kù)有沒(méi)有變更操作,如圖。

Powershell與VSCode的集成配置


(四)有價(jià)值的關(guān)于PS和VSCode集成的鏈接


https://devblogs.microsoft.com/scripting/get-started-with-powershell-development-in-visual-studio-code/

https://devblogs.microsoft.com/scripting/visual-studio-code-editing-features-for-powershell-development-part-1/

https://devblogs.microsoft.com/scripting/visual-studio-code-editing-features-for-powershell-development-part-2/

https://devblogs.microsoft.com/scripting/debugging-powershell-script-in-visual-studio-code-part-1/

https://devblogs.microsoft.com/scripting/debugging-powershell-script-in-visual-studio-code-part-2/


(五)獲取PowerShell相關(guān)的內(nèi)容和命令


在面板使用快捷鍵Ctrl+Shift+P,打開(kāi)下面的快速命令行,輸入powershell:

Powershell與VSCode的集成配置


(六)調(diào)試工具


PowerShell Editor Services在單獨(dú)的進(jìn)程中運(yùn)行,并通過(guò)Visual Studio Code定義的JSON遠(yuǎn)程過(guò)程調(diào)用(RPC)協(xié)議為Visual Studio Code提供語(yǔ)言和調(diào)試服務(wù)。此方法的一個(gè)優(yōu)點(diǎn)是PowerShell Editor Services進(jìn)程崩潰不會(huì)導(dǎo)致Visual Studio代碼崩潰。并且,使用最新版本的PowerShell擴(kuò)展,您只需重新啟動(dòng)當(dāng)前的PowerShell會(huì)話(huà),而無(wú)需重新啟動(dòng)Visual Studio代碼以重新開(kāi)始。

要打開(kāi)Debug視圖,請(qǐng)?jiān)赩iew Bar中從View菜單中選擇Debug,或者按Ctrl + Shift + D.在Launch Configuration下拉列表中(如下面的屏幕截圖所示),選擇PowerShell Launch(當(dāng)前文件)配置。

默認(rèn)情況下,調(diào)試使用的是launch.json文件,如圖。

Powershell與VSCode的集成配置

可以在調(diào)試之前設(shè)置斷點(diǎn),通過(guò)斷點(diǎn)的逐行運(yùn)行去判斷問(wèn)題。

Powershell與VSCode的集成配置

您可以關(guān)注如下微信公眾號(hào)獲取更多資訊

Powershell與VSCode的集成配置

當(dāng)前標(biāo)題:Powershell與VSCode的集成配置
本文網(wǎng)址:http://jinyejixie.com/article6/gpsoog.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供服務(wù)器托管、手機(jī)網(wǎng)站建設(shè)、網(wǎng)站改版定制開(kāi)發(fā)、域名注冊(cè)虛擬主機(jī)

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶(hù)投稿、用戶(hù)轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話(huà):028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)

網(wǎng)站托管運(yùn)營(yíng)