command+shift+p 搜索 Configure Task Runner. 回车之后打开 tasks.json,修改一下:
{
"version": "0.1.0",
"command": "Chrome",
"osx": {
"command": "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
},
"args": [
"${file}"
]
}切换回想打开的html文件,通过快捷键command+shift+b就可以直接调用系统默认浏览器来运行HTML代码
时间: 2024-10-31 10:03:29