/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. using System;
  4. using System.Diagnostics;
  5. using ICSharpCode.Decompiler;
  6. using ICSharpCode.NRefactory;
  7. using ICSharpCode.NRefactory.CSharp;
  8. namespace ICSharpCode.ILSpy.Debugger.Services
  9. {
  10. public interface IDebugger : IDisposable
  11. {
  12. /// <summary>
  13. /// Gets whether the debugger can evaluate the expression.
  14. /// </summary>
  15. bool CanEvaluate { get; }
  16. /// <summary>
  17. /// Returns true if debuger is attached to a process
  18. /// </summary>
  19. bool IsDebugging {
  20. get;
  21. }
  22. /// <summary>
  23. /// Returns true if process is running
  24. /// Returns false if breakpoint is hit, program is breaked, program is stepped, etc...
  25. /// </summary>
  26. bool IsProcessRunning {
  27. get;
  28. }
  29. /// <summary>
  30. /// Gets or sets whether the debugger should break at the first line of execution.
  31. /// </summary>
  32. bool BreakAtBeginning {
  33. get; set;
  34. }
  35. /// <summary>
  36. /// Starts process and attaches debugger
  37. /// </summary>
  38. void Start(ProcessStartInfo processStartInfo);
  39. void StartWithoutDebugging(ProcessStartInfo processStartInfo);
  40. /// <summary>
  41. /// Stops/terminates attached process
  42. /// </summary>
  43. void Stop();
  44. // ExecutionControl:
  45. void Break();
  46. void Continue();
  47. // Stepping:
  48. void StepInto();
  49. void StepOver();
  50. void StepOut();
  51. /// <summary>
  52. /// Shows a dialog so the user can attach to a process.
  53. /// </summary>
  54. void ShowAttachDialog();
  55. /// <summary>
  56. /// Used to attach to an existing process.
  57. /// </summary>
  58. void Attach(Process process);
  59. void Detach();
  60. /// <summary>
  61. /// Gets the current value of the variable as string that can be displayed in tooltips.
  62. /// </summary>
  63. string GetValueAsString(string variable);
  64. /// <summary>
  65. /// Gets the tooltip control that shows the value of given variable.
  66. /// Return null if no tooltip is available.
  67. /// </summary>
  68. object GetTooltipControl(TextLocation logicalPosition, string variable);
  69. /// <summary>
  70. /// Queries the debugger whether it is possible to set the instruction pointer to a given position.
  71. /// </summary>
  72. /// <returns>True if possible. False otherwise</returns>
  73. bool CanSetInstructionPointer(string filename, int line, int column);
  74. /// <summary>
  75. /// Set the instruction pointer to a given position.
  76. /// </summary>
  77. /// <returns>True if successful. False otherwise</returns>
  78. bool SetInstructionPointer(string filename, int line, int column);
  79. /// <summary>
  80. /// Ocurrs when the debugger is starting.
  81. /// </summary>
  82. event EventHandler DebugStarting;
  83. /// <summary>
  84. /// Ocurrs after the debugger has started.
  85. /// </summary>
  86. event EventHandler DebugStarted;
  87. /// <summary>
  88. /// Ocurrs when the value of IsProcessRunning changes.
  89. /// </summary>
  90. event EventHandler IsProcessRunningChanged;
  91. /// <summary>
  92. /// Ocurrs after the debugging of program is finished.
  93. /// </summary>
  94. event EventHandler DebugStopped;
  95. }
  96. }