Debug problems

Debug problems

Anonymous
Not applicable
1,338 Views
4 Replies
Message 1 of 5

Debug problems

Anonymous
Not applicable
I am setting up a new machine for my development and I have run into a problem in which the Visual Studio debugger doesn't let me debug my application. I tried to isolate the problem by using te simplest Hello World application. The details are as under:

(1) Using AutoCAD 2010, ObjectARX 2010, Visual Studio 2008 SP1, Windows XP 32 bit SP3
(2) Wrote the simplest Hello World application as per the ObjectARX sample. The solution references acdbmgd and acmgd from the ObjectARX\inc-win32 folder
(3) Set the debug executable to acad.exe.
(4) Run the solution, gives an error "Exception has been throws by the target of invocation..." pointing to AcAppFrame.xaml. I am able to continue the debug by clicking the Continue button.
(5) At the AutoCAD prompt, netload the hello dll.
(6) Give Hello command - AutoCAD says unknown command.

If I netload the dll by running AutoCAD outside te debugger, the hello command works.

Any idea what is going on here - I am new to Arx .NET development on AutoCAD 2010. Have I missed any important setting here? I have attached the project.

Thanks, Gagan
0 Likes
1,339 Views
4 Replies
Replies (4)
Message 2 of 5

Anonymous
Not applicable
AutoCAD's managed runtime routinely throws exceptions.

By default, Visual Studio will break on any managed exception in the process,
not just those that are thrown by code that's called by your own code.

To prevent it, goto Tools->Options, and select the 'Debugging' node
in the tree on the left.

Then, check "Enable Just My Code..." on the right.

You can also enable or disable breaking on specific exceptions using
Exceptions dialog (Debug->Exceptions).

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD
Supporting AutoCAD 2000 through 2010

http://www.acadxtabs.com

Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");

wrote in message news:6345603@discussion.autodesk.com...
I am setting up a new machine for my development and I have run into a problem
in which the Visual Studio debugger doesn't let me debug my application. I tried
to isolate the problem by using te simplest Hello World application. The details
are as under:

(1) Using AutoCAD 2010, ObjectARX 2010, Visual Studio 2008 SP1, Windows XP 32
bit SP3
(2) Wrote the simplest Hello World application as per the ObjectARX sample. The
solution references acdbmgd and acmgd from the ObjectARX\inc-win32 folder
(3) Set the debug executable to acad.exe.
(4) Run the solution, gives an error "Exception has been throws by the target of
invocation..." pointing to AcAppFrame.xaml. I am able to continue the debug by
clicking the Continue button.
(5) At the AutoCAD prompt, netload the hello dll.
(6) Give Hello command - AutoCAD says unknown command.

If I netload the dll by running AutoCAD outside te debugger, the hello command
works.

Any idea what is going on here - I am new to Arx .NET development on AutoCAD
2010. Have I missed any important setting here? I have attached the project.

Thanks, Gagan
0 Likes
Message 3 of 5

Anonymous
Not applicable
Thanks, Tony. The setting that you suggested is already set. AutoCAD still complains that Hello is an unknown command. I have attached the exception stack herewith - does that help any? Also, do I need to set up any settings in the Debug>Exceptions - I have left it to whatever the default settings are when the VS was installed.

Thanks, Gagan
0 Likes
Message 4 of 5

Anonymous
Not applicable
In your project references, make sure the CopyLocal
property for acmdg.dll and acdbmgd.dll, and any other
Autodesk-supplied assemblies, are all set to false.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD
Supporting AutoCAD 2000 through 2010

http://www.acadxtabs.com

Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");

wrote in message news:6345660@discussion.autodesk.com...
Thanks, Tony. The setting that you suggested is already set. AutoCAD still
complains that Hello is an unknown command. I have attached the exception stack
herewith - does that help any? Also, do I need to set up any settings in the
Debug>Exceptions - I have left it to whatever the default settings are when the
VS was installed.

Thanks, Gagan
0 Likes
Message 5 of 5

Anonymous
Not applicable
Thank you Tony, that fixed it!

Thanks, Gagan
0 Likes