{"record":{"id":"48067f693d22832b","repo":"facebook/flow","slug":"unsupported-flowconfig-option-log-file-the-vs","errorCode":null,"errorMessage":"Unsupported .flowconfig option `log.file`. The VS Code extension does not support this option.","messagePattern":"Unsupported \\.flowconfig option `log\\.file`\\. The VS Code extension does not support this option\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/flow-for-vscode/src/utils/assertNoLogFileOption.ts","lineNumber":10,"sourceCode":"/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nexport default function assertNoLogFileOption(flowconfig: string): void {\n  if (/^log\\.file/mu.test(flowconfig)) {\n    throw new Error(\n      'Unsupported .flowconfig option `log.file`. The VS Code extension does not support this option.',\n    );\n  }\n}\n","sourceCodeStart":1,"sourceCodeEnd":15,"githubUrl":"https://github.com/facebook/flow/blob/f88ac94bcf6992f5d5a158854d94613ebb92c6e6/packages/flow-for-vscode/src/utils/assertNoLogFileOption.ts#L1-L15","documentation":"The flow-for-vscode extension rejects any .flowconfig containing a log.file option (matched with /^log\\.file/mu). The extension manages its own flow server lifecycle, and a user-specified log file conflicts with that management, so startup aborts with this error.","triggerScenarios":"A project .flowconfig (or the flowconfig the extension discovers) with `log.file=<path>` under [options]; the extension calls assertNoLogFileOption on that file's contents and throws before launching flow.","commonSituations":"Teams sharing a .flowconfig between CLI usage (where log.file was set for debugging) and VS Code; copying flowconfig templates that include logging; leftover debugging options never removed.","solutions":["Delete the `log.file=...` line from the [options] section of the project's .flowconfig.","If you need flow logs, capture them from the CLI in a separate flowconfig used only for CLI debugging (e.g. .flowconfig.debug), not the one the extension loads.","Reload the VS Code window after editing the flowconfig."],"exampleFix":"; before (.flowconfig)\n[options]\nlog.file=./flow.log\n\n; after\n[options]","handlingStrategy":"validation","validationCode":"// Lint the flowconfig before the extension rejects it\nfunction flowconfigHasLogFile(flowconfigText) {\n  return /^log\\.file/mu.test(flowconfigText);\n}\nif (flowconfigHasLogFile(fs.readFileSync('.flowconfig', 'utf8'))) {\n  fail('remove log.file — unsupported by the VS Code extension');\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Do not commit log.file to a shared .flowconfig; keep debugging flowconfigs separate from the one the extension loads.","Add a repo lint/grep check for `^log\\.file` in CI to catch regressions."],"tags":["flow","vscode","flowconfig","config","extension"],"backgroundTag":"unsupported-config-option","analyzedSha":"f88ac94bcf6992f5d5a158854d94613ebb92c6e6","analyzedAt":"2026-08-20T10:41:37.992Z","contentChangedAt":"2026-08-20T10:41:37.992Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}