public void StartWithoutDebuggingNoProject() { string scriptFilePath = TestData.GetPath(@"TestData\CreateFile1.py"); using (var app = new VisualStudioApp()) { app.DeleteAllBreakPoints(); app.Dte.ItemOperations.OpenFile(scriptFilePath); app.Dte.Debugger.Breakpoints.Add(File: scriptFilePath, Line: 1); app.Dte.ExecuteCommand("Project.StartWithoutDebugging"); Assert.AreEqual(dbgDebugMode.dbgDesignMode, app.Dte.Debugger.CurrentMode); WaitForFileCreatedByScript(TestData.GetPath(@"TestData\File1.txt")); } }
/// <summary> /// Start without debugging, with script but no project. /// </summary> public void StartWithoutDebuggingNoProject(VisualStudioApp app, DotNotWaitOnNormalExit optionSetter) { var tempFolder = TestData.GetTempPath(); string scriptFilePath = Path.Combine(tempFolder, "CreateFile1.py"); string resultFilePath = Path.Combine(tempFolder, "File1.txt"); File.Copy(TestData.GetPath(@"TestData\CreateFile1.py"), scriptFilePath, true); app.DeleteAllBreakPoints(); app.Dte.ItemOperations.OpenFile(scriptFilePath); app.Dte.Debugger.Breakpoints.Add(File: scriptFilePath, Line: 1); app.Dte.ExecuteCommand("Python.StartWithoutDebugging"); Assert.AreEqual(dbgDebugMode.dbgDesignMode, app.Dte.Debugger.CurrentMode); WaitForFileCreatedByScript(resultFilePath); }
/// <summary> /// Start with debugging, with script but no project. /// </summary> public void StartWithDebuggingNoProject(VisualStudioApp app, DotNotWaitOnNormalExit optionSetter) { string scriptFilePath = TestData.GetPath(@"TestData\HelloWorld\Program.py"); app.DeleteAllBreakPoints(); app.Dte.ItemOperations.OpenFile(scriptFilePath); app.Dte.Debugger.Breakpoints.Add(File: scriptFilePath, Line: 1); app.Dte.ExecuteCommand("Python.StartWithDebugging"); WaitForMode(app, dbgDebugMode.dbgBreakMode); Assert.AreEqual(dbgDebugMode.dbgBreakMode, app.Dte.Debugger.CurrentMode); Assert.IsNotNull(app.Dte.Debugger.BreakpointLastHit); Assert.AreEqual("Program.py, line 1", app.Dte.Debugger.BreakpointLastHit.Name); app.Dte.Debugger.Go(WaitForBreakOrEnd: true); Assert.AreEqual(dbgDebugMode.dbgDesignMode, app.Dte.Debugger.CurrentMode); }
public void StartWithDebuggingNoProject() { string scriptFilePath = TestData.GetPath(@"TestData\HelloWorld\Program.py"); using (var app = new VisualStudioApp()) { app.DeleteAllBreakPoints(); app.Dte.ItemOperations.OpenFile(scriptFilePath); app.Dte.Debugger.Breakpoints.Add(File: scriptFilePath, Line: 1); app.Dte.ExecuteCommand("Project.StartWithDebugging"); WaitForMode(app, dbgDebugMode.dbgBreakMode); Assert.AreEqual(dbgDebugMode.dbgBreakMode, app.Dte.Debugger.CurrentMode); Assert.AreEqual("Program.py, line 1", app.Dte.Debugger.BreakpointLastHit.Name); app.Dte.Debugger.Go(WaitForBreakOrEnd: true); Assert.AreEqual(dbgDebugMode.dbgDesignMode, app.Dte.Debugger.CurrentMode); } }
public void StartWithoutDebuggingNoProject() { string scriptFilePath = TestData.GetPath(@"TestData\CreateFile1.py"); using (var app = new VisualStudioApp()) { app.DeleteAllBreakPoints(); app.Dte.ItemOperations.OpenFile(scriptFilePath); app.Dte.Debugger.Breakpoints.Add(File: scriptFilePath, Line: 1); app.Dte.ExecuteCommand("Project.StartWithoutDebugging"); Assert.AreEqual(dbgDebugMode.dbgDesignMode, app.Dte.Debugger.CurrentMode); WaitForFileCreatedByScript(TestData.GetPath(@"TestData\File1.txt")); } }
public void StartWithDebuggingNoProject() { string scriptFilePath = TestData.GetPath(@"TestData\HelloWorld\Program.py"); using (var app = new VisualStudioApp()) { app.DeleteAllBreakPoints(); app.Dte.ItemOperations.OpenFile(scriptFilePath); app.Dte.Debugger.Breakpoints.Add(File: scriptFilePath, Line: 1); app.Dte.ExecuteCommand("Project.StartWithDebugging"); WaitForMode(app, dbgDebugMode.dbgBreakMode); Assert.AreEqual(dbgDebugMode.dbgBreakMode, app.Dte.Debugger.CurrentMode); Assert.AreEqual("Program.py, line 1", app.Dte.Debugger.BreakpointLastHit.Name); app.Dte.Debugger.Go(WaitForBreakOrEnd: true); Assert.AreEqual(dbgDebugMode.dbgDesignMode, app.Dte.Debugger.CurrentMode); } }