明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 673|回复: 0

Making AutoCAD less noisy when debugging

[复制链接]
发表于 2011-3-10 21:55:12 | 显示全部楼层 |阅读模式

本文作者:kean

原文地址:http://through-the-interface.typepad.com/through_the_interface/2011/03/making-autocad-less-noisy-when-debugging.html

 

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:

<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.

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

x
"觉得好,就打赏"
还没有人打赏,支持一下

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-12-24 20:17 , Processed in 0.180726 second(s), 32 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表