protected async launchRequest()

in src/debug-adapter/client.ts [165:200]


  protected async launchRequest(
    response: DebugProtocol.LaunchResponse,
    args: ILaunchRequestArguments,
  ) {
    const port = args.port || 7300;
    const verbose = args.verbose || false;

    const bazelExecutable = this.bazelExecutable(args);
    this.bazelInfo = await this.getBazelInfo(bazelExecutable, args.cwd);

    const fullArgs = args.bazelStartupOptions
      .concat([
        args.bazelCommand,
        "--color=yes",
        "--experimental_skylark_debug",
        `--experimental_skylark_debug_server_port=${port}`,
        `--experimental_skylark_debug_verbose_logging=${verbose}`,
      ])
      .concat(args.args);

    this.launchBazel(bazelExecutable, args.cwd, fullArgs);

    this.bazelConnection = new BazelDebugConnection(
      "localhost",
      port,
      this.debugLog,
    );
    this.bazelConnection.on("connect", () => {
      this.sendResponse(response);
      this.sendEvent(new InitializedEvent());
    });

    this.bazelConnection.on("event", (event) => {
      this.handleBazelEvent(event);
    });
  }