简体   繁体   English

查看在哪个 AppDomain 中加载了 object

[英]See in which AppDomain an object is loaded

When inspecting an object in the debugger, is it possible to see in which AppDomain the object is loaded?在调试器中检查 object 时,是否可以看到 object 加载到哪个AppDomain中? I mean: without coding any properties or methods in the object that return the current AppDomain.我的意思是:无需在 object 中编码返回当前 AppDomain 的任何属性或方法。 The various windows in the Visual Studio menu (Debug > Windows) do not seem to show this information at the object level. Visual Studio 菜单(调试 > Windows)中的各种 windows 似乎没有在 object 级别显示此信息。

Visual studio -> debug -> windows -> modules Visual Studio -> 调试 -> windows -> 模块

You can use SOS.dll for this, there's a good article on it on MSDN here您可以为此使用 SOS.dll, 这里的 MSDN 上有一篇很好的文章

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM