.NET

Reply
Valued Mentor
AubelecBE
Posts: 373
Registered: ‎01-27-2010
Message 1 of 7 (508 Views)
Accepted Solution

autocad 2010 + VS2010 32b - autocad can't see the breakpoint in VS

508 Views, 6 Replies
05-30-2011 05:11 AM

Hello i want use VS2010 for debugging but VS dont stop where is my breakpoint.

 

I have following the tuto for the hello word  example for autodesk. tutorial.

 

I have try so many solution but all dont work...

 

Help please..

 

 

 

 

Valued Contributor
StormyC
Posts: 76
Registered: ‎11-19-2010
Message 2 of 7 (482 Views)

Re: autocad 2010 + VS2010 32b - autocad can't see the breakpoint in VS

05-31-2011 12:53 AM in reply to: AubelecBE

The below proceedure works for me (VS210 32bit, ACAD2010 on WinXP)

 

Find this line in ProjName.VBPROJ ...<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">

And add the following below it.
<StartAction>Program</StartAction>
<StartProgram>C:\Program Files\Autodesk\AutoCAD 2011\acad.exe</StartProgram>

 

ADD LINES BELOW JUST BEFORE </configuration> IN THE ACAD.EXE.CONFIG FILE FOUND IN THE AUTOCAD INSTALL FOLDER
<startup>
  <supportedRuntime version="v2.0.50727" />
</startup>

 

START VS2010
LOAD PROJECT TO BE DEBUGGED
START DEBUGGING
AFTER AUTOCAD HAS STARTED
TYPE "NETLOAD"
SELECT DEBUG CODE .DLL OF PROJECT
SET BRAKE POINTS
EXECUTE COMMAND THAT STARTS THE CODE

 

You must make sure your program is compiled targeting .NET 3.5..

 

Hope this sorts your problem out.

Valued Mentor
AubelecBE
Posts: 373
Registered: ‎01-27-2010
Message 3 of 7 (453 Views)

Re: autocad 2010 + VS2010 32b - autocad can't see the breakpoint in VS

06-03-2011 05:01 AM in reply to: StormyC

ind this line in ProjName.VBPROJ ...<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">

 

--> i dont have that line..

 

I have :

Application.designer.vb

AssemblyInfo.vb

Resources.Designer.vb

Setting.Designer.vb

 

Valued Contributor
StormyC
Posts: 76
Registered: ‎11-19-2010
Message 4 of 7 (440 Views)

Re: autocad 2010 + VS2010 32b - autocad can't see the breakpoint in VS

06-03-2011 08:41 AM in reply to: AubelecBE

You can find the file 'YourProjectName.vbproj' in the folder you save your projects to for example.....

 

C:\Documents and Settings\USERNAME\My Documents\Visual Studio 2010\Projects\ProjectName\ProjectName

 

Just do a search for *.vbproj and your should find the one your looking for.

Valued Mentor
AubelecBE
Posts: 373
Registered: ‎01-27-2010
Message 5 of 7 (437 Views)

Re: autocad 2010 + VS2010 32b - autocad can't see the breakpoint in VS

06-03-2011 08:50 AM in reply to: StormyC

Tank You it work fine !!

 

 

..

 

Member
BR-RRAD
Posts: 3
Registered: ‎06-03-2011
Message 6 of 7 (429 Views)

Re: autocad 2010 + VS2010 32b - autocad can't see the breakpoint in VS

06-03-2011 09:02 AM in reply to: AubelecBE

This post on the "Through the Interface" blog explains the issue and possible 3 solutions in some detail:

 

http://through-the-interface.typepad.com/through_the_interface/2010/04/hitting-breakpoints-in-net-cl... 

Valued Mentor
AubelecBE
Posts: 373
Registered: ‎01-27-2010
Message 7 of 7 (424 Views)

Re: autocad 2010 + VS2010 32b - autocad can't see the breakpoint in VS

06-03-2011 09:24 AM in reply to: BR-RRAD

Yes i read it before create this post but :

Solution 1

Start the exe that loads your AddIn (acad.exe, revit.exe, etc) and then attach to it from Visual Studio (Debug -> Attach to Process...)

--> I can'f fount it.

 

Solution 2

Modify the config file of the exe that loads your AddIn (acad.exe.config, revit.exe.config, etc) so that it contains the following just before the </configuration> part:

<startup/>

<supportedRuntimeversion="v2.0.50727"/>

</startup>

 

 

>--> I have do this but not working (before your add on the proj.)


Solution 3

Add the exe that loads your AddIn as an existing project to your solution and set the debugger version for it to v2.0.

  1. Right-click the Solution in the Solution Explorer and select Add -> Existing Project... and locate the exe that loads your AddIn

--> i can't fount it ( Add--> Existing project).

I have add new form etc.. but not existing project

 

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community