'Apparent bug with the --inspect-functions flag

Based on some quick searching, it doesn't look like this issue has been reported yet.

This occurs when locally testing in a firebase functions project with two or more http functions defined for different paths, when supplying the --inspect-functions flag in this command:

firebase emulators:start --only functions --inspect-functions

After a function is called for the first time, the mapping of http paths to functions is broken. Every subsequent call to any function path will be routed to the first function that was called, rather than the one that corresponds to that path.

Minimal code to reproduce: https://github.com/johnang3/functions-emulator-bug-demo

This occurs when using version 10.2.1 of the firebase CLI with firebase-functions versions 3.13.2 and 3.18.1. I have not tested any other versions.



Solution 1:[1]

It seems that you are using an outdated version of firebase-tools.

I've tried running the command below under the functions directory, then tried running the browsers found in your Github, and it works fine on my end.

npm install -g firebase-tools

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 RJC