Kean Walmsley


  • About the Author
    Kean on Google+

July 2014

Sun Mon Tue Wed Thu Fri Sat
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31    








« Instant 3D model capture | Main | Handling DPI scaling in your .NET application’s forms »

March 09, 2011

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):

Visual Studio's output window

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:

<configuration>

<!--

  <startup useLegacyV2RuntimeActivationPolicy="true">

    <supportedRuntime version="v4.0"/>

  </startup>

-->

 

<!--All assemblies in AutoCAD are fully trusted so there's no point generating publisher evidence-->

  <runtime>       

    <generatePublisherEvidence enabled="false"/>   

  </runtime>

 

  <system.diagnostics>

    <sources>

      <source name="System.Windows.Data" switchName="SourceSwitch">

        <listeners>

          <remove name="Default" />

        </listeners>

      </source>

    </sources>

  </system.diagnostics>

</configuration>

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.

blog comments powered by Disqus

10 Random Posts