src/vs/workbench/contrib/issue/electron-sandbox/issueActions.ts/StopTracing/run
class StopTracing:	override async run(accessor: ServicesAccessor): Promise<void> {
		const issueService = accessor.get(IIssueService);
		const environmentService = accessor.get(INativeEnvironmentService);
		const dialogService = accessor.get(IDialogService);
		const nativeHostService = accessor.get(INativeHostService);
		const progressService = accessor.get(IProgressService);

		if (!environmentService.args.trace) {
			const { choice } = await dialogService.show(
				Severity.Info,
				localize('stopTracing.message', "Tracing requires to launch with a '--trace' argument"),
				[
					localize({ key: 'stopTracing.button', comment: ['&& denotes a mnemonic'] }, "&&Relaunch and Enable Tracing"),
					localize('cancel', "Cancel")
				],
				{
					cancelId: 1
				}
			);

			switch (choice) {
				case 0:
					return nativeHostService.relaunch({ addArgs: ['--trace'] });
				case 1:
					return; // canceled
			}
		}

		await progressService.withProgress({
			location: ProgressLocation.Dialog,
			title: localize('stopTracing.title', "Creating trace file..."),
			cancellable: false,
			detail: localize('stopTracing.detail', "This can take up to one minute to complete.")
		}, () => issueService.stopTracing());
	}