You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

VS Code中Firefox调试器断点失效问题求助

Angular项目Firefox调试断点失效问题

我通过ng new my-app生成了一个常规Angular项目,在VS Code的launch.json中添加了如下配置:

{"name": "Debug Firefox", "type": "firefox", "request": "launch", "reAttach": true, "url": "http://localhost:4200", "preLaunchTask": "npm: start", "webRoot": "${workspaceFolder}"}

在app.component.ts中编写了测试代码:

public GetConsoleLog(): void {
    console.log("it`s fine"); // first breakpoint here
    console.log("it`s fine second time"); // the second breakpoint 
}

尝试在Firefox中调试时,断点始终被忽略。另外我没有使用"start-debugging-firefox"功能调试,因为该功能在VS Code中会无限加载,当前的启动配置已经能让应用在独立窗口中以调试模式运行。

我已经完成以下操作:

  • sourceMap设置为true
  • 已安装VS Code的Firefox调试插件
  • Chrome调试功能正常可用
  • 已执行firefox -start-debugger-server命令
  • 已配置about:config

内容的提问来源于stack exchange,提问作者tender

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.02 18:22:04