json 终端在vscode Mac中自动立即关闭

x33g5p2x  于 2023-05-08  发布在  Vscode
关注(0)|答案(1)|浏览(253)

我使用的是Macos -V Ventura 13. 0. 1...在更新操作系统后,我的VSCode开始行为不端...当我运行代码时,终端打开,然后立即关闭,没有显示任何内容。
这是我的setting.json

{
    {
        "window.zoomLevel": 1,
        "code-runner.runInTerminal": true,
        "files.autoSave": "onFocusChange",
        "liveServer.settings.donotShowInfoMsg": true,
        "liveServer.settings.CustomBrowser": "chrome",
        "explorer.confirmDragAndDrop": false,
        "editor.minimap.enabled": false,
        "files.associations": {
            "*.ejs": "html"
        },
        "workbench.iconTheme": "helium-icon-theme",
        "workbench.colorTheme": "One Dark Pro Mix",
        "terminal.integrated.enableMultiLinePasteWarning": false,
        "terminal.integrated.defaultProfile.linux": "",
        "terminal.integrated.env.linux": {
            
    
    
        
        }
    }
}

我已经尝试删除/重置设置JSON,但没有任何变化,其余设置我无法理解

yws3nbqq

yws3nbqq1#

我终于找到了答案,因为升级导致我的shell路径自行更改,现在setting.json文件是--->

{
"code-runner.runInTerminal": true,
"terminal.integrated.profiles.osx": {

    "bash": {
        "path": "/bin/bash",
        "args": [
            "-l"
        ],
        "icon": "terminal-bash"
    },
    "zsh": {
        "path": "/bin/zsh",
        "args": [
            "-l"
        ]
    },
    "fish": {
        "path": "/bin/fish",
        "args": [
            "-l"
        ]
    },
    "tmux": {
        "path": "/bin/tmux",
        "icon": "terminal-tmux"
    },
    "pwsh": {
        "path": "/bin/pwsh",
        "icon": "terminal-powershell"
    }
},
"terminal.integrated.automationProfile.osx": {
},
"terminal.integrated.defaultProfile.osx": "zsh",
"terminal.integrated.automationProfile.linux": {

},
"editor.fontSize": 15,
"files.autoSave": "onFocusChange",
"workbench.colorTheme": "One Dark Pro Mix",
"workbench.iconTheme": "helium-icon-theme",
"powermode.presets": "flames",
"powermode.enabled": true,
"powermode.combo.counterEnabled": "hide",
"powermode.combo.timerEnabled": "hide",
"powermode.shake.intensity": 0,
"liveServer.settings.CustomBrowser": "chrome",
"liveSassCompile.settings.rootIsWorkspace": null,
"liveSassCompile.settings.formats": [

    {
        // to change back to normal just convert savepath from /dist/css to null
        "format": "expanded",
        "extensionName": ".css",
        "savePath": "/dist/css",
        "savePathReplacementPairs": null
    }
],
"editor.guides.bracketPairs": "active",
"editor.lineHeight": 0,
"editor.minimap.enabled": false,
"editor.codeActionsOnSave": {

}

}

相关问题