예제 #1
0
        public bool OnInitialBreakpointReached(int Address)
        {
            if ((BreakpointsToAddAfterStartup.Count == 0) &&
                (Core.Debugging.OverrideDebugStart == -1))
            {
                return(false);
            }
            // now add all later breakpoints
            foreach (Types.Breakpoint bp in BreakpointsToAddAfterStartup)
            {
                Debugger.AddBreakpoint(bp);
            }
            // only auto-go on if the initial break point was not the fake first breakpoint
            if (Address != LateBreakpointOverrideDebugStart)
            {
                // need to add new intermediate break point
                Types.Breakpoint bpTemp = new C64Studio.Types.Breakpoint();

                bpTemp.Address       = LateBreakpointOverrideDebugStart;
                bpTemp.TriggerOnExec = true;
                bpTemp.Temporary     = true;

                Debugger.AddBreakpoint(bpTemp);
            }

            if (MarkedDocument != null)
            {
                MarkLine(MarkedDocument.DocumentInfo.Project, MarkedDocument.DocumentInfo, -1);
                MarkedDocument = null;
            }

            // keep running for non cart
            if (!Parser.ASMFileParser.IsCartridge(DebugType))
            {
                Debugger.Run();
            }

            Core.Executing.BringToForeground();

            FirstActionAfterBreak = false;
            Core.MainForm.SetGUIForDebugging(true);

            // force a reset for cartridges, so the debugger starts at the init
            // can't reset on a normal file, just hope our break point is not hit too early
            if (Parser.ASMFileParser.IsCartridge(DebugType))
            {
                Debugger.Reset();
            }
            return(true);
        }
 protected override void DoHandle([NotNull] GameHttpContext context, [NotNull] IDebugger debugger)
 {
     debugger.Reset();
 }