While debugging my ArcObjects-code using VS2015 and .NET 4.5 I often try to inspect the data from my geodatabase.

So for example see this code:

public static bool PointsAreCollinear(IPoint from, IPoint intermediate, IPoint to, double tolsquare)
    // We compare the distance of the intermediate Point from the line between from and to.
    // (intermediate-from)*perp = dist * len
    // where perp is a vector perpendicular to (to-from) and len is it's length.
    // In order to avoid square roots, we prefer calculating the squares

    double tx = to.X - from.X;
    double ty = to.Y - from.Y;
    double hx = intermediate.X - from.X;
    double hy = intermediate.Y - from.Y;

    double lenSq = tx * tx + ty * ty;
    double dByLen = hx * ty - hy * tx;
    double dByLenSq = dByLen * dByLen;

    return dByLenSq <= lenSq * tolsquare;

When I add a watch to to for example it gives me this annoying info. From this thread I suppose we could get the information for all the properties that are actually used within my source-code. All the rest is omitted while generating the interop-types for COM-objects. However as you can see I actually do use to.X, which is why I supposed that I could at least see its value within my quickwatch.

The suggestion from the mentioned post was to use the "Dynamic view" which depends on IDispatch.GetTypeInfo(). However that didn´t help neither.

Did anyone else ever had this problem when debugging ArcObjects?

enter image description here


After some weeks we finally found an easy solution to re-enable that feature for .NET 4.x:

In Visual Studio under Tools-->Options-->Debugging enable the option "Use Managed Compatibility Mode".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.