예제 #1
0
        public void RunToCursor(string breakpointMarker, int offset = 0, string statement = null)
        {
            int col, line;

            GetLineAndColumn(breakpointMarker, offset, statement, out line, out col);
            targetStoppedEvent.Reset();
            Session.Breakpoints.RemoveRunToCursorBreakpoints();
            var bp = new RunToCursorBreakpoint(SourceFile.Name, line, col);

            Session.Breakpoints.Add(bp);
            Session.Continue();
            CheckPosition(breakpointMarker, offset, statement);
        }
예제 #2
0
        public static void RunToCursor(string fileName, int line, int column)
        {
            if (CheckIsBusy())
            {
                return;
            }

            var bp = new RunToCursorBreakpoint(fileName, line, column);

            Breakpoints.Add(bp);

            session.Continue();
            NotifyLocationChanged();
        }
        protected override void Run()
        {
            var doc = IdeApp.Workbench.ActiveDocument;

            if (DebuggingService.IsPaused)
            {
                DebuggingService.RunToCursor(doc.FileName, doc.Editor.CaretLine, doc.Editor.CaretColumn);
                return;
            }

            var bp = new RunToCursorBreakpoint(doc.FileName, doc.Editor.CaretLine, doc.Editor.CaretColumn);

            DebuggingService.Breakpoints.Add(bp);
            DebugHandler.BuildAndDebug();
        }
예제 #4
0
		protected override void Run ()
		{
			var doc = IdeApp.Workbench.ActiveDocument;

			if (DebuggingService.IsPaused) {
				DebuggingService.RunToCursor (doc.FileName, doc.Editor.CaretLine, doc.Editor.CaretColumn);
				return;
			}

			if (IdeApp.Workspace.IsOpen) {
				var bp = new RunToCursorBreakpoint (doc.FileName, doc.Editor.CaretLine, doc.Editor.CaretColumn);
				DebuggingService.Breakpoints.Add (bp);
				var target = DebugHandler.GetRunTarget ();
				if (target != null)
					IdeApp.ProjectOperations.Debug (target);
			}
		}
예제 #5
0
        protected override void Run()
        {
            var doc      = IdeApp.Workbench.ActiveDocument;
            var textView = doc.GetContent <ITextView> (true);

            var(caretLine, caretColumn) = textView.MDCaretLineAndColumn();
            if (DebuggingService.IsPaused)
            {
                DebuggingService.RunToCursor(doc.FileName, caretLine, caretColumn);
                return;
            }

            if (IdeApp.Workspace.IsOpen)
            {
                var bp = new RunToCursorBreakpoint(doc.FileName, caretLine, caretColumn);
                DebuggingService.Breakpoints.Add(bp);
                var target = DebugHandler.GetRunTarget();
                if (target != null)
                {
                    IdeApp.ProjectOperations.Debug(target);
                }
            }
        }
예제 #6
0
        private void AssociateBreakpointsWithMethods()
        {
            if (FunctionBreakpoints != null && FunctionBreakpoints.Count > 0 && Assemblies != null)
            {
                if (Assemblies.Count > 0)
                {
                    int index = 0;

                    while (index < FunctionBreakpoints.Count)
                    {
                        NuGenFunctionBreakpointInformation functionBreakpoint = FunctionBreakpoints[index];

                        if (functionBreakpoint.AssociateWithMethod())
                        {
                            index++;
                        }
                        else
                        {
                            FunctionBreakpoints.Remove(functionBreakpoint);
                        }
                    }
                }
                else
                {
                    FunctionBreakpoints.Clear();
                }
            }

            if (RunToCursorBreakpoint != null)
            {
                if (!RunToCursorBreakpoint.AssociateWithMethod())
                {
                    RunToCursorBreakpoint.Remove();
                    RunToCursorBreakpoint = null;
                }
            }
        }