使用 IntelliJ Ultimate/WebStorm 模拟器调试本地 Firebase 函数时,断点不会触发

Gar*_*uuk 6 debugging webstorm firebase google-cloud-functions

我正在运行 Firebase 工具 v9+

我正在运行以下启动命令:

firebase emulators:start --inspect-functions
Run Code Online (Sandbox Code Playgroud)

和输出:

[emulators] >  Debugger listening on ws://localhost:9229/2eff20bf-d538-42ee-8ed9-067564408152
[emulators] >  Debugger listening on ws://localhost:9229/2eff20bf-d538-42ee-8ed9-067564408152
[emulators] >  For help, see: https://nodejs.org/en/docs/inspector
[emulators] >  Debugger attached.
Run Code Online (Sandbox Code Playgroud)

我创建了一个调试器配置文件附加到 Node.js/Chrome,我的主机作为 localhost,我的端口作为9229附加设置为 Chrome 或 Node.js > 6.3 开始--inspect

不幸的是,断点没有触发,我无法单步执行我的函数。我不知道从这里该去哪里。任何帮助都会很棒。谢谢。

len*_*ena 3

对我有用...我(或多或少)遵循了https://medium.com/firebase-developers/debugging-firebase-functions-in-vs-code-a1caf22db0b2上的说明:使用 启动模拟器firebase emulators:start --inspect-functions,创建附加到 Node.js/Chrome,端口设置为9229,按下Debug,然后发送一个发布请求 - 我的函数中的断点已成功命中

在此输入图像描述

使用其他编辑器(例如 VSCode)时,调试对您有用吗?

  • 是的,也无法让它与 vscode 一起工作。 (2认同)