【问题标题】:Debug HTML file with inline Javascript in GitHub Codespaces在 GitHub Codespaces 中使用内联 Javascript 调试 HTML 文件
【发布时间】:2022-11-18 20:42:18
【问题描述】:

我创建了一个带有一些内联 javascript 的 *.html 文件。

我想使用 GitHub codespaces 调试文件。

我安装了 Live Server 插件来在浏览器中运行我的 html 文件。

我创建了以下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": [
    
        {
            "name": "Editor_2",
            "request": "launch",
            "type": "chrome",
            "url": "http://127.0.0.1:5502/_ui/editor_v02.html",
            "webRoot": "${workspaceFolder}"
        }
    ]
}

运行 Editor_2 配置时,我得到:

Unable to launch browser: "Timed out waiting for browser connection"

有什么建议我做错了吗?

感谢您的回复!

【问题讨论】:

  • 我有同样的问题

标签: github visual-studio-code codespaces github-codespaces


【解决方案1】:

尝试这个...

从扩展菜单中,搜索并安装“LiveServer”。

安装后,点击右下角的“Go Live”。

希望有帮助

【讨论】:

    猜你喜欢
    • 2023-01-18
    • 2022-08-05
    • 2018-12-23
    • 2022-01-22
    • 2011-04-04
    • 2010-12-20
    • 1970-01-01
    • 2015-12-04
    • 2021-10-31
    相关资源
    最近更新 更多