From dc3e7b7c783863600f3f8958d64a99572b3c73b4 Mon Sep 17 00:00:00 2001 From: Daniel Lee Date: Tue, 14 Feb 2023 10:16:57 -0800 Subject: [PATCH] Fix bug where --inspect-functions flag always fails. (#5516) Fixes https://github.com/firebase/firebase-tools/issues/5509 --- CHANGELOG.md | 1 + src/emulator/functionsEmulator.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e69de29bb2d..065824bc2c7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -0,0 +1 @@ +Fix bug where --inspect-functions flag always fails. #5516 diff --git a/src/emulator/functionsEmulator.ts b/src/emulator/functionsEmulator.ts index 6965429405d..88556e87536 100644 --- a/src/emulator/functionsEmulator.ts +++ b/src/emulator/functionsEmulator.ts @@ -690,7 +690,7 @@ export class FunctionsEmulator implements EmulatorInstance { // In debug mode, we eagerly start the runtime processes to allow debuggers to attach // before invoking a function. if (this.args.debugPort) { - if (!emulatableBackend.bin?.startsWith("node")) { + if (!emulatableBackend.runtime?.startsWith("node")) { this.logger.log("WARN", "--inspect-functions only supported for Node.js runtimes."); } else { // Since we're about to start a runtime to be shared by all the functions in this codebase,