firebase-tools icon indicating copy to clipboard operation
firebase-tools copied to clipboard

cannot debug multiple Firebase functions codebases

Open noopole opened this issue 1 year ago • 1 comments

[REQUIRED] Environment info

firebase-tools: 13.3.1 (and all previous versions after 12)

Platform: macOS, Windows, Ubuntu

[REQUIRED] Test case

Create a Firebase project with Cloud functions defined within 2 codebases. The emulator running in debug mode cannot attach the debbuger with the second codebase runtime because it is already used by the first codebase runtime.

[REQUIRED] Steps to reproduce

  1. Create a project with 2 codebases
  2. Run the Firebase functions emulator with --inspect-functions
  3. Read the error in the console:

Starting inspector on 127.0.0.1:9229 failed: address already in use

[REQUIRED] Expected behavior

Debbugger should work with all codebase runtimes, as for the first one:

Debugger listening on ws://127.0.0.1:[port]/[uuid]

[REQUIRED] Actual behavior

Debugger failed to start.

noopole avatar Feb 26 '24 16:02 noopole

Solved here https://stackoverflow.com/a/77672524/4600982 with just 2 line changes

noopole avatar Feb 26 '24 16:02 noopole

This feature has been added in a recent version of firebase-tools

inlined avatar Mar 22 '24 01:03 inlined