代码之家  ›  专栏  ›  技术社区  ›  Peter Mounce

是否有用于ASP.NET会话的Visual Studio调试器可视化工具?

  •  8
  • Peter Mounce  · 技术社区  · 16 年前

    如果是的话,我在哪里能买到?

    2 回复  |  直到 16 年前
        1
  •  2
  •   Thomas    15 年前

    你试过了吗 this 一个来自codeproject?在更正对 Microsoft.VisualStudio.DebuggerVisualizers 从版本9.0到10.0,它在VS2010中工作。

    安装文件夹是:

    C:\Program files\Microsoft Visual Studio 10.0\Common7\Packages\Debugger\Visualizers

        2
  •  2
  •   badabadabada    16 年前

    彼得,最好集中会话访问。

    public class SessionStateBag
    {
        private static string SessionPropertyXKey = "SessionPropertyX";
        public static int SessionPropertyX
        {
            get { return Session[SessionPropertyXKey]; }
            set { Session[SessionPropertyXKey] = value; }
        }
    
        private static string SessionPropertyYKey = "SessionPropertyY";
        public static string SessionPropertyY
        {
            get { return Session[SessionPropertyYKey]; }
            set { Session[SessionPropertyYKey] = value; }
        }
    
        // etc. Try to guess the type of the session property. If you cannot guess it; use object.
    }
    

    在代码的其余部分中,将session[“xxx”]替换为上面sessionstatebag的一个属性。

    这可能需要一两天的时间,但是您可以在一个地方访问所有会话,并且能够洞察会话对象有时创建的迷宫。

    推荐文章