<commit_before>import { strict as assert } from "assert";
import * as os from "os";
import * as path from "path";
import * as vs from "vscode";
import { DebugProtocol } from "vscode-debugprotocol";
import { DebuggerType } from "../../../shared/enums";
import { DartDebugClient } from "../../dart_debug_client";
import { createDebugClient, flutterTestDeviceId, flutterTestDeviceIsWeb, killFlutterTester, spawnFlutterProcess, waitAllThrowIfTerminates } from "../../debug_helpers";
import { activate, deferUntilLast, delay, fileSafeCurrentTestName, flutterHelloWorldMainFile, getAttachConfiguration, logger, watchPromise } from "../../helpers";

describe("flutter run debugger (attach)", () => {
	beforeEach("Skip attach tests for web devices", function () {
		if (flutterTestDeviceIsWeb)
			this.skip();
	});

	beforeEach("activate flutterHelloWorldMainFile", () => activate(flutterHelloWorldMainFile));

	beforeEach(() => {
		deferUntilLast("Kill flutter_tester", () => watchPromise("Killing flutter_tester processes", killFlutterTester()));
	});

	let dc: DartDebugClient;
	beforeEach("create debug client", () => {
		dc = createDebugClient(DebuggerType.Flutter);
	});

	async function attachDebugger(vmServiceUri?: string): Promise<vs.DebugConfiguration> {
		const config = await getAttachConfiguration({
			args: [
				// Disable DDS when connecting, because we launch processes with `flutter run` which
				// connects a VM Service client, which will prevent DDS from connecting. This should not
				// be required if the app was started as a native app (as would usually be the case, outside
				// of tests).
				"--disable-dds",
				// Use pid-file as a convenient way of getting the test name into the command line args
				// for easier debugging of processes that hang around on CI (we dump the process command
				// line at the end of the test run).
				"--pid-file", path.join(os.tmpdir(), fileSafeCurrentTestName),
			],
			deviceId: flutterTestDeviceId,
			vmServiceUri,
		});
		if (!config)<commit_msg>Fix build error<commit_after>import { strict as assert } from "assert";
import * as os from "os";
import * as path from "path";
import * as vs from "vscode";
import { DebugProtocol } from "vscode-debugprotocol";
import { DartVsCodeLaunchArgs } from "../../../shared/debug/interfaces";
import { DebuggerType } from "../../../shared/enums";
import { DartDebugClient } from "../../dart_debug_client";
import { createDebugClient, flutterTestDeviceId, flutterTestDeviceIsWeb, killFlutterTester, spawnFlutterProcess, waitAllThrowIfTerminates } from "../../debug_helpers";
import { activate, deferUntilLast, delay, fileSafeCurrentTestName, flutterHelloWorldMainFile, getAttachConfiguration, logger, watchPromise } from "../../helpers";

describe("flutter run debugger (attach)", () => {
	beforeEach("Skip attach tests for web devices", function () {
		if (flutterTestDeviceIsWeb)
			this.skip();
	});

	beforeEach("activate flutterHelloWorldMainFile", () => activate(flutterHelloWorldMainFile));

	beforeEach(() => {
		deferUntilLast("Kill flutter_tester", () => watchPromise("Killing flutter_tester processes", killFlutterTester()));
	});

	let dc: DartDebugClient;
	beforeEach("create debug client", () => {
		dc = createDebugClient(DebuggerType.Flutter);
	});

	async function attachDebugger(vmServiceUri?: string): Promise<vs.DebugConfiguration & DartVsCodeLaunchArgs> {
		const config = await getAttachConfiguration({
			args: [
				// Disable DDS when connecting, because we launch processes with `flutter run` which
				// connects a VM Service client, which will prevent DDS from connecting. This should not
				// be required if the app was started as a native app (as would usually be the case, outside
				// of tests).
				"--disable-dds",
				// Use pid-file as a convenient way of getting the test name into the command line args
				// for easier debugging of processes that hang around on CI (we dump the process command
				// line at the end of the test run).
				"--pid-file", path.join(os.tmpdir(), fileSafeCurrentTestName),
			],
			deviceId: flutterTestDeviceId,
			vmServiceUri,
		});
		if (!config)
{'fraction_non_alphanumeric': 0.1212487899322362, 'fraction_numerical': 0.0, 'mean_word_length': 4.452506596306069, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '673816', 'n_tokens_mistral': 1242, 'n_tokens_neox': 1139, 'n_words': 384}