[Monodevelop-patches-list] r1113 - in trunk/MonoDevelop: . src/Main/Base/Services
commit-watcher at mono-cvs.ximian.com
commit-watcher at mono-cvs.ximian.com
Thu Mar 4 21:37:15 EST 2004
Author: mkestner
Date: 2004-03-04 21:37:15 -0500 (Thu, 04 Mar 2004)
New Revision: 1113
Modified:
trunk/MonoDevelop/ChangeLog
trunk/MonoDevelop/src/Main/Base/Services/DebuggingService.cs
Log:
2004-03-04 Mike Kestner <mkestner at ximian.com>
* Main/Base/Services/DebuggingService.cs : add CurrentFilename and
CurrentLineNumber props. Fix Backtrace.
Modified: trunk/MonoDevelop/ChangeLog
===================================================================
--- trunk/MonoDevelop/ChangeLog 2004-03-04 22:24:41 UTC (rev 1112)
+++ trunk/MonoDevelop/ChangeLog 2004-03-05 02:37:15 UTC (rev 1113)
@@ -1,5 +1,10 @@
2004-03-04 Mike Kestner <mkestner at ximian.com>
+ * Main/Base/Services/DebuggingService.cs : add CurrentFilename and
+ CurrentLineNumber props. Fix Backtrace.
+
+2004-03-04 Mike Kestner <mkestner at ximian.com>
+
* Main/Base/Services/DebuggingService.cs : add Started/Stopped and
Paused/Resumed events plus a CurrentFrame property.
Modified: trunk/MonoDevelop/src/Main/Base/Services/DebuggingService.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Services/DebuggingService.cs 2004-03-04 22:24:41 UTC (rev 1112)
+++ trunk/MonoDevelop/src/Main/Base/Services/DebuggingService.cs 2004-03-05 02:37:15 UTC (rev 1113)
@@ -171,8 +171,13 @@
if (ResumedEvent != null) {
ResumedEvent (this, new EventArgs ());
}
- } else if (PausedEvent != null)
+ } else if (PausedEvent != null) {
PausedEvent (this, new EventArgs ());
+ Console.WriteLine ("file:line is " + CurrentFilename + ":" + CurrentLineNumber);
+ Console.WriteLine ("trace:");
+ foreach (string s in Backtrace)
+ Console.WriteLine (s);
+ }
return false;
}
@@ -235,7 +240,7 @@
string[] result = new string [trace.Length];
int i = 0;
foreach (StackFrame frame in trace.Frames) {
- result [i++] = frame.TargetAddress.ToString ();
+ result [i++] = frame.SourceAddress.Name;
Console.WriteLine (result [i-1]);
}
@@ -251,6 +256,27 @@
}
}
+ public string CurrentFilename {
+ get {
+ if (IsRunning)
+ return String.Empty;
+
+ if (proc.GetBacktrace ().Frames [0].SourceAddress.MethodSource.IsDynamic)
+ return String.Empty;
+
+ return proc.GetBacktrace ().Frames [0].SourceAddress.MethodSource.SourceFile.FileName;
+ }
+ }
+
+ public int CurrentLineNumber {
+ get {
+ if (IsRunning)
+ return -1;
+
+ return proc.GetBacktrace ().Frames [0].SourceAddress.Row;
+ }
+ }
+
public string LookupValue (string expr)
{
return "";
@@ -268,14 +294,6 @@
string filename = toks [0];
int linenumber = Int32.Parse (toks [1]);
- IFileService fs = (IFileService)ServiceManager.Services.GetService (typeof (IFileService));
- fs.OpenFile (filename);
-
- if (WorkbenchSingleton.Workbench.ActiveWorkbenchWindow.ViewContent is IDebuggableEditor)
- {
- ((IDebuggableEditor)WorkbenchSingleton.Workbench.ActiveWorkbenchWindow.ViewContent).ExecutingAt (linenumber - 1);
- }
-
if (this.BreakpointHit == null)
return false;
More information about the Monodevelop-patches-list
mailing list