摘要:在完成設(shè)置編輯之后,輸入來(lái)保存更改,更改會(huì)立即生效。調(diào)試配置文件使用了解相關(guān)屬性。欲了解更多信息,請(qǐng)?jiān)L問(wèn)任務(wù)配置直接運(yùn)行配置
配置編輯器 1. 基礎(chǔ)設(shè)置settings.json
VS Code有很多選項(xiàng)可以來(lái)配置編輯器,你可以通過(guò)用戶(hù)設(shè)置來(lái)設(shè)置全局選項(xiàng),或在工作空間設(shè)置中針對(duì)每個(gè)文件夾或項(xiàng)目設(shè)置,選項(xiàng)設(shè)置保存在settings.json?文件中。
Files?>?Preferences?>?User Settings?(或者按下?kb(workbench.action.showCommands), 輸入?user?然后按下?Enter) 來(lái)編輯 settings.json 文件.
Files?>?Preferences?>?Workspace Settings?(或者按下?kb(workbench.action.showCommands), 輸入?worksp?然后按下?Enter) 來(lái)編輯工作空間的 settings.json 文件.
你會(huì)看到VS Code?默認(rèn)配置在左側(cè)窗口并且你編輯的?settings.json?在右側(cè)。你可以只是從默認(rèn)設(shè)置查看和拷貝設(shè)置。
在完成設(shè)置編輯之后,輸入?kb(workbench.action.files.save)?來(lái)保存更改,更改會(huì)立即生效。
settings.json
{ "python.pythonPath": "/usr/local/opt/python3/bin/python3.6" }2. 調(diào)試配置文件launch.json
launch.json
{ // 使用 IntelliSense 了解相關(guān)屬性。 // 懸停以查看現(xiàn)有屬性的描述。 // 欲了解更多信息,請(qǐng)?jiān)L問(wèn): https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ { "name": "Python", "type": "python", "request": "launch", "stopOnEntry": true, "pythonPath": "${config:python.pythonPath}", "program": "${file}", "cwd": "${workspaceRoot}", "env": {}, "envFile": "${workspaceRoot}/.env", "debugOptions": [ "WaitOnAbnormalExit", "WaitOnNormalExit", "RedirectOutput" ] }, { "name": "Python: Attach", "type": "python", "request": "attach", "localRoot": "${workspaceRoot}", "remoteRoot": "${workspaceRoot}", "port": 3000, "secret": "my_secret", "host": "localhost" }, { "name": "Python: Terminal (integrated)", "type": "python", "request": "launch", "stopOnEntry": true, "pythonPath": "${config:python.pythonPath}", "program": "${file}", "cwd": "", "console": "integratedTerminal", "env": {}, "envFile": "${workspaceRoot}/.env", "debugOptions": [ "WaitOnAbnormalExit", "WaitOnNormalExit" ] }, { "name": "Python: Terminal (external)", "type": "python", "request": "launch", "stopOnEntry": true, "pythonPath": "${config:python.pythonPath}", "program": "${file}", "cwd": "", "console": "externalTerminal", "env": {}, "envFile": "${workspaceRoot}/.env", "debugOptions": [ "WaitOnAbnormalExit", "WaitOnNormalExit" ] }, { "name": "Python: Django", "type": "python", "request": "launch", "stopOnEntry": true, "pythonPath": "${config:python.pythonPath}", "program": "${workspaceRoot}/manage.py", "cwd": "${workspaceRoot}", "args": [ "runserver", "--noreload", "--nothreading" ], "env": {}, "envFile": "${workspaceRoot}/.env", "debugOptions": [ "WaitOnAbnormalExit", "WaitOnNormalExit", "RedirectOutput", "DjangoDebugging" ] }, { "name": "Python: Flask (0.11.x or later)", "type": "python", "request": "launch", "stopOnEntry": false, "pythonPath": "${config:python.pythonPath}", "program": "fully qualified path fo "flask" executable. Generally located along with python interpreter", "cwd": "${workspaceRoot}", "env": { "FLASK_APP": "${workspaceRoot}/quickstart/app.py" }, "args": [ "run", "--no-debugger", "--no-reload" ], "envFile": "${workspaceRoot}/.env", "debugOptions": [ "WaitOnAbnormalExit", "WaitOnNormalExit", "RedirectOutput" ] }, { "name": "Python: Flask (0.10.x or earlier)", "type": "python", "request": "launch", "stopOnEntry": false, "pythonPath": "${config:python.pythonPath}", "program": "${workspaceRoot}/run.py", "cwd": "${workspaceRoot}", "args": [], "env": {}, "envFile": "${workspaceRoot}/.env", "debugOptions": [ "WaitOnAbnormalExit", "WaitOnNormalExit", "RedirectOutput" ] }, { "name": "Python: PySpark", "type": "python", "request": "launch", "stopOnEntry": true, "osx": { "pythonPath": "${env:SPARK_HOME}/bin/spark-submit" }, "windows": { "pythonPath": "${env:SPARK_HOME}/bin/spark-submit.cmd" }, "linux": { "pythonPath": "${env:SPARK_HOME}/bin/spark-submit" }, "program": "${file}", "cwd": "${workspaceRoot}", "env": {}, "envFile": "${workspaceRoot}/.env", "debugOptions": [ "WaitOnAbnormalExit", "WaitOnNormalExit", "RedirectOutput" ] }, { "name": "Python: Module", "type": "python", "request": "launch", "stopOnEntry": true, "pythonPath": "${config:python.pythonPath}", "module": "module.name", "cwd": "${workspaceRoot}", "env": {}, "envFile": "${workspaceRoot}/.env", "debugOptions": [ "WaitOnAbnormalExit", "WaitOnNormalExit", "RedirectOutput" ] }, { "name": "Python: Pyramid", "type": "python", "request": "launch", "stopOnEntry": true, "pythonPath": "${config:python.pythonPath}", "cwd": "${workspaceRoot}", "env": {}, "envFile": "${workspaceRoot}/.env", "args": [ "${workspaceRoot}/development.ini" ], "debugOptions": [ "WaitOnAbnormalExit", "WaitOnNormalExit", "RedirectOutput", "Pyramid" ] }, { "name": "Python: Watson", "type": "python", "request": "launch", "stopOnEntry": true, "pythonPath": "${config:python.pythonPath}", "program": "${workspaceRoot}/console.py", "cwd": "${workspaceRoot}", "args": [ "dev", "runserver", "--noreload=True" ], "env": {}, "envFile": "${workspaceRoot}/.env", "debugOptions": [ "WaitOnAbnormalExit", "WaitOnNormalExit", "RedirectOutput" ] } ] }3. 任務(wù)配置(直接運(yùn)行配置)tasks.json
tasks.json
{ "version": "0.1.0", "command": "python3", "isShellCommand": true, "args": ["${file}"], "showOutput": "always" }
文章版權(quán)歸作者所有,未經(jīng)允許請(qǐng)勿轉(zhuǎn)載,若此文章存在違規(guī)行為,您可以聯(lián)系管理員刪除。
轉(zhuǎn)載請(qǐng)注明本文地址:http://specialneedsforspecialkids.com/yun/41034.html
摘要:使用文件頭部注釋在當(dāng)前編輯文件中使用快捷鍵即可生成文件頭部注釋。事實(shí)上,函數(shù)注釋在文件的任意位置都可生成,這里需要自己控制。 koroFileHeader 一個(gè)讀取用戶(hù)自定義模板,通過(guò)快捷鍵添加文件頭部注釋、在光標(biāo)處添加函數(shù)注釋的VsCode插件 language 簡(jiǎn)體中文 | English 一些文檔 支持語(yǔ)言 插件設(shè)置/配置 更新日志 常見(jiàn)問(wèn)題 簡(jiǎn)介 文件頭部添加注釋: 在文...
摘要:使用文件頭部注釋在當(dāng)前編輯文件中使用快捷鍵即可生成文件頭部注釋。函數(shù)注釋將光標(biāo)放在函數(shù)行或者將光標(biāo)放在函數(shù)上方的空白行使用快捷鍵,即可生成函數(shù)注釋。事實(shí)上,函數(shù)注釋在文件的任意位置都可生成,這里需要自己控制。 koroFileHeader 一個(gè)讀取用戶(hù)自定義模板,通過(guò)快捷鍵添加文件頭部注釋、在光標(biāo)處添加函數(shù)注釋的VsCode插件 language 簡(jiǎn)體中文 | English 更新日志...
摘要:作者鐘離,酷家樂(lè)客戶(hù)端負(fù)責(zé)人原文地址酷家樂(lè)客戶(hù)端下載地址文章背景在酷家樂(lè)客戶(hù)端在改版成功后,我們積累了許多的寶貴的經(jīng)驗(yàn)和最佳實(shí)踐。鐘離可以注冊(cè)多個(gè)協(xié)議接收參數(shù)協(xié)議注冊(cè)完畢之后,我們已經(jīng)可以在瀏覽器中,通過(guò)訪問(wèn)自定義協(xié)議來(lái)啟動(dòng)客戶(hù)端了。 作者:鐘離,酷家樂(lè)PC客戶(hù)端負(fù)責(zé)人原文地址:https://webfe.kujiale.com/browser-to-client/酷家樂(lè)客戶(hù)端:下載...
摘要:作者鐘離,酷家樂(lè)客戶(hù)端負(fù)責(zé)人原文地址酷家樂(lè)客戶(hù)端下載地址文章背景在酷家樂(lè)客戶(hù)端在改版成功后,我們積累了許多的寶貴的經(jīng)驗(yàn)和最佳實(shí)踐。鐘離可以注冊(cè)多個(gè)協(xié)議接收參數(shù)協(xié)議注冊(cè)完畢之后,我們已經(jīng)可以在瀏覽器中,通過(guò)訪問(wèn)自定義協(xié)議來(lái)啟動(dòng)客戶(hù)端了。 作者:鐘離,酷家樂(lè)PC客戶(hù)端負(fù)責(zé)人原文地址:https://webfe.kujiale.com/browser-to-client/酷家樂(lè)客戶(hù)端:下載...
摘要:統(tǒng)一碼,萬(wàn)國(guó)碼編碼此時(shí)應(yīng)運(yùn)而生,年由統(tǒng)一碼聯(lián)盟首次發(fā)布標(biāo)準(zhǔn)。英文占個(gè)字節(jié)歐洲語(yǔ)系占個(gè)東亞占個(gè),其它及特殊字符占個(gè)使用個(gè)字節(jié)表示所有字符優(yōu)先使用個(gè)字節(jié),否則使用個(gè)字節(jié)表示。退出交互式環(huán)境,使用。 < 返回索引頁(yè) 計(jì)算機(jī)編程基礎(chǔ)知識(shí) 編程入門(mén)準(zhǔn)備知識(shí) 計(jì)算機(jī)基本組成 計(jì)算機(jī)中的編碼 一門(mén)語(yǔ)言的基本組成 環(huán)境搭建 Python下載和安裝(window/mac/linux...
閱讀 2845·2021-10-21 09:38
閱讀 2751·2021-10-11 10:59
閱讀 3022·2021-09-27 13:36
閱讀 1649·2021-08-23 09:43
閱讀 790·2019-08-29 14:14
閱讀 3034·2019-08-29 12:13
閱讀 3203·2019-08-29 12:13
閱讀 310·2019-08-26 12:24