{"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/d1341dac899a79c027762f6b423d896045287620/packages/flow-for-vscode/src/utils/assertNoLogFileOption.ts#L1-L15","documentation":"On activation, flow-for-vscode reads the project's .flowconfig and rejects it if it contains a `log.file` option (regex /^log\\.file/m). The extension's logging integration cannot work while flow also writes a log file, so assertNoLogFileOption throws.","triggerScenarios":"Starting the Flow VS Code extension on a workspace whose .flowconfig (any section) contains a `log.file=...` line.","commonSituations":"Configs copied from CLI-heavy setups where flow logs to a file for debugging; debug flowconfigs from CI reused locally; team-shared flowconfig that includes logging for batch runs.","solutions":["Remove or comment out the `log.file` line in the workspace's .flowconfig (check all flowconfig variants)","Use the extension's output channel / VS Code developer tools for logging instead","Keep a separate flowconfig (e.g. .flowconfig-cli) for CLI runs that need file logs, selected via --flowconfig-name"],"exampleFix":"# before (.flowconfig)\n[options]\nlog.file=./flow.log\n\n# after (.flowconfig)\n[options]\n# log.file removed; use the extension's output panel","handlingStrategy":"validation","validationCode":"const hasLogFileOption = (flowconfig: string): boolean => /^log\\.file/mu.test(flowconfig);\n\nconst contents = fs.readFileSync(flowconfigPath, 'utf8');\nif (hasLogFileOption(contents)) {\n  // strip or warn before the extension activation path runs\n}","typeGuard":"function isSupportedFlowconfig(flowconfig: string): boolean {\n  return !/^log\\.file/mu.test(flowconfig);\n}","tryCatchPattern":null,"preventionTips":["Lint .flowconfig for log.file in CI","Keep debug/CLI flowconfigs as separate files","Do not copy CI logging options into the workspace flowconfig"],"tags":["flow","flowconfig","vscode","config","logging"],"backgroundTag":"unsupported-config-option","analyzedSha":"d1341dac899a79c027762f6b423d896045287620","analyzedAt":"2026-08-17T00:07:02.212Z","schemaVersion":2},"datasetVersion":"2026-08-17T04:17:16.089Z"}