Debugging problem

Debugging problem

fsztuczny
Advocate Advocate
574 Views
1 Reply
Message 1 of 2

Debugging problem

fsztuczny
Advocate
Advocate

Hello
I have a debugging problem in the plugin during processing files opened from a path (collecting blocks using select fence method). They are throwing exceptions in absolutely random places of the code.

I'm using AutoCAD 2014 and VS express 2013. In VS (tools/options/debugging/general) is checked "Use managed compatibility mode". In each projects is set option Debug "Enable native code debugging".

My solution is divided into separete shared library projects (each projects are separate DLLs).

 

My open drawing method:

Document doc = Application.DocumentManager.MdiActiveDocument;
using( DocumentLock dlMain = doc.LockDocument() )
{
...
  Document _doc = Application.DocumentManager.Open( path, true );
  Database _db = _doc.Database;
  using( DocumentLock dl = _doc.LockDocument() )
  {
     //Some drawing operations
     //Some exceptions
  }
}

Without debugging it works fine. What is wrong?

0 Likes
575 Views
1 Reply
Reply (1)
Message 2 of 2

fsztuczny
Advocate
Advocate

I know what was the cause, more precisely what helped. It was necessary to unify the .NET version in all projects and reference to the SDK files (and adjust to required version by Autocad). Over the years I messed up and this caused debugging problems. In addition, total recompilation was required. Now I'm pretty surprised that debugging works as it should.

0 Likes