How to use the vscode-debugadapter.InitializedEvent function in vscode-debugadapter

To help you get started, we’ve selected a few vscode-debugadapter examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github area9innovation / flow9 / resources / vscode / flow / src / flowcpp_adapter.ts View on Github external
this.miDebugger.load(args.cwd, args.target, args.arguments).then(() => {
			if (args.autorun)
				args.autorun.forEach(command => {
					this.miDebugger.sendUserInput(command);
				});
			this.sendResponse(response);
			this.sendEvent(new InitializedEvent());
			// start the program in the runtime - in reality wait for configurationDone
			this.miDebugger.start();
		}, err => {
			this.sendErrorResponse(response, 103, `Failed to load MI Debugger: ${err.toString()}`)
github Dart-Code / Dart-Code / src / debug / dart_debug_impl.ts View on Github external
const isolate: VMIsolate = response.result as VMIsolate;
						this.threadManager.registerThread(
							isolate,
							isolate.runnable ? "IsolateRunnable" : "IsolateStart",
						);

						if (isolate.pauseEvent.kind.startsWith("Pause")) {
							await this.handlePauseEvent(isolate.pauseEvent);
						}
					}));

					// Set a timer for memory updates.
					if (this.pollforMemoryMs)
						setTimeout(() => this.pollForMemoryUsage(), this.pollforMemoryMs);

					this.sendEvent(new InitializedEvent());
				});
				resolve();
github DonJayamanne / pythonVSCode / src / client / debugger / pdb / debuggerMain.ts View on Github external
protected initializeRequest(response: DebugProtocol.InitializeResponse, args: DebugProtocol.InitializeRequestArguments): void {
        this.sendResponse(response);

        // now we are ready to accept breakpoints -> fire the initialized event to give UI a chance to set breakpoints
        this.sendEvent(new InitializedEvent());
    }
github adelphes / android-dev-ext / src / debugMain.js View on Github external
.then(() => {
                // if we get this far, the debugger is connected and waiting for the resume command
                // - set up some events
                this.dbgr.on('bpstatechange', this, this.onBreakpointStateChange)
                    .on('bphit', this, this.onBreakpointHit)
                    .on('step', this, this.onStep)
                    .on('exception', this, this.onException)
                    .on('threadchange', this, this.onThreadChange)
                    .on('disconnect', this, this.onDebuggerDisconnect);
                this.waitForConfigurationDone = $.Deferred();
                // - tell the client we're initialised and ready for breakpoint info, etc
                this.sendEvent(new InitializedEvent());
                return this.waitForConfigurationDone;
            })
            .then(() => {
github ballerina-platform / ballerina-lang / tool-plugins / vscode / debugger / index.js View on Github external
this.debugManager.connect(`ws://${args.host}:${args.port}/debug`, () => {
            this.sendResponse(response);
            this.sendEvent(new InitializedEvent());
        });
    }
github hackwaly / vscode-ocaml / src / debug / debug.ts View on Github external
});

                this._debuggeeProc[DECODED_STDERR] = iconv.decodeStream(debuggeeEncoding);
                this._debuggeeProc.stderr.pipe(this._debuggeeProc[DECODED_STDERR]);
                this._debuggeeProc[DECODED_STDERR].on('data', (chunk) => {
                    this.sendEvent(new OutputEvent(chunk, 'stderr'));
                });
                this._debuggeeProc.on('exit', () => {
                    this.sendEvent(new TerminatedEvent());
                });
            }
        };

        if (args.noDebug) {
            launchDebuggee();
            this.sendEvent(new InitializedEvent());
            return;
        }

        let ocdArgs = [];
        if (args.cd) {
            ocdArgs.push('-cd', args.cd);
        }

        if (args.includePath) {
            args.includePath.forEach((path) => {
                ocdArgs.push('-I', path);
            });
        }

        this._remoteMode = !!args.socket;
github microsoft / vscode-chrome-debug-core / src / chrome / client / chromeDebugAdapter / connectedCDA.ts View on Github external
this.events.emitStepStarted('Attach.ConfigureDebuggingSession.supportedDomains.install');
        await this._supportedDomains.install();

        this.events.emitStepStarted('Attach.ConfigureDebuggingSession.serviceComponents.install');
        for (const serviceComponent of this._serviceComponents) {
            this.events.emitStepStarted(`Attach.ConfigureDebuggingSession.${serviceComponent}.install`);
            await serviceComponent.install();
        }

        this.events.emitStepStarted('Attach.ConfigureDebuggingSession.runIfWaitingForDebugger');
        await this._runtimeStarter.runIfWaitingForDebugger();

        this.events.emitStepStarted('Attach.ConfigureDebuggingSession.debuggeeInitializer');
        await this._debuggeeInitializer.initialize();

        this._session.sendEvent(new InitializedEvent());
        this.events.emitStepCompleted('NotifyInitialized');

        this.events.emitStepStarted('Attach.ConfigureDebuggingSession.waitForUserContentToLoad');
        return this;
    }
github SqrTT / prophet / out / mockDebug.js View on Github external
.then(() => {
                    this.sendResponse(response);
                    this.sendEvent(new vscode_debugadapter_1.InitializedEvent());
                    this.log('successfully connected\nconsole can be used to evaluate variables\nwaiting for breakpoint hit...');
                });
            }).catch(err => {
github microsoft / vscode-chrome-debug-core / src / chrome / client / chromeDebugAdapter / unconnectedCDA.ts View on Github external
.configureValue(TYPES.communicator, communicator)
            .configureValue(TYPES.EventsConsumedByConnectedCDA, new ConnectedCDAEventsCreator(communicator).create())
            .configureValue(TYPES.CDTPClient, chromeConnection.api)
            .configureValue(TYPES.ISession, new DelayMessagesUntilInitializedSession(new DoNotPauseWhileSteppingSession(this._session)))
            .configureValue(TYPES.BasePathTransformer, new pathTransformerClass())
            .configureValue(TYPES.BaseSourceMapTransformer, new sourceMapTransformerClass())
            .configureValue(TYPES.ChromeConnection, chromeConnection)
            .configureValue(TYPES.ConnectedCDAConfiguration, new ConnectedCDAConfiguration(this._extensibilityPoints,
                this.parseLoggingConfiguration(args),
                this._session,
                this._clientCapabilities,
                this._chromeConnectionClass,
                scenarioType,
                args));

        this._session.sendEvent(new InitializedEvent());

        return di.createClassWithDI(ConnectedCDA);
    }
github forcedotcom / salesforcedx-vscode / packages / salesforcedx-apex-debugger / src / adapter / apexDebug.ts View on Github external
if (!isStreamingConnected) {
        return this.sendResponse(response);
      }

      const sessionId = await this.mySessionService
        .forProject(args.sfdxProject)
        .withUserFilter(this.toCommaSeparatedString(args.userIdFilter))
        .withEntryFilter(args.entryPointFilter)
        .withRequestFilter(this.toCommaSeparatedString(args.requestTypeFilter))
        .start();
      if (this.mySessionService.isConnected()) {
        response.success = true;
        this.printToDebugConsole(
          nls.localize('session_started_text', sessionId)
        );
        this.sendEvent(new InitializedEvent());
        this.resetIdleTimer();
      } else {
        this.errorToDebugConsole(
          `${nls.localize('command_error_help_text')}:${os.EOL}${sessionId}`
        );
      }
    } catch (error) {
      this.tryToParseSfdxError(response, error);
    }
    this.sendResponse(response);
  }