From 9feb493680f31be83d7aae810608f04fbaa06652 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Thu, 14 Aug 2025 14:12:54 -0400 Subject: [PATCH] Add instructions for including CARBON_VLOG output when running a file_test (#5959) --- toolchain/docs/adding_features.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/toolchain/docs/adding_features.md b/toolchain/docs/adding_features.md index 536535755b4c..0f4dae746d3b 100644 --- a/toolchain/docs/adding_features.md +++ b/toolchain/docs/adding_features.md @@ -605,6 +605,19 @@ The `-v` flag can be passed to trace state, and should be specified before the subcommand name: `carbon -v compile ...`. `CARBON_VLOG` is used to print output in this mode. There is currently no control over the degree of verbosity. +To include VLOG output when debugging a file test, add an `ARGS: -v compile %s` +line to the file, such as: + +``` +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon +// ARGS: -v compile %s +// EXTRA-ARGS: --dump-sem-ir-ranges=if-present +``` + +This will also include the VLOG output when running the test in an interactive +debugger. Note that using `-v compile` with `autoupdate.py` will deeply mangle +your test file, so avoid doing that. + #### Stack traces While the iterative processing pattern means function stack traces will have