public void PrepareEnd(string caller_trace) { ConfigurationDoneRequest configurationDoneRequest = new ConfigurationDoneRequest(); Assert.True(VSCodeDebugger.Request(configurationDoneRequest).Success, @"__FILE__:__LINE__" + "\n" + caller_trace); }
public void Prepare(string caller_trace) { InitializeRequest initializeRequest = new InitializeRequest(); initializeRequest.arguments.clientID = "vscode"; initializeRequest.arguments.clientName = "Visual Studio Code"; initializeRequest.arguments.adapterID = "coreclr"; initializeRequest.arguments.pathFormat = "path"; initializeRequest.arguments.linesStartAt1 = true; initializeRequest.arguments.columnsStartAt1 = true; initializeRequest.arguments.supportsVariableType = true; initializeRequest.arguments.supportsVariablePaging = true; initializeRequest.arguments.supportsRunInTerminalRequest = true; initializeRequest.arguments.locale = "en-us"; Assert.True(VSCodeDebugger.Request(initializeRequest).Success, @"__FILE__:__LINE__" + "\n" + caller_trace); LaunchRequest launchRequest = new LaunchRequest(); launchRequest.arguments.name = ".NET Core Launch (console) with pipeline"; launchRequest.arguments.type = "coreclr"; launchRequest.arguments.preLaunchTask = "build"; launchRequest.arguments.program = ControlInfo.TargetAssemblyPath; launchRequest.arguments.cwd = ""; launchRequest.arguments.console = "internalConsole"; launchRequest.arguments.stopAtEntry = true; launchRequest.arguments.internalConsoleOptions = "openOnSessionStart"; launchRequest.arguments.__sessionId = Guid.NewGuid().ToString(); Assert.True(VSCodeDebugger.Request(launchRequest).Success, @"__FILE__:__LINE__" + "\n" + caller_trace); ConfigurationDoneRequest configurationDoneRequest = new ConfigurationDoneRequest(); Assert.True(VSCodeDebugger.Request(configurationDoneRequest).Success, @"__FILE__:__LINE__" + "\n" + caller_trace); }
public static void Prepare() { InitializeRequest initializeRequest = new InitializeRequest(); initializeRequest.arguments.clientID = "vscode"; initializeRequest.arguments.clientName = "Visual Studio Code"; initializeRequest.arguments.adapterID = "coreclr"; initializeRequest.arguments.pathFormat = "path"; initializeRequest.arguments.linesStartAt1 = true; initializeRequest.arguments.columnsStartAt1 = true; initializeRequest.arguments.supportsVariableType = true; initializeRequest.arguments.supportsVariablePaging = true; initializeRequest.arguments.supportsRunInTerminalRequest = true; initializeRequest.arguments.locale = "en-us"; Assert.True(VSCodeDebugger.Request(initializeRequest).Success); LaunchRequest launchRequest = new LaunchRequest(); launchRequest.arguments.name = ".NET Core Launch (console) with pipeline"; launchRequest.arguments.type = "coreclr"; launchRequest.arguments.preLaunchTask = "build"; launchRequest.arguments.program = DebuggeeInfo.TargetAssemblyPath; // NOTE this code works only with one source file launchRequest.arguments.cwd = Directory.GetParent(DebuggeeInfo.SourceFilesPath).FullName; launchRequest.arguments.console = "internalConsole"; launchRequest.arguments.stopAtEntry = true; launchRequest.arguments.internalConsoleOptions = "openOnSessionStart"; launchRequest.arguments.__sessionId = Guid.NewGuid().ToString(); Assert.True(VSCodeDebugger.Request(launchRequest).Success); ConfigurationDoneRequest configurationDoneRequest = new ConfigurationDoneRequest(); Assert.True(VSCodeDebugger.Request(configurationDoneRequest).Success); }
/// <summary> /// Handles the configuration done request /// </summary> /// <param name="configurationDoneParams"></param> /// <param name="requestContext"></param> /// <returns></returns> protected async Task HandleConfigurationDoneRequest(ConfigurationDoneRequest configurationDoneParams, RequestContext <ConfigurationDoneResponse> requestContext) { Logger.Write(LogLevel.Normal, "HandleConfigurationDoneRequest"); // Call all tasks that registered on the initialize request var configurationDoneTasks = configurationDoneCallbacks.Select(t => t(configurationDoneParams, requestContext)); await Task.WhenAll(configurationDoneTasks); }
private static void StartDebugger(Action pAction) { if (mDebuggerProcess != null) { Detach(); } mBreakPoints.Clear(); ProcessStartInfo psi2 = new ProcessStartInfo(); psi2.FileName = Path.GetFullPath(@"..\..\..\..\netcoredbg-win64-master\netcoredbg\netcoredbg.exe"); psi2.Arguments = "--interpreter=vscode --engineLogging=log.log"; psi2.UseShellExecute = false; psi2.RedirectStandardInput = true; psi2.RedirectStandardOutput = true; mDebuggerProcess = Process.Start(psi2); mClient = new DebugProtocolHost(mDebuggerProcess.StandardInput.BaseStream, mDebuggerProcess.StandardOutput.BaseStream, true); mClient.EventReceived += Client_EventReceived; mClient.Run(); InitializeRequest ir = new InitializeRequest(); ir.ClientID = "ClientID"; ir.AdapterID = "Adapter"; ir.ColumnsStartAt1 = true; ir.PathFormat = InitializeArguments.PathFormatValue.Path; ir.SupportsVariablePaging = true; ir.SupportsVariableType = true; ir.SupportsRunInTerminalRequest = true; var repsonse = mClient.SendRequestSync(ir); pAction.Invoke(); ConfigurationDoneRequest cr = new ConfigurationDoneRequest(); mClient.SendRequestSync(cr); }
public static void PrepareEnd() { ConfigurationDoneRequest configurationDoneRequest = new ConfigurationDoneRequest(); Assert.True(VSCodeDebugger.Request(configurationDoneRequest).Success); }