Tuesday, March 06, 2007

Debug AutoCAD 2007 from VS2005 on Windows Vista

Hello,

After some research I have tried to Debug AutoCAD 2007 again but this time starting the Visual Studio 2005 with "Run as Administrator" feature. Now I'm able to Debug AutoCAD 2007 from VS2005.

More tips to come as soon as I figure out them... :)

If you have discovered something else, please share with this Blog!

Cheers!

8 comments :

Sachin Pise said...

Hi.
I am new to Object ARX. I am developing an application on C#, VS 2005 for AutoCAD. Using managed API. But Debug somehow is not working. I tried searing a lot. Are there any settings needs to be done??

Fernando Malard said...

Hello Sachin,

Check your C# project settings. Right click on it, select Properties:

- Choose "Start external program" as Start Action and point to your acad.exe;

- If your code access unmanaged information, enable the "Enable unmanaged code debugging" check box;

Further, make sure you use the ObjectARX templates to create your C# samples.

Regards,

Anonymous said...

Hello.

I'm new in ObjectARX programming. I've made a simple app. in C++ and i have to debug it now in VS 2008, but it seems to be not as easy as I thought. I am using AutoCAD 2010 and ObjectARX 2010. Could you please help me about all necessary settings?

Thanks

Fernando Malard said...

Hello,

To Debug the application you need to build it in Debug mode and set the acad.exe as the startup host application.

If you create your application using the ARXWizard there shouldn't be any problem with that.

Regards.

Anonymous said...

Hello Fernando.

Thank you for this hints, but could you please be more specific? I already built it in Debug mode.

Thanks

Fernando Malard said...

Try to create a new project from scratch, compile it in Debug and hit F5. It should just works.

If it display a message that AutoCAD cannot be found this is because your default path has changed. In this case, open the Project Settings and go to Debug item, change the External program for debugging.

Not that for coding custom compilation you need to enable _DEBUG symbol during project creation.

Regards.

Anonymous said...

Hello Fernando.

When I hit F5 a following warning shows:

Debugger detected - please close it down and restart! Windows NT users: Please note that having the WinIce/SoftIce service installed means that you are running a debugger!

Do you have an idea how to solve this?

Best regards

Fernando Malard said...

Wow, this is really strange.

Can you debug a simple MFC EXE application?

Have you tried to reinstall Visual Studio?

I have never heard about this error.