{"record":{"id":"71436f97996a17b1","repo":"vercel/next.js","slug":"the-node-js-debugger-port-is-already-open-at-pro","errorCode":null,"errorMessage":"The Node.js debugger port is already open at ${process.debugPort}. Ignoring '--inspect${inspect === true ? '' : `\"${formatDebugAddress(inspect)}\"`}'.","messagePattern":"The Node\\.js debugger port is already open at (.+?)\\. Ignoring '--inspect(.+?)\"`\\}'\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/next/src/cli/next-start.ts","lineNumber":57,"sourceCode":" * @param options The options for the start command\n * @param directory The directory to start the server in\n */\nconst nextStart = async (options: NextStartOptions, directory?: string) => {\n  const dir = getProjectDir(directory)\n  const hostname = options.hostname\n  const inspect = options.inspect\n  const port = options.port\n  const keepAliveTimeout = options.keepAliveTimeout\n\n  if (isPortIsReserved(port)) {\n    printAndExit(getReservedPortExplanation(port), 1)\n  }\n\n  if (inspect) {\n    const inspector = await import('inspector')\n    const isInspecting = inspector.url() !== undefined\n    if (isInspecting) {\n      Log.warn(\n        `The Node.js debugger port is already open at ${process.debugPort}. Ignoring '--inspect${inspect === true ? '' : `=\"${formatDebugAddress(inspect)}\"`}'.`\n      )\n    } else {\n      const inspectAddress: DebugAddress =\n        inspect === true ? getParsedDebugAddress(true) : inspect\n      // TODO: Implement --inspect-wait\n      const wait = false\n      try {\n        inspector.open(inspectAddress.port, inspectAddress.host, wait)\n      } catch (error) {\n        console.error(\n          `Failed to start the Node.js inspector with --inspect=\"${formatDebugAddress(inspectAddress)}\":`,\n          error\n        )\n        return process.exit(1)\n      }\n    }\n  }","sourceCodeStart":39,"sourceCodeEnd":75,"githubUrl":"https://github.com/vercel/next.js/blob/0eb377541648e63402a47b38fee00a8d0ce8f8f1/packages/next/src/cli/next-start.ts#L39-L75","documentation":"nextStart checks inspector.url() before honoring --inspect; when the Node.js debugger is already listening (e.g. the process was started with node --inspect), it logs this notice and skips opening a second inspector session on the requested address.","triggerScenarios":"Thrown at packages/next/src/cli/next-start.ts:57 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Remove the duplicate `--inspect` flag, or close the existing debugger session using that port."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0eb377541648e63402a47b38fee00a8d0ce8f8f1","analyzedAt":"2026-08-19T02:10:13.922Z","contentChangedAt":"2026-08-19T02:10:13.922Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}