Debugging: Displaying Exception Locations in Visual Studio¶
Configuration Method¶
Due to the design of Windows Siv3D running Main()
in a subthread, by default, the line where an exception occurs is not displayed in the code editor.
To make exception locations visible in the editor, open "Debug" → "Windows" → "Exception Settings" from the Visual Studio menu, and add s3d::Error
to the "Break When Thrown" list. This will cause the program to break on the next line when that type of exception occurs, making it easier to identify where exceptions happen.