示例#1
0
        public void InitializeService()
        {
            if (useRemotingForThreadInterop)
            {
                // This needs to be called before instance of NDebugger is created
                string path = RemotingConfigurationHelpper.GetLoadedAssemblyPath("Debugger.Core.dll");
                new RemotingConfigurationHelpper(path).Configure();
            }

            debugger = new NDebugger();

            debugger.Options = DebuggingOptions.Instance;

            debugger.DebuggerTraceMessage += debugger_TraceMessage;
            debugger.Processes.Added      += debugger_ProcessStarted;
            debugger.Processes.Removed    += debugger_ProcessExited;

            DebuggerService.BreakPointAdded += delegate(object sender, BreakpointBookmarkEventArgs e) {
                AddBreakpoint(e.BreakpointBookmark);
            };

            foreach (BreakpointBookmark b in DebuggerService.Breakpoints)
            {
                AddBreakpoint(b);
            }

            if (Initialize != null)
            {
                Initialize(this, null);
            }
        }
        public void InitializeService()
        {
            if (useRemotingForThreadInterop)
            {
                // This needs to be called before instance of NDebugger is created
                string path = RemotingConfigurationHelpper.GetLoadedAssemblyPath("Debugger.Core.dll");
                new RemotingConfigurationHelpper(path).Configure();
            }

            // get decompiler service
            var items = AddInTree.BuildItems <IDebuggerDecompilerService>("/SharpDevelop/Services/DebuggerDecompilerService", null, false);

            if (items.Count > 0)
            {
                debuggerDecompilerService = items[0];
            }

            // init NDebugger
            debugger         = new NDebugger();
            debugger.Options = DebuggingOptions.Instance;
            debugger.DebuggerTraceMessage += debugger_TraceMessage;
            debugger.Processes.Added      += debugger_ProcessStarted;
            debugger.Processes.Removed    += debugger_ProcessExited;

            DebuggerService.BreakPointAdded += delegate(object sender, BreakpointBookmarkEventArgs e) {
                AddBreakpoint(e.BreakpointBookmark);
            };

            foreach (BreakpointBookmark b in DebuggerService.Breakpoints)
            {
                AddBreakpoint(b);
            }

            if (Initialize != null)
            {
                Initialize(this, null);
            }
        }