Making AutoCAD less noisy when debugging
Thanks for George Varghese and Albert Szilvasy from the AutoCAD Engineering team for this helpful tip (culled from an internal email discussion).
If you’ve ever wondered how to reduce the noise AutoCAD makes in Visual Studio’s output window while debugging – at least since AutoCAD 2009, when we integrated WPF for user-interface components such as the ribbon – then this post will be of help to you.
Here’s the window we’re talking about, which fills with messages from the application being debugged (in this case AutoCAD, whose acad.exe needs to be listed in the Debug properties under Start external program):
It’s possible to edit the acad.exe.config file – found in the the same folder as the acad.exe you’re debugging, such as C:\Program Files\Autodesk\AutoCAD 2011 – to add some entries asking the WPF binding trace provider to lower the volume.
Here are the lines you need to add, in bold:
<!--All assemblies in AutoCAD are fully trusted so there's no point generating publisher evidence-->
<source name="System.Windows.Data" switchName="SourceSwitch">
<remove name="Default" />
To give you an idea of the effect, the number of lines in Visual Studio’s Output window went from 135 lines of content to 38 for similar debugging operations on my system, simply by adding these lines to acad.exe.config.