public void ToggleBreakpoint() { List <ushort> execBreakpoints = _cpu.GetBreakpoints(BreakpointKinds.EXECUTION); if (execBreakpoints.Contains(originalAddress)) { _cpu.RemoveBreakpoint(BreakpointKinds.EXECUTION, originalAddress); HasBreakpoint = false; } else { _cpu.AddBreakpoint(BreakpointKinds.EXECUTION, originalAddress); HasBreakpoint = true; } if (BreakpointChanged != null) { BreakpointChanged(); } }