I try to debug C# and use a try / catch block to put a breakpoint in the catch block so it stops at an error while you debug.
try
{
ItemData item = inventory.GetData(i)
}
catch (Exception e)
{
}
Is there an easier way to stop at an error while you debug?
You set breakpoint in try catch. The code in the catch will only be run when an error is encountered, otherwise it will be skipped.
Maybe you can set conditions in breakpoint: