Watch window is not working for COM+ components

137 Views Asked by At

The problem arrives when debugging COM+ component under VS2010.

When I step into a method of compoment and add member variable into the watch window it displays wrong value. At the same time values for local variables are displayed correctly.

Is it possible to fix the watch window for member variables?

class MyComponent : ServicedComponent, MyInterface
{
    private int _val;

    protected override void Activate()
    {
       _val = 1;
      // _val is a member variable.
      // According to watch window value of _val is 4052134 or something. 
      // This could not be truth!

      int x = _val;
      // x is a local variable.
      // According to watch window value of x is 1. 
      // This is correct.
    }
}

More details:

1) COM+ component created through Activator

Type classSC = Type.GetTypeFromProgID(item.Name)
Object obj = Activator.CreateInstance(classSC)

2) When debugging component "this" points to __TransparentProxy

3) The same issue reproduced for different activation types Library/Server.

0

There are 0 best solutions below