public InprocDebugger( Host host ) { this.Host = host; this.DebugHost = host.Debugger; this.Window = new DebuggerWindow( this ); this.Tools = new List<DebuggerTool>(); this.State = DebuggerState.Idle; this.Breakpoints = new BreakpointManager( this ); this.CodeCache = new CodeCache( this ); this.UserData = new UserDataStore(); this.SetupNavigation(); // Initialize tools... // ... this.CallstackTool = new CallstackTool( this ); this.Tools.Add( this.CallstackTool ); this.CodeTool = new CodeTool( this ); this.Tools.Add( this.CodeTool ); this.LogTool = new LogTool( this ); this.Tools.Add( this.LogTool ); this.MemoryTool = new MemoryTool( this ); this.Tools.Add( this.MemoryTool ); this.StatisticsTool = new StatisticsTool( this ); this.Tools.Add( this.StatisticsTool ); this.ThreadsTool = new ThreadsTool( this ); this.Tools.Add( this.ThreadsTool ); // ... this.Window.Show(); this.CodeTool.Show( this.Window.DockPanel ); this.LogTool.Show( this.Window.DockPanel ); this.ThreadsTool.Show( this.Window.DockPanel ); WeifenLuo.WinFormsUI.Docking.DockPane dp; dp = this.Window.DockPanel.DockPaneFactory.CreateDockPane( this.CodeTool, WeifenLuo.WinFormsUI.Docking.DockState.Document, true ); this.StatisticsTool.Show( dp, WeifenLuo.WinFormsUI.Docking.DockAlignment.Right, 0.45 ); dp = this.Window.DockPanel.DockPaneFactory.CreateDockPane( this.LogTool, WeifenLuo.WinFormsUI.Docking.DockState.DockBottom, true ); this.CallstackTool.Show( dp, WeifenLuo.WinFormsUI.Docking.DockAlignment.Right, 0.24 ); this.MemoryTool.Show( this.StatisticsTool.DockHandler.Pane, this.StatisticsTool ); this.Host.Debugger.Activate( this, Environment.MachineName, Environment.UserName, "InprocDebugger 1.0" ); foreach( DebuggerTool tool in this.Tools ) tool.OnAttached(); }
public void Setup( InprocDebugger debugger ) { _debugger = debugger; _codeCache = debugger.CodeCache; this.CalculateSize(); this.Invalidate(); }