Breakpoints not triggering when debugging local Firebase functions with emulator with IntelliJ Ultimate/WebStorm

Viewed 638

I'm running Firebase Tools v9+

I'm running the following start command:

firebase emulators:start --inspect-functions

And the output:

[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.

I created a debugger profile Attach to Node.js/Chrome with my host as localhost and my port as 9229 with attach to set to Chrome or Node.js > 6.3 started with --inspect

Unfortunately, the breakpoints are not triggering and I can't step through my functions. I'm not sure where to go from here. Any help would be great. Thanks.

2 Answers

works for me... I've (more or less) followed the instructions at https://medium.com/firebase-developers/debugging-firebase-functions-in-vs-code-a1caf22db0b2: started the emulator with firebase emulators:start --inspect-functions, created the Attach to Node.js/Chrome with Port set to 9229, pressed Debug, then sent a post request - breakpoint in my function was successfully hit

enter image description here

Does debugging work for you when using other editors (VSCode, for example)?

I had the same issue. Even though the breakpoint is seemingly unbound, it could hit the line when I execute the corresponding Firebase function.

So, please try to call the function even though the breakpoint is unbound. The breakpoint may be activated and turn to be red in that case.

Related