Use Visual Studio to debug a breakpoint that does not work. Solution: Debug Revit CAD. Do not enter the breakpoint.

Source: Internet
Author: User
Tags visual studio 2010

Use Visual Studio to debug a breakpoint that does not work. Solution: Debug Revit CAD. Do not enter the breakpoint.

With the official release of Visual Studio 2010, I believe many people have upgraded to Visual Studio 2010 like me. When you use VS2010 to develop a. net application in AutoCAD, Map 3D, or Revit, most of you will encounter the problem that the breakpoint always does not work during debugging. Kean and Jeremy have recently mentioned several solutions respectively. Here we will share them with you. For the original article, refer to Hitting breakpoints in. NET Class Libraries while debugging with Visual Studio 2010 and Debugging with Visual Studio 2010 and RvtSamples

 

Update:

If problems are found during Debugging Using VS2010 + AutoCAD 2012 products, refer to another article in junqilian:

When Visual Studio 2010 is used to develop an AutoCAD 2012. net application for debugging, the breakpoint does not work.

 

The reason why the breakpoint does not work is that Visual Studio 2010 started the default debugger (v4.0) during debugging.. net applications can run on AutoCAD Map (or Revit. net 2.0 framework (3.5 is also running on top of CLR 2.0 ).

There are two solutions:

Solution 1

Edit the config file (acad.exe. config, revit.exe. config, and so on) of the Host Program. This file is in the installation directory of AutoCAD. Add the following code before </configuration>:

<Startup>

<SupportedRuntime version = "v2.0.50727"/>

</Startup>

 

Solution 2

Add the host exe file as an existing project to your solution, and set debugger to v2.0

  • Right-click Solution Explorer and choose Add-> Existing project to view the autocad Startup File acad.exe.

  • Right-click the Project and Set it to start the Project Set as StartUp Project

  • Open Project Properties dialog box Properties

  • Set Debugger Type to Managed v2.0

 

Now, after finishing the job, you can set the breakpoint to follow the previous method for debugging.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.