From fa7bcac46cd38dff92a4e4e7985ad1cb351fa7fd Mon Sep 17 00:00:00 2001 From: Gemma Tipper Date: Mon, 16 Dec 2024 10:49:55 +0000 Subject: [PATCH 1/3] add NodeInspector debugger type for mirrord to detect ports --- src/debugger.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/debugger.ts b/src/debugger.ts index 135cedec..5efd2ac2 100644 --- a/src/debugger.ts +++ b/src/debugger.ts @@ -171,6 +171,10 @@ async function main( config.env["MIRRORD_DETECT_DEBUGGER_PORT"] = "debugpy"; } else if (config.type === "java") { config.env["MIRRORD_DETECT_DEBUGGER_PORT"] = "javaagent"; + } else if (config.type === "node") { + // if any of the --inspect flags are used with node, the port for inspection should be ignored + // see: https://nodejs.org/en/learn/getting-started/debugging#enable-inspector + config.env["MIRRORD_DETECT_DEBUGGER_PORT"] = "nodeinspector"; } // Add a fixed range of ports that VS Code uses for debugging. From 5f29349d1185a4f0f760bc4ac055c98bdda76910 Mon Sep 17 00:00:00 2001 From: Gemma Tipper Date: Mon, 16 Dec 2024 10:53:38 +0000 Subject: [PATCH 2/3] Add changelog --- changelog.d/+node-inspector-debugger-type.fixed.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/+node-inspector-debugger-type.fixed.md diff --git a/changelog.d/+node-inspector-debugger-type.fixed.md b/changelog.d/+node-inspector-debugger-type.fixed.md new file mode 100644 index 00000000..56a1c704 --- /dev/null +++ b/changelog.d/+node-inspector-debugger-type.fixed.md @@ -0,0 +1 @@ +Added debugger port detection type for the node `--inspect`, `--inspect-wait` and `--inspect-brk` flags \ No newline at end of file From ca807814ab1f6167779af86049b13fbe9dcb667c Mon Sep 17 00:00:00 2001 From: Gemma Tipper Date: Wed, 18 Dec 2024 16:10:19 +0000 Subject: [PATCH 3/3] Fix config type --- src/debugger.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/debugger.ts b/src/debugger.ts index 5efd2ac2..4c4576f1 100644 --- a/src/debugger.ts +++ b/src/debugger.ts @@ -171,7 +171,7 @@ async function main( config.env["MIRRORD_DETECT_DEBUGGER_PORT"] = "debugpy"; } else if (config.type === "java") { config.env["MIRRORD_DETECT_DEBUGGER_PORT"] = "javaagent"; - } else if (config.type === "node") { + } else if (config.type === "pwa-node") { // if any of the --inspect flags are used with node, the port for inspection should be ignored // see: https://nodejs.org/en/learn/getting-started/debugging#enable-inspector config.env["MIRRORD_DETECT_DEBUGGER_PORT"] = "nodeinspector";