Author: mhutch
Date: 2008-01-17 18:07:37 -0500 (Thu, 17 Jan 2008)
New Revision: 93217

Modified:
   trunk/monodevelop/main/src/core/MonoDevelop.Core/ChangeLog
   
trunk/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Execution/ProcessHostController.cs
Log:
2008-01-17  Michael Hutchinson  <[EMAIL PROTECTED]> 

        * MonoDevelop.Core.Execution/ProcessHostController.cs:
          If MD is running in debug mode (i.e. stack traces have line numbers)
          then the process hosting RemoteProcessObjects should be in debug 
          mode too. Also, remove an "sh" call to improve portability.



Modified: trunk/monodevelop/main/src/core/MonoDevelop.Core/ChangeLog
===================================================================
--- trunk/monodevelop/main/src/core/MonoDevelop.Core/ChangeLog  2008-01-17 
23:07:34 UTC (rev 93216)
+++ trunk/monodevelop/main/src/core/MonoDevelop.Core/ChangeLog  2008-01-17 
23:07:37 UTC (rev 93217)
@@ -1,3 +1,10 @@
+2008-01-17  Michael Hutchinson  <[EMAIL PROTECTED]> 
+
+       * MonoDevelop.Core.Execution/ProcessHostController.cs:
+         If MD is running in debug mode (i.e. stack traces have line numbers)
+         then the process hosting RemoteProcessObjects should be in debug 
+         mode too. Also, remove an "sh" call to improve portability.
+
 2008-01-17  Lluis Sanchez Gual <[EMAIL PROTECTED]> 
 
        * MonoDevelop.Core/Runtime.cs: Get add-ins from a version specific

Modified: 
trunk/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Execution/ProcessHostController.cs
===================================================================
--- 
trunk/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Execution/ProcessHostController.cs
        2008-01-17 23:07:34 UTC (rev 93216)
+++ 
trunk/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Execution/ProcessHostController.cs
        2008-01-17 23:07:37 UTC (rev 93217)
@@ -82,7 +82,11 @@
                                try {
                                        process = new Process ();
                                        process.Exited += new EventHandler 
(ProcessExited);
-                                       process.StartInfo = new 
ProcessStartInfo ("sh", "-c \"mono mdhost.exe " + id + "\"");
+                                       string location = Path.GetDirectoryName 
(System.Reflection.Assembly.GetExecutingAssembly ().Location);
+                                       string args = string.Empty;
+                                       if (isDebugMode) args += " --debug";
+                                       args += " '" + Path.Combine (location, 
"mdhost.exe") + "' " + id;
+                                       process.StartInfo = new 
ProcessStartInfo ("mono", args);
                                        process.StartInfo.WorkingDirectory = 
AppDomain.CurrentDomain.BaseDirectory;
                                        process.StartInfo.UseShellExecute = 
false;
                                        process.StartInfo.RedirectStandardInput 
= true;
@@ -97,6 +101,13 @@
                                }
                        }
                }
+               
+               bool isDebugMode
+               {
+                       get {
+                               return System.Environment.StackTrace.IndexOf 
("ProcessHostController.cs:") > -1;
+                       }
+               }
 
                void ProcessExited (object sender, EventArgs args)
                {

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to