private async Task LaunchScriptAsync(string scriptToLaunch) { // Is this an untitled script? if (ScriptFile.IsUntitledPath(scriptToLaunch)) { ScriptFile untitledScript = _workspaceService.GetFile(scriptToLaunch); await _powerShellContextService .ExecuteScriptStringAsync(untitledScript.Contents, true, true); } else { await _powerShellContextService .ExecuteScriptWithArgsAsync(scriptToLaunch, _debugStateService.Arguments, writeInputToHost : true); } _jsonRpcServer.SendNotification(EventNames.Terminated); }