PageRenderTime 20ms CodeModel.GetById 16ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/ILSpy.SharpDevelop.LGPL/Services/IDebugger.cs

http://github.com/icsharpcode/ILSpy
C# | 122 lines | 40 code | 26 blank | 56 comment | 0 complexity | 6642662039006173ff1317459c38bbee MD5 | raw file
  1// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
  2// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
  3
  4using System;
  5using System.Diagnostics;
  6using ICSharpCode.Decompiler;
  7using ICSharpCode.NRefactory;
  8using ICSharpCode.NRefactory.CSharp;
  9
 10namespace ICSharpCode.ILSpy.Debugger.Services
 11{
 12	public interface IDebugger : IDisposable
 13	{
 14		/// <summary>
 15		/// Gets whether the debugger can evaluate the expression.
 16		/// </summary>
 17		bool CanEvaluate { get; }
 18		
 19		/// <summary>
 20		/// Returns true if debuger is attached to a process
 21		/// </summary>
 22		bool IsDebugging {
 23			get;
 24		}
 25		
 26		/// <summary>
 27		/// Returns true if process is running
 28		/// Returns false if breakpoint is hit, program is breaked, program is stepped, etc...
 29		/// </summary>
 30		bool IsProcessRunning {
 31			get;
 32		}
 33		
 34		/// <summary>
 35		/// Gets or sets whether the debugger should break at the first line of execution.
 36		/// </summary>
 37		bool BreakAtBeginning {
 38			get; set; 
 39		}
 40		
 41		/// <summary>
 42		/// Starts process and attaches debugger
 43		/// </summary>
 44		void Start(ProcessStartInfo processStartInfo);
 45		
 46		void StartWithoutDebugging(ProcessStartInfo processStartInfo);
 47		
 48		/// <summary>
 49		/// Stops/terminates attached process
 50		/// </summary>
 51		void Stop();
 52		
 53		// ExecutionControl:
 54		
 55		void Break();
 56		
 57		void Continue();
 58		
 59		// Stepping:
 60		
 61		void StepInto();
 62		
 63		void StepOver();
 64		
 65		void StepOut();
 66	
 67		/// <summary>
 68		/// Shows a dialog so the user can attach to a process.
 69		/// </summary>
 70		void ShowAttachDialog();
 71		
 72		/// <summary>
 73		/// Used to attach to an existing process.
 74		/// </summary>
 75		void Attach(Process process);
 76		
 77		void Detach();
 78			
 79		/// <summary>
 80		/// Gets the current value of the variable as string that can be displayed in tooltips.
 81		/// </summary>
 82		string GetValueAsString(string variable);
 83		
 84		/// <summary>
 85		/// Gets the tooltip control that shows the value of given variable.
 86		/// Return null if no tooltip is available.
 87		/// </summary>
 88		object GetTooltipControl(TextLocation logicalPosition, string variable);
 89		
 90		/// <summary>
 91		/// Queries the debugger whether it is possible to set the instruction pointer to a given position.
 92		/// </summary>
 93		/// <returns>True if possible. False otherwise</returns>
 94		bool CanSetInstructionPointer(string filename, int line, int column);
 95		
 96		/// <summary>
 97		/// Set the instruction pointer to a given position.
 98		/// </summary>
 99		/// <returns>True if successful. False otherwise</returns>
100		bool SetInstructionPointer(string filename, int line, int column);
101		
102		/// <summary>
103		/// Ocurrs when the debugger is starting.
104		/// </summary>
105		event EventHandler DebugStarting;
106		
107		/// <summary>
108		/// Ocurrs after the debugger has started.
109		/// </summary>
110		event EventHandler DebugStarted;
111		
112		/// <summary>
113		/// Ocurrs when the value of IsProcessRunning changes.
114		/// </summary>
115		event EventHandler IsProcessRunningChanged;
116		
117		/// <summary>
118		/// Ocurrs after the debugging of program is finished.
119		/// </summary>
120		event EventHandler DebugStopped;
121	}
122}