How to troubleshoot and debug Visual Studio design mode errors?

For Visual Studio 2010, this answer does the job.

For Visual Studio 2012 or above, what you need to do is actually debug the Visual Studio Designer process. The process you want to debug is called XDesProc.exe

Enter image description here.

I do the following:

  • Open two instances of Visual Studio both pointing to the same solution
  • Close all windows in both.
  • Kill all XDesProc.exe instances in Task Manager
  • In Visual studio instance A, open any view (not one that has the exception). This will start the XDesProc designer process for Visual Studio Instance A
  • In Visual Studio instance B, attach to process on XDesProc.exe and set your breakpoints, or, set Break on exceptions
  • In Visual Studio instance A, open the view (that has the exception)
  • Visual Studio B should break.

Enter image description here

If you missed it, or need to restart the steps, start again from step (2) ‘Close all windows’ killing XDesProc instances. Sometimes the designer starts up once and caches values, and you will need to have a clean, non-exception designer to track down the problem.

Leave a Comment