firebase / firebase-tools

The Firebase Command Line Tools
MIT License
3.97k stars 916 forks source link

--inspect-functions breaks when emulating extensions #5454

Open p3nnst8r opened 1 year ago

p3nnst8r commented 1 year ago

[REQUIRED] Environment info

firebase-tools: 11.21.0

Platform: Windows 10 Pro (WSL2)

[REQUIRED] Test case

run firebase emulators:exec --inspect-functions --ui 'npm start'

[REQUIRED] Steps to reproduce

[REQUIRED] Expected behavior

[REQUIRED] Actual behavior

p3nnst8r commented 1 year ago

Hi! Any updates to this?

KoheiKanagu commented 1 year ago

I think it's the extensions that are affecting it. If I specify something other than extensions in the only option, the error no longer occurs.

Like this.

firebase emulators:start --only auth,functions,firestore --inspect-functions 
glumb commented 1 year ago

I am having the same issue. As soon as I enable a extension in the firebase.json, e.g.:

  "extensions": {
    "firestore-send-email": "firebase/firestore-send-email@0.1.19"
  }

the debugger does not attach to my code anymore

glumb commented 7 months ago

Any update on this? BTW im on macOS, so not sure about the windows tag.

"firebase-admin": "11.11.0",
"firebase-functions": "4.5.0",
"firebase-tools": "12.8.1",

Its a real hassle to disable extension when trying to set a breakpoint. Is there any more info needed to be able to fix this?

DavidWeiss2 commented 4 months ago

??

joehan commented 4 months ago

Hey all, sorry for letting this slip by. The extensions emulator works very similarly to the codebases feature of functions, and we've seen issues with codebases & the inspect-functions flag before (ie https://github.com/firebase/firebase-tools/commit/cbd6eb369b90026998f12176f867bc1e47f8ed3d). This may be something similar - I'll investigate further and hopefully find a fix.