• How to debug add-ins for arcgis


    Debugging add-ins
    To debug an add-in, follow these steps:
    1. Confirm that the add-in is deployed to the well known folder where the Desktop applications will access it. Typically this is already done because add-ins created with the ESRI Visual Studio integrated development environment (IDE) template are automatically deployed each time they are built.
    2. Establish the target application in the project debug settings dialog box. For example, to use ArcMap.exe as the debugging application, do the following: 
      1. Right-click the add-in project in the Solution Explorer window and click Properties. 
      2. Click the Debug tab on the property page. 
      3. Under Start Action, click the Start external program radio button to use ArcMap.exe in the Bin folder of your ArcGIS install directory as shown in the following screen shot:
    ms-help://ESRI.EDNv9.3/NET_Desktop/bitmaps/ec9c3bf9-1bae-4d56-9ae6-e439dbd0f18f11.png
    Once an add-in has been loaded in an application, subsequent changes to the add-in project will not appear until the running application is restarted.
    Depending on which version of .NET you are targeting, you may have to alter the Desktop application's configuration file to get debugging to work properly. For example, if you've written an add-in for ArcMap that uses .NET 4.0, make sure v4.0 is set as the supported run-time in ArcMap.exe.config which resides beside ArcMap.exe.
    [XML]
    <?xml version="1.0" encoding="utf-8"?>
    <configuration>
      <startup>
        <supportedRuntime version="v4.0.30319"/>
        <!--<supportedRuntime version="v2.0.50727"/>-->
      </startup>
      ...
    </configuration>
    Conversely, if you can't debug your .NET 3.5 (or under) add-in, make sure .NET 2.0 is listed as the supported run-time in your desktop configuration file.
    [XML]
    <?xml version="1.0" encoding="utf-8"?>
    <configuration>
      <startup>
        <supportedRuntime version="v2.0.50727"/>
        <!--<supportedRuntime version="v4.0.30319"/>-->
      </startup>
      ...
    </configuration>
    After changing a desktop configuration file, you may have to restart Visual Studio for the changes to take effect.
    作者:qidong
    本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须在文章页面给出原文连接,否则保留追究法律责任的权利。
  • 相关阅读:
    微信公众平台入门到精通-新浪云计算平台注册和使用
    PhpStorm快捷键设置/个性化设置,如何多项目共存?如何更换主题?
    10个免费的PHP编辑器/开发工具
    php利用PHPExcel类导出导入Excel用法
    PHP遍历数组的几种方法
    SQLSTATE[HY000] [2003] Can't connect to MySQL server on 'XXX' (13)
    CentOS下Apache虚拟主机配置
    centos下vsftpd登录后无法看见文件,无法创建文件及文件夹
    Linux开启MySQL远程连接
    php禁止某ip或ip地址段访问的方法(转载)
  • 原文地址:https://www.cnblogs.com/qidong/p/10968260.html
Copyright © 2020-2023  润新知