Skip to content

Commit 34c613e

Browse files
authored
Improve clarity on generating module trace files
Clarified instructions for generating a module trace file and emphasized the importance of reducing code complexity for diagnostics.
1 parent 53b8908 commit 34c613e

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

docs/overview/how-to-report-a-problem-with-the-visual-cpp-toolset.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -313,13 +313,14 @@ Finally, attach the preprocessed repro files (*filename*.i and *modulename*.i) a
313313

314314
#### To generate a module trace file
315315

316-
When issues involve C++ modules, providing a module trace file along with the preprocessed repro improves diagnostic quality and reduces turnaround time. A module trace file records detailed information about module operations during compilation.
316+
When issues involve C++ modules, provide a module trace file along with the preprocessed repro improves diagnostic quality to reduce turnaround time. A module trace file records detailed information about module operations during compilation.
317317

318-
1. In the developer command prompt console window, enter the command **cl /d1module:enableLogging** *trace.json* [*other-args*] *filename.cpp*. For *trace.json*, specify the desired output file name for the module trace. For [*other-args*], include any additional compilation arguments. For *filename.cpp*, specify the source file that reproduces the problem.
318+
It's ideal if the example can be condensed to a single source code file, without reference to any user headers.
319319

320-
> [!IMPORTANT]
321-
> You must compile exactly one source file to collect a module trace. Don't use the **/MP** (multi-processor compilation) option or invoke the compiler with multiple source files. Using **/MP** or multi-source invocations can cause the trace to represent only the last compiled file or be incomplete.
320+
Reducing the amount of code we have to consider as a possible contributor to the problem is enormously helpful to us. Using **/MP** or multi-source invocations can cause the trace to represent only the last compiled file or be incomplete. If you can't reduce the problem to a single source file, package your code into a .zip file or similar, or consider using an IDE project repro. For more information, see [Other repros](#other-repros).
322321

322+
1. Open the **Developer Command Prompt** that matches the Visual Studio version and configuration architecture used to build your project.
323+
1. Enter the command `cl /d1module:enableLogging` *trace.json* [*other-args*] *filename.cpp*. For *trace.json*, specify the desired output file name for the module trace. For [*other-args*], include any additional compilation arguments. For *filename.cpp*, specify the source file that reproduces the problem.
323324
1. If multiple translation units are involved in the problem, run separate single-file invocations to collect a trace for the specific file that reproduces the problem. You can collect traces for additional relevant files if needed.
324325

325326
Finally, attach the generated *trace.json* file along with the preprocessed repro to your report.

0 commit comments

Comments
 (0)