This documentation is archived and is not being maintained.


Creates a file you can use when filing a bug report.



Required. The name of the file that will contain your bug report.


The following information is placed in file:

  • A copy of all source code files in the compilation.
  • A list of the compiler options used in the compilation.
  • Version information about your compiler, common language runtime, and operating system.
  • Compiler output, if any.
  • A description of the problem, for which you are prompted.
  • A description of how you think the problem should be fixed, for which you are prompted.

Because a copy of all source code files is placed in file, you may want to reproduce the (suspected) code defect in the shortest possible program.

Note   The /bugreport option is not available from within the Visual Studio development environment; it is available only when compiling from the command line. It cannot be changed programmatically.
Security Note   The /bugreport option produces a file that contains potentially sensitive information including: current time, compiler version, .NET Framework version, OS version, user name, the command-line arguments with which the compiler was run, all source code, and the binary form of any referenced assembly. This option can be accessed by specifying command-line options in the web.config file for a server-side compilation of an ASP.NET application. To prevent this from happening, disallow users from compiling on the server via the machine.config file.


The following example compiles t2.vb and puts all bug reporting information in the file problem.txt:

vbc /bugreport:problem.txt t2.vb 

See Also

Visual Basic Compiler Options | /debug | Sample Compilation Command Lines | Machine Configuration Files | <trustlevel>