public bool Continue() { var request = new ContinueRequest { Process = grpcSbProcess }; ContinueResponse response = null; if (connection.InvokeRpc(() => { response = client.Continue(request); })) { return(response.Result); } return(false); }
public async Task <ContinueResponse> ContinueTo(uint targetAddress) { await BeginRunStateTransition(); var fbb = BeginRequest(); int requestDataOffset = ContinueRequest.CreateContinueRequest(fbb, ContinueAction.ContinueTo, targetAddress); var response = await CommitRequest(fbb, RequestData.ContinueRequest, requestDataOffset); System.Diagnostics.Debug.Assert(response.ResponseDataType == ResponseData.ContinueResponse); var continueResponse = new ContinueResponse(); response.GetResponseData(continueResponse); await CompleteRunStateTransition(RunState.Running); return(continueResponse); }
public async Task CanSetBreakpointsAsync() { Skip.If( PsesStdioProcess.RunningInConstainedLanguageMode, "You can't set breakpoints in ConstrainedLanguage mode."); string filePath = NewTestFile(GenerateScriptFromLoggingStatements( "before breakpoint", "at breakpoint", "after breakpoint" )); await PsesDebugAdapterClient.LaunchScript(filePath, Started).ConfigureAwait(false); // {"command":"setBreakpoints","arguments":{"source":{"name":"dfsdfg.ps1","path":"/Users/tyleonha/Code/PowerShell/Misc/foo/dfsdfg.ps1"},"lines":[2],"breakpoints":[{"line":2}],"sourceModified":false},"type":"request","seq":3} SetBreakpointsResponse setBreakpointsResponse = await PsesDebugAdapterClient.SetBreakpoints(new SetBreakpointsArguments { Source = new Source { Name = Path.GetFileName(filePath), Path = filePath }, Lines = new long[] { 2 }, Breakpoints = new SourceBreakpoint[] { new SourceBreakpoint { Line = 2, } }, SourceModified = false, }).ConfigureAwait(false); var breakpoint = setBreakpointsResponse.Breakpoints.First(); Assert.True(breakpoint.Verified); Assert.Equal(filePath, breakpoint.Source.Path, ignoreCase: s_isWindows); Assert.Equal(2, breakpoint.Line); ConfigurationDoneResponse configDoneResponse = await PsesDebugAdapterClient.RequestConfigurationDone(new ConfigurationDoneArguments()).ConfigureAwait(false); Assert.NotNull(configDoneResponse); // At this point the script should be running so lets give it time await Task.Delay(2000).ConfigureAwait(false); string[] log = GetLog(); Assert.Single(log, (i) => i == "before breakpoint"); ContinueResponse continueResponse = await PsesDebugAdapterClient.RequestContinue(new ContinueArguments { ThreadId = 1, }).ConfigureAwait(true); Assert.NotNull(continueResponse); // At this point the script should be running so lets give it time await Task.Delay(2000).ConfigureAwait(false); log = GetLog(); Assert.Collection(log, (i) => Assert.Equal("before breakpoint", i), (i) => Assert.Equal("at breakpoint", i), (i) => Assert.Equal("after breakpoint", i)); }