vscode提示找不到浏览器的解决方法 |
您所在的位置:网站首页 › vscode设置默认打开浏览器 › vscode提示找不到浏览器的解决方法 |
问题:
试了其他所有浏览器都能正常打开文件,就只有微软的Edge 不能打开 看到错误信息,提示检查是否已安装浏览器,不知道为什么会识别不到Edge浏览器。难道以前装错了? 解决办法:方法一:重装浏览器 重装能解决99%的问题… 方法二:修改电脑默认浏览器 把电脑默认浏览器修改你想要使用的浏览器,这样就能使用 Open In Default Browser打开 方法三:可以通过配置tasks.json文件来解决这个问题 具体方法如下: 1、按ctrl+shift+p打开命令面板,输入Configure Task然后依次操作 2、然后点击最后一个打开这个文件,进入到了tasks.json。我们可以看到默认配置如下: { // See https://go.microsoft.com/fwlink/?LinkId=733558 // for the documentation about the tasks.json format "version": "2.0.0", "tasks": [ { "label": "echo", "type": "shell", "command": "echo Hello" } ] }我们需要对这个代码进行修改,如下: { // See https://go.microsoft.com/fwlink/?LinkId=733558 // for the documentation about the tasks.json format "version": "2.0.0", "tasks": [ { "label": "Run HTML file with Chrome", "type": "process", "command": "chrome", "args": [ "${file}" ], "windows": { //这里写你电脑的Chrome浏览器的安装位置 "command": "C:/Program Files (x86)/Google/Chrome/Application/chrome.exe" }, "group": { "kind": "build", "isDefault": true } } ] }保存后打开文件,直接按下Ctrl+Shift+B就能打开浏览器了。 |
今日新闻 |
推荐新闻 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |