开发者

Watch window is not working for COM+ components

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.GetTypeFromProgI开发者_StackOverflow社区D(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

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜