Showing posts with label development. Show all posts
Showing posts with label development. Show all posts

Monday, March 20, 2017

C# trick to launch runtime debugger

I have used this trick quite successfully many times to launch a debugger from a running application. It works really well for things that are hard to debug.  Things like DLLs that might be running under a different application, or display tasks that happen periodically and launching the application in the debugger might change the way the application runs and not cause the bug you are looking for.  It works by basically crashing the application with an exception which brings up the dialog to allow you to continue or debug.  You can have visual studio already loaded with the application and choose that instance of VS from the list.  It is a one liner that you add to your code.

So simple. In your C# code, simply add this line.

Debugger.Launch();

You can do this in any language, but I'm using c# at the moment so showing that. This is very handy.

Friday, December 1, 2006

All Things Software Development

I've decided to create a blog on some of the fun development stuff I'm always working on. This will be an on again off again blog as I go through cycles of development. Most of my fun code writing is for Gaming so this will probably have a strong gaming tilt. I've been working a little with Flash, Linden Scripting Language (lsl/Second Life), and Torque on the fun side. On the business side, it's all about Java, C and C++. Hopefully this is useful for more than just me. I'm planning on using this as a sort of notebook so I can come back here and find code samples and reminders when I'm working on projects that have become a little stale in my mind, which takes about 30 seconds.