原来我一直用 Pycharm 写代码,Pycharm 写代码虽然很方便,但是Pycharm 有点重,我转到了Vscode了,真香。
在 Visual Studio Code 中安装 CodeRunner 插件后,直接运行 Python 代码的时候,输出窗口中的中文出现了乱码,像这样:
经过谷歌的一番搜索,找到如下方法,让输出的结果在 Terminal 中运行
打开 首选项 - 设置,在用户设置中加入
“code-runner.runInTerminal”:true,
// 意思是让 CodeRunner 在你的终端中运行。
全部代码如下:
{
“window.zoomLevel”: 1,
“workbench.colorTheme”: “Atom One Dark”,
“breadcrumbs.enabled”: false,
“git.enableSmartCommit”: true,
“editor.suggestSelection”: “first”,
"editor.fontFamily":"'Fira Code','Operator Mono', Consolas, 'Courier New', monospace",
"editor.fontLigatures": true,
"editor.fontSize": 14,
"files.autoSave": "afterDelay",
"editor.minimap.enabled": false,
"go.goroot": "C:\\Go",
"go.gopath": "D:\\Go_WorkSpace",
"python.jediEnabled": false,
"code-runner.runInTerminal":true,
}
设置后的运行效果:
點擊查看更多內(nèi)容
1人點贊
評論
評論
共同學(xué)習(xí),寫下你的評論
評論加載中...
作者其他優(yōu)質(zhì)文章
正在加載中
感謝您的支持,我會繼續(xù)努力的~
掃碼打賞,你說多少就多少
贊賞金額會直接到老師賬戶
支付方式
打開微信掃一掃,即可進行掃碼打賞哦