Školenie
Študijný program
Debug C# console applications (Get started with C#, Part 6) - Training
Debug C# console applications (Get started with C#, Part 6)
Tento prehliadač už nie je podporovaný.
Inovujte na Microsoft Edge a využívajte najnovšie funkcie, aktualizácie zabezpečenia a technickú podporu.
Certain properties should be set the same way for all managed debugging scenarios.
The following tables display recommended property settings.
Settings not listed here may vary among the different managed project types. For example, Start Action will be set differently in a Windows Forms project than in a ASP.NET project.
Property Name | Setting |
---|---|
Define DEBUG constant | C# and F#: Set the check box to checked. This enables your application to use the Debug class. |
Define TRACE constant | C# and F#: Set the check box to checked. This enables your application to use the Trace class. |
Optimize code | C#, F#, and Visual Basic: Set to false. Optimized code is harder to debug, because the generated instructions do not correspond directly to your source code. If you find your program has a bug that appears only in optimized code, you can turn this setting on, but remember that code shown in the Disassembly window is generated from optimized source that might not match what you see in the Code Editor. To debug optimized code, you must turn off Just My Code. (See Restrict stepping to Just My Code). For more information, see Project Settings for C# Debug Configurations or Project Settings for a Visual Basic Debug Configuration. |
Output path | Set to bin\Debug\. |
Advanced Compile Options | Visual Basic Only. Click Advanced to set the advanced properties that are described in the following table. |
Property Name | Setting |
---|---|
Enable optimizations | Set to false for the reasons specified in the Optimize code option in the preceding table. |
Generate debugging information | Select this check box to cause the /DEBUG flag to be set when compiling, which will generate information needed to facilitate debugging. |
Define DEBUG constant | Select this check box to define the DEBUG constant, which enables your application to use the Debug class. |
Define TRACE constant | Select this check box to define the TRACE constant, which enables your application to use the Trace class. |
Školenie
Študijný program
Debug C# console applications (Get started with C#, Part 6) - Training
Debug C# console applications (Get started with C#, Part 6)
Dokumentácia
Debug user code with Just My Code - Visual Studio (Windows)
Just My Code is a debugging feature that automatically steps over calls to non-user code. Learn how to enable, disable, and use this feature.
General, Debugging, Options Dialog Box - Visual Studio (Windows)
Set Visual Studio debugger options to meet your debugging needs. You can configure break behavior, debugging levels, display behavior, and much else.
Debug .NET Framework source - Visual Studio (Windows)
Debug .NET Framework source by enabling stepping into .NET Framework source code and allowing access to debugging symbols for the code.