Просмотр исходного кода

Add instructions for including CARBON_VLOG output when running a file_test (#5959)

Dana Jansens 8 месяцев назад
Родитель
Сommit
9feb493680
1 измененных файлов с 13 добавлено и 0 удалено
  1. 13 0
      toolchain/docs/adding_features.md

+ 13 - 0
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