Exemple #1
0
        public bool Start(string filename)
        {
            //startdebug.Text = "Continue";
            this.filename = filename;

            dbg = new Cordbg();
            dbg.DebugProcessExited += new EventHandler(dbg_DebugProcessExited);

            ServiceHost.State |= ApplicationState.Debug;
            ServiceHost.Error.ClearErrors(this);
            Console.WriteLine("Debugger started.");
            DebugReady();

            ////get back focus
            //ServiceHost.Window.MainForm.Activate();

            return(true);
        }
Exemple #2
0
        void ProcessExit()
        {
            if (dbg != null)
            {
                dbg.Dispose();
                dbg = null;

                ServiceHost.State &= ~ApplicationState.DebugBreak;

                checkforbp = true;

                Breakpoint[] bps = null;

                bps = proj.GetAllBreakpoints();

                foreach (Breakpoint bp in bps)
                {
                    bp.bound = true;
                }

                proj = null;

                localsview.Items.Clear();
                autosview.Items.Clear();
                thisview.Items.Clear();
                callstackview.Items.Clear();

                if (lastsrcfile != null)
                {
                    AdvancedTextBox atb = ServiceHost.File[lastsrcfile] as AdvancedTextBox;
                    if (atb != null)
                    {
                        atb.debugexcept = false;
                        atb.debugline   = -1;
                        ServiceHost.File.BringToFront(atb);
                    }
                }

                Console.WriteLine("Debugger exited.");
            }
        }