Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing 11.22.0 results in --inspect-functions only supported for Node.js runtimes and debugger will not attach #5509

Closed
Zelfapp opened this issue Feb 11, 2023 · 4 comments · Fixed by #5516

Comments

@Zelfapp
Copy link

Zelfapp commented Feb 11, 2023

[REQUIRED] Environment info

firebase-tools: 11.22.0

Platform: Manjaro Linux

Nodejs version is: 16.16.0

[REQUIRED] Test case

Using npm i -g firebase-tools to install 11.22.0 and then trying to start emulator with --inspect-functions I can no longer attach a debugger in 11.22.0. Instead I get the warning during startup that --inspect-functions only supported for Node.js runtimes. So I tried this fix on an issue that is now closed, by running /usr/local/bin/firebase is:npm i node@16 --save-dev in my functions directory. However, this did not solve the problem. I completely removed the node_modules directory and reinstalled everything. Tried completely uninstalling firebase-tools, which is installed globally, and then reinstalling, but the only thing that worked was to downgrade to 11.21.0.

Please advise, what is the upgrade path to 11.22.0? Thanks.

[REQUIRED] Steps to reproduce

  1. From functions directory firebase emulators:start --import=../saved-data --export-on-exit --inspect-functions add the --inspect functions flag to start in debug mode.
  2. Using vscode or webstorm attempt to attach a debugger to listen on port 9229.

[REQUIRED] Expected behavior

In firestore emulator console should see:

  • > Debugger listening on ws://127.0.0.1:9229/... during emulator startup when using --inspect-functions flag.
  • > Debugger attached. when attaching a debugger from an IDE.

[REQUIRED] Actual behavior

During firebase emulator startup I see this warning: --inspect-functions only supported for Node.js runtimes and I cannot attach a debugger to listen on port 9229.

@joerozek
Copy link

Experiencing the same problem on Max OSX 12.5, node 16.15

@Zelfapp
Copy link
Author

Zelfapp commented Feb 13, 2023

Experiencing the same problem on Max OSX 12.5, node 16.15

Give my post a thumbs up and it will get more attention. I still have not found a resolution.

@tanaka-baseed
Copy link

tanaka-baseed commented Feb 14, 2023

functionsEmulator.ts
if (!emulatableBackend.bin?.startsWith("node")) { this.logger.log("WARN", "--inspect-functions only supported for Node.js runtimes.");

In my environment, the emulatableBackend.bin has the full path included. Therefore, the path string is at the beginning and the "node" string is at the end. Isn't endsWith correct?
I directly edited it in my environment and it worked.

@aalej
Copy link
Contributor

aalej commented Feb 14, 2023

Hi @Zelfapp, thanks for reporting this, and thanks to everyone for the additional context. I was able to reproduce the issue using the steps provided. Let me relay my observations to the team so that we can take a look into this. That said, I'll be marking this as reproducible for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants