~ubuntu-branches/ubuntu/oneiric/monodevelop/oneiric

« back to all changes in this revision

Viewing changes to src/addins/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft/SoftDebuggerSession.cs

  • Committer: Bazaar Package Importer
  • Author(s): Jo Shields
  • Date: 2010-02-02 11:39:59 UTC
  • mfrom: (1.2.6 upstream) (1.3.7 sid)
  • Revision ID: james.westby@ubuntu.com-20100202113959-s4exdz7er7igylz2
Tags: 2.2.1+dfsg-1
* New upstream release
* debian/control:
  + Standards version 3.8.4 (no changes needed)
* debian/patches/remove_support_for_non_debian_functionality.patch,
  debian/patches/remove_support_for_soft_debugger.patch,
  debian/patches/remove_support_for_moonlight.patch,
  debian/rules:
  + Split patch into two pieces, to make it easier to enable either
    SDB or Moonlight support with a rebuild
* debian/monodevelop-moonlight.install,
  debian/monodevelop-debugger-sdb.install,
  debian/control:
  + Create packaging data for the Soft Debugger addin and Moonlight addin -
    and comment them out of debian/control as we can't provide them on
    Debian for now

Show diffs side-by-side

added added

removed removed

Lines of Context:
108
108
                                };
109
109
                        }
110
110
                        
 
111
                        var sdbLog = Environment.GetEnvironmentVariable ("MONODEVELOP_SDB_LOG");
 
112
                        if (!String.IsNullOrEmpty (sdbLog)) {
 
113
                                options = options ?? new LaunchOptions ();
 
114
                                options.AgentArgs = string.Format ("loglevel=1,logfile='{0}'", sdbLog);
 
115
                        }
 
116
                        
111
117
                        foreach (var env in dsi.Runtime.EnvironmentVariables)
112
118
                                psi.EnvironmentVariables[env.Key] = env.Value;
113
119
                        
114
120
                        foreach (var env in startInfo.EnvironmentVariables)
115
121
                                psi.EnvironmentVariables[env.Key] = env.Value;
 
122
                        
 
123
                        if (!String.IsNullOrEmpty (dsi.LogMessage))
 
124
                                OnDebuggerOutput (false, dsi.LogMessage + "\n");
116
125
 
117
126
                        OnConnecting (VirtualMachineManager.BeginLaunch (psi, HandleCallbackErrors (delegate (IAsyncResult ar) {
118
127
                                        HandleConnection (VirtualMachineManager.EndLaunch (ar));
119
128
                                }),
120
 
                                options //new LaunchOptions { AgentArgs= "loglevel=1,logfile=/tmp/sdb.log"}
 
129
                                options
121
130
                        ));
122
131
                }
123
132
                
285
294
                                        ThreadPool.QueueUserWorkItem (delegate {
286
295
                                                try {
287
296
                                                        vm.Exit (0);
 
297
                                                } catch (VMDisconnectedException) {
288
298
                                                } catch (Exception ex) {
289
 
                                                        Console.WriteLine (ex);
 
299
                                                        LoggingService.LogError ("Error exiting SDB VM:", ex);
290
300
                                                }
291
301
                                                try {
292
302
                                                        vm.Dispose ();
 
303
                                                } catch (VMDisconnectedException) {
293
304
                                                } catch (Exception ex) {
294
 
                                                        Console.WriteLine (ex);
 
305
                                                        LoggingService.LogError ("Error disposing SDB VM:", ex);
295
306
                                                }
296
307
                                        });
297
308
                                }
586
597
                        
587
598
                        if (e is AssemblyLoadEvent) {
588
599
                                AssemblyLoadEvent ae = (AssemblyLoadEvent)e;
589
 
                                UpdateAssemblyFilters (ae.Assembly);
590
 
                                OnDebuggerOutput (false, string.Format ("Loaded assembly: {0}\n", ae.Assembly.Location));
 
600
                                bool isExternal = !UpdateAssemblyFilters (ae.Assembly) && userAssemblyNames != null;
 
601
                                string flagExt = isExternal? " [External]" : "";
 
602
                                OnDebuggerOutput (false, string.Format ("Loaded assembly: {0}{1}\n", ae.Assembly.Location, flagExt));
591
603
                        }
592
604
                        
593
605
                        if (e is TypeLoadEvent) {
823
835
                                                        OnDebuggerOutput (false, string.Format ("Resolved pending breakpoint at '{0}:{1}' to {2}:{3}.\n", s, bp.Line, l.Method.FullName, l.ILOffset));
824
836
                                                        ResolvePendingBreakpoint (bp, l);
825
837
                                                        resolved.Add (bp);
 
838
                                                } else {
 
839
                                                        OnDebuggerOutput (true, string.Format ("Could not insert pending breakpoint at '{0}:{1}'. Perhaps the source line does not contain any statements, or the source does not correspond to the current binary.\n", s, bp.Line));
826
840
                                                }
827
841
                                        }
828
842
                                }