15

I am using firebase emulators:start to start firebase emulators. When shutting it down, through Ctrl+C, it tells me it didn't shut down correctly and that I need to consult firebase-debug.log which is nowhere to be found. I suspect it should be in functions/ folder where everything else related to cloud functions live, but it's not there.

i  emulators: Shutting down emulators.
i  hub: Stopping emulator hub
i  ui: Stopping Emulator UI
⚠  Emulator UI has exited upon receiving signal: SIGINT
i  logging: Stopping Logging Emulator
i  functions: Stopping Functions Emulator
i  firestore: Stopping Firestore Emulator
i  database: Stopping Database Emulator
⚠  emulators: emulators failed to shut down cleanly, see firebase-debug.log for details.

The problem is there is no firebase-debug.log to be found. Where can I find this debug file? See below contents of functions folder:

enter image description here

Zorayr
  • 23,770
  • 8
  • 136
  • 129

2 Answers2

10

firebase-debug.log is created in the root directory, one level up from the functions directory, beside the firebase.json file.

You can also launch the firebase with --debug flag firebase --debug emulators:start, in this case all debug messages will be printed into the console output.

Valeriy Katkov
  • 33,616
  • 20
  • 100
  • 123
  • I have looked both inside and right above the functions folder and still cannot find firebase-debug.log. I can see `firestore-debug.log`, `database-debug.log` and `ui-debug.log` in the same folder as `firebase.json`, but nothing else ‍♂️ – Zorayr Jun 07 '20 at 07:44
  • @Zorayr you need to run `firebase init` and initialize firestore and it will generate the log file. – August Kimo Oct 08 '21 at 15:57
  • I ran firebase within a docker container and this file was not getting generated at the root directory; other debug logs were generated. I used the `--debug` flag as suggested and was able to view the logs at `docker container logs ` – Andrew Nessin Jun 14 '22 at 03:43
1

I found it in my Home directory and I am using Mac OS.

Eric
  • 1,279
  • 1
  • 11
  • 8