我无法使用预览浏览器(VS 代码扩展)

Thi*_*ota 6 html css visual-studio-code

我安装了Browser Preview,(Visual Studio Code 扩展),但我不能使用它。

安装后我有两个选择:

  • 浏览器预览:附加
  • 浏览器预览:启动

选择附加选项时,我有以下屏幕:

浏览器预览:附加

并通过选择启动选项:

浏览器预览:启动

我尝试按照主题“如何更改默认起始 url/起始页?”中的描述进行配置。从插件页面

配置

我得到了第一个案例的结果。有 2 个字段名为“浏览器预览”。我分别尝试了每一个,并且都尝试了。

我也是来看vs code网站的。

我还测试了许多变体,例如我的 * .html 文件的 url。该文件甚至打开但没有同时更新。我还尝试将 http://localhost:3000 放在提到的字段中。我也没有成功。

我尝试删除所有 vs 代码文件(包括配置文件)并重新安装所有内容,但我也没有解决问题。

我想错误可能在 launch.json 配置文件中。我正在阅读此文件中包含的链接,但已经失去了太多时间而无法寻求帮助。

我将留下我的 html 代码和配置文件。

注意:忽略 html/css 的错误格式。不久前我开始学习 Web 开发。

配置文件“launch.json”:

{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
    {
        "type": "browser-preview",
        "name": "Browser Preview: Attach",
        "request": "attach"
    },
    {
        "type": "browser-preview",
        "request": "launch",
        "name": "Browser Preview: Launch",
        "url": "http://localhost:3000"
    }
]
}
Run Code Online (Sandbox Code Playgroud)

{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
    {
        "type": "browser-preview",
        "name": "Browser Preview: Attach",
        "request": "attach"
    },
    {
        "type": "browser-preview",
        "request": "launch",
        "name": "Browser Preview: Launch",
        "url": "http://localhost:3000"
    }
]
}
Run Code Online (Sandbox Code Playgroud)
html{
	background-image: url("imagens/fundo.png");
}

td{
	font-weight: bold;
	text-align: center;
}

a{
	color: blue;
}

table{
	background-color: #dddd;
	padding: 10px;
	height: 90px;
	width: 900px;
}

#ConteudoPrincipal{
	width: 880px;
	padding: 10px;
	background-color: white;	
}

#TodosOsDireitosReservados{
	
	text-align: center;
	/*margin: auto;*/
	width: 880px;
	padding: 10px;
	font-weight: bold;
}

.FotosStyle{
	border: 10px solid #ddd;
}

#DivFoto1{
	padding: 10px;
}

#TiituloDaPágina{
	color: #444241;
	font-weight: bold;
	font-size: 20px;
}
Run Code Online (Sandbox Code Playgroud)