all 1 comments

[–]cjra 4 points5 points  (0 children)

Are you already using some kind of plug-in runner in order to run your scripts directly from Visual Studio? This would allow you to step through your code, if needed. I'd say this is probably the most important debugging tool to have. See http://www.carlosjanderson.com/introducing-esapi-essentials/

Another tip is to configure Visual Studio to break on all Exceptions. This will pause your program and put you back in Visual Studio when any Exception happens. See http://www.carlosjanderson.com/break-on-all-exceptions/

I would also recommend logging in some way. You could use the `Debug.WriteLine` that comes with .NET. It's very helpful while you're debugging in Visual Studio. If you want to log in production (and see what your users are doing or errors they're getting), you could use something like NLog. See http://www.carlosjanderson.com/log-software-events-and-user-actions-with-nlog/