<commit_before>import * as assert from "assert";
import * as os from "os";
import * as path from "path";
import * as sinon from "sinon";
import * as vs from "vscode";
import { fsPath } from "../../../src/utils";
import { fetch } from "../../../src/utils/fetch";
import { DartDebugClient } from "../../dart_debug_client";
import { ensureVariable, killFlutterTester } from "../../debug_helpers";
import { activate, defer, delay, ext, extApi, fileSafeCurrentTestName, flutterWebHelloWorldBrokenFile, flutterWebHelloWorldExampleSubFolderMainFile, flutterWebHelloWorldFolder, flutterWebHelloWorldMainFile, getLaunchConfiguration, openFile, positionOf, sb, watchPromise } from "../../helpers";

describe("flutter web debugger", () => {
	beforeEach("activate flutterWebHelloWorldMainFile", () => activate(flutterWebHelloWorldMainFile));
	beforeEach("set timeout", function () {
		this.timeout(60000); // These tests can be slow due to long builds.
	});

	let dc: DartDebugClient;
	beforeEach("create debug client", () => {
		dc = new DartDebugClient(process.execPath, path.join(ext.extensionPath, "out/src/debug/flutter_web_debug_entry.js"), "dart");
		dc.defaultTimeout = 60000;
		const thisDc = dc;
		defer(() => thisDc.stop());
	});

	beforeEach("activate flutterWebHelloWorldMainFile", () => activate(flutterWebHelloWorldMainFile));
	beforeEach("set timeout", function () {
		this.timeout(60000); // These tests can be slow due to flutter package fetches when running.
	});

	afterEach(() => watchPromise("Killing flutter_tester processes", killFlutterTester()));

	async function startDebugger(script?: vs.Uri | string, cwd?: string): Promise<vs.DebugConfiguration> {
		const config = await getLaunchConfiguration(script, {
			// 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).
			args: extApi.flutterCapabilities.supportsPidFileForMachine
				? ["--pid-file", path.join(os.tmpdir(), fileSafeCurrentTestName)]
				: [],
			cwd,
			deviceId: "flutter-tester",
		});
		await watchPromise("startDebugger->start", dc.start(config.debugServer));
		return config;
	}<commit_msg>Remove some code not relevant to web<commit_after>import * as assert from "assert";
import * as path from "path";
import * as sinon from "sinon";
import * as vs from "vscode";
import { fsPath } from "../../../src/utils";
import { fetch } from "../../../src/utils/fetch";
import { DartDebugClient } from "../../dart_debug_client";
import { ensureVariable, killFlutterTester } from "../../debug_helpers";
import { activate, defer, delay, ext, extApi, flutterWebHelloWorldBrokenFile, flutterWebHelloWorldExampleSubFolderMainFile, flutterWebHelloWorldFolder, flutterWebHelloWorldMainFile, getLaunchConfiguration, openFile, positionOf, sb, watchPromise } from "../../helpers";

describe("flutter web debugger", () => {
	beforeEach("activate flutterWebHelloWorldMainFile", () => activate(flutterWebHelloWorldMainFile));
	beforeEach("set timeout", function () {
		this.timeout(60000); // These tests can be slow due to long builds.
	});

	let dc: DartDebugClient;
	beforeEach("create debug client", () => {
		dc = new DartDebugClient(process.execPath, path.join(ext.extensionPath, "out/src/debug/flutter_web_debug_entry.js"), "dart");
		dc.defaultTimeout = 60000;
		const thisDc = dc;
		defer(() => thisDc.stop());
	});

	afterEach(() => watchPromise("Killing flutter_tester processes", killFlutterTester()));

	async function startDebugger(script?: vs.Uri | string, cwd?: string): Promise<vs.DebugConfiguration> {
		const config = await getLaunchConfiguration(script, {
			cwd,
			deviceId: "flutter-tester",
		});
		await watchPromise("startDebugger->start", dc.start(config.debugServer));
		return config;
	}
{'fraction_non_alphanumeric': 0.14181628935727297, 'fraction_numerical': 0.006505334374186833, 'mean_word_length': 5.082278481012659, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 18, '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': '971006', 'n_tokens_mistral': 1185, 'n_tokens_neox': 1126, 'n_words': 309}