监视窗口不适用于 COM+成分
在VS2010下调试COM+组件时出现问题。
当我进入组件方法并将成员变量添加到监视窗口时,它显示错误的值。同时,局部变量的值会正确显示。
是否可以修复成员变量的监视窗口?
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.
}
}
更多详细信息:
1) 通过 Activator 创建的 COM+ 组件
Type classSC = Type.GetTypeFromProgID(item.Name)
Object obj = Activator.CreateInstance(classSC)
2) 调试组件时“this”指向 __TransparentProxy
3) 不同的激活类型库/服务器会重现相同的问题。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论