Version: Unity 6.0 (6000.0)
Language : English
Optimizing arrays
Debug C# code in Unity

Debugging and diagnostics

Unity supports a range of tools for debugging and diagnosing issues in your project code.

Topic Description
Debug C# code in Unity Track down bugs in your scripts by attaching external debuggers and stepping through your project code as it executes.
The Debug class Use the Debug class in your project code to write messages and errors to the Console window.
Log files reference Locate Unity’s log files which record messages, warnings, and errors that can help you understand the source of problems in your application.
Stack trace logging Configure the level of stack trace information shown in Unity’s log files and console to help track down problems in your scripts.
Roslyn analyzers and source generators Use analyzers to inspect your code for style, quality, and other issues.
Safe Mode Understand Unity’s Safe Mode, a mode that the Unity Editor enters if there are compilation errors in your project.

Additional resources

Optimizing arrays
Debug C# code in Unity