Sep 23 2009

How to (really) turn off Just-In-Time Debugging (JIT)

Category: Software DevelopmentJeff @ 18:28

I'm working on developing a server process that needs to execute nightly.  While working out some kinks, the process occasionally throws an exception.  The server in question has Sql Server Management Studio installed on it, which uses Visual Studio as its application shell.  This means that the server tries to invoke Just-In-Time debugging whenever an unhandled exception is thrown.  This is a problem for a few reasons.

  • No one is logged in to the server when the error occurs, so there is no one to actually debug the process
  • The attempt to start up JIT prevents the actual exception message from being added to the event log
  • The machine isn't (and shouldn't be) set up for debugging the application anyway (it's a DB server, for Pete's sake!)

This MSDN article says to simply start up Visual Studio, go to Tools --> Options --> Debugging --> Just-In-Time and then uncheck all the boxes.  This isn't quite enough.  To complete the process, I had to follow the steps in another article (Just-In-Time Debugging) and remove some registry keys.

Of course there should not be any unhandled exceptions in an application!  However, in the early stages of testing a new server process, it's nice to be able to get helpful error messages when you do experience an unhandled exception.

Tags: ,

Mar 4 2009

Visual Studio Project Sorting Fix

Category: Software DevelopmentJeff @ 19:40

When you first create a solution using Visual Studio 2008, your projects sort nicely in alphabetical order.  But then as your project grows, you begin using solution folders to organize your projects.  It is at this point that your projects no longer sort alphabetically within their solution folders. 

Of course I've heard of the trick where you just choose one of the projects in a folder, press "F2" (rename) and then leave the project name as it was previously.  But this is 1) a pain, and 2) only sorts projects in that one solution folder.

So I created a tool that will modify your Visual Studio solution file (.sln) and make the projects sort properly within the solution folders.  Check it out at CodePlex:  Visual Studio Solution Sorter (http://solutionsorter.codeplex.com/).

Tags:

Dec 8 2008

My Visual Studio Color Settings

Category: Software Developmentemilioc @ 17:59

I am really surprised that there isn't a community site for sharing Visual Studio settings.  If there is one, let me know because I've looked and couldn't find anything.  I thought it would be nice to share my font and color settings for the people interested.  It's a version of Ragnarok Grey that I tweaked a little to fit my personal taste.  I uploaded some screen shots below to give you a preview.   The download only contains font and color settings so it will not change any of your other VS settings.  You should still back up your current settings just to be on the safe side. 

Dark-Colors.zip (1.97 kb)

You can find more color settings by Tomas Restrepo here including the original.

C#



HTML

JavaScript

Tags: , ,