// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt) // This code is distributed under the GNU LGPL (for details please see \doc\license.txt) using System; using System.Diagnostics; using ICSharpCode.Decompiler; using ICSharpCode.NRefactory; using ICSharpCode.NRefactory.CSharp; namespace ICSharpCode.ILSpy.Debugger.Services { public interface IDebugger : IDisposable { /// /// Gets whether the debugger can evaluate the expression. /// bool CanEvaluate { get; } /// /// Returns true if debuger is attached to a process /// bool IsDebugging { get; } /// /// Returns true if process is running /// Returns false if breakpoint is hit, program is breaked, program is stepped, etc... /// bool IsProcessRunning { get; } /// /// Gets or sets whether the debugger should break at the first line of execution. /// bool BreakAtBeginning { get; set; } /// /// Starts process and attaches debugger /// void Start(ProcessStartInfo processStartInfo); void StartWithoutDebugging(ProcessStartInfo processStartInfo); /// /// Stops/terminates attached process /// void Stop(); // ExecutionControl: void Break(); void Continue(); // Stepping: void StepInto(); void StepOver(); void StepOut(); /// /// Shows a dialog so the user can attach to a process. /// void ShowAttachDialog(); /// /// Used to attach to an existing process. /// void Attach(Process process); void Detach(); /// /// Gets the current value of the variable as string that can be displayed in tooltips. /// string GetValueAsString(string variable); /// /// Gets the tooltip control that shows the value of given variable. /// Return null if no tooltip is available. /// object GetTooltipControl(TextLocation logicalPosition, string variable); /// /// Queries the debugger whether it is possible to set the instruction pointer to a given position. /// /// True if possible. False otherwise bool CanSetInstructionPointer(string filename, int line, int column); /// /// Set the instruction pointer to a given position. /// /// True if successful. False otherwise bool SetInstructionPointer(string filename, int line, int column); /// /// Ocurrs when the debugger is starting. /// event EventHandler DebugStarting; /// /// Ocurrs after the debugger has started. /// event EventHandler DebugStarted; /// /// Ocurrs when the value of IsProcessRunning changes. /// event EventHandler IsProcessRunningChanged; /// /// Ocurrs after the debugging of program is finished. /// event EventHandler DebugStopped; } }