[Monodevelop-patches-list] r1092 - in trunk/MonoDevelop: . src/Main/Base/Services

commit-watcher at mono-cvs.ximian.com commit-watcher at mono-cvs.ximian.com
Wed Mar 3 16:35:11 EST 2004


Author: mkestner
Date: 2004-03-03 16:35:11 -0500 (Wed, 03 Mar 2004)
New Revision: 1092

Modified:
   trunk/MonoDevelop/ChangeLog
   trunk/MonoDevelop/src/Main/Base/Services/DebuggingService.cs
Log:
2004-03-03  Mike Kestner  <mkestner at ximian.com>

	* Main/Base/Services/DebuggingService.cs : add some debugging info
	and run the debugger before we insert breakpoints.



Modified: trunk/MonoDevelop/ChangeLog
===================================================================
--- trunk/MonoDevelop/ChangeLog	2004-03-03 20:35:43 UTC (rev 1091)
+++ trunk/MonoDevelop/ChangeLog	2004-03-03 21:35:11 UTC (rev 1092)
@@ -1,5 +1,10 @@
 2004-03-03  Mike Kestner  <mkestner at ximian.com>
 
+	* Main/Base/Services/DebuggingService.cs : add some debugging info
+	and run the debugger before we insert breakpoints.
+
+2004-03-03  Mike Kestner  <mkestner at ximian.com>
+
 	* Main/Base/Services/DebuggingService.cs (UnloadService): kill
 	running debugger instances on unload.
 

Modified: trunk/MonoDevelop/src/Main/Base/Services/DebuggingService.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Services/DebuggingService.cs	2004-03-03 20:35:43 UTC (rev 1091)
+++ trunk/MonoDevelop/src/Main/Base/Services/DebuggingService.cs	2004-03-03 21:35:11 UTC (rev 1092)
@@ -103,17 +103,25 @@
 				return;
 
 			backend = new DebuggerBackend ();
-			foreach (string key in breakpoints.Keys) {
+			proc = backend.Run (ProcessStart.Create (null, argv));
+			string[] keys = new string [breakpoints.Keys.Count];
+			breakpoints.Keys.CopyTo (keys, 0);
+			foreach (string key in keys) {
 				Breakpoint point = CreateBreakpoint (key);
 				string[] toks = point.Name.Split (':');
 				string filename = toks [0];
 				int linenumber = Int32.Parse (toks [1]);
+				Console.WriteLine ("Looking up " + filename + " " + linenumber);
 				SourceLocation loc = backend.FindLocation(filename, linenumber);
-				if (loc == null)
+				if (loc == null) {
+					Console.WriteLine ("Couldn't find breakpoint location " + key);
 					return;
+				}
 				breakpoints [key] = loc.InsertBreakpoint (proc, point);
+				if (breakpoints [key] == null)
+					Console.WriteLine ("Couldn't insert breakpoint " + key);
 			}
-			proc = backend.Run (ProcessStart.Create (null, argv));
+			proc.Continue (false);
 		}
 
 		public void Stop ()
@@ -136,7 +144,8 @@
 			int linenumber = Int32.Parse (toks [1]);
 
 			BreakpointHitArgs args = new BreakpointHitArgs (filename, linenumber);
-			this.BreakpointHit (this, args);
+			BreakpointHit (this, args);
+			Console.WriteLine ("hit breakpoint " + point.Name);
 		}
 
 		public event DebuggingService.BreakpointHitHandler BreakpointHit;




More information about the Monodevelop-patches-list mailing list