src/vs/workbench/services/userDataProfile/browser/userDataProfileImportExportService.ts/UserDataProfileImportExportService/exportProfile
class UserDataProfileImportExportService:	async exportProfile(): Promise<void> {
		if (this.isProfileImportExportInProgressContextKey.get()) {
			this.logService.warn('Profile import/export already in progress.');
			return;
		}

		this.isProfileImportExportInProgressContextKey.set(true);
		const disposables = new DisposableStore();

		try {
			await this.progressService.withProgress({
				location: ProgressLocation.Window,
				title: localize('profiles.exporting', "{0}: Exporting...", PROFILES_CATEGORY.value),
			}, async progress => {
				disposables.add(toDisposable(() => this.isProfileImportExportInProgressContextKey.set(false)));
				const userDataProfilesExportState = disposables.add(this.instantiationService.createInstance(UserDataProfileExportState, this.userDataProfileService.currentProfile));

				const title = localize('export profile preview', "Export");
				let exportProfile = await this.selectProfileResources(
					userDataProfilesExportState,
					localize('export title', "{0}: {1} ({2})", PROFILES_CATEGORY.value, title, this.userDataProfileService.currentProfile.name),
					localize('export description', "Chose what to export")
				);

				if (exportProfile === undefined) {
					return;
				}

				if (!exportProfile) {
					exportProfile = await this.showProfilePreviewView(`workbench.views.profiles.export.preview`, title, userDataProfilesExportState);
				}

				if (!exportProfile) {
					return;
				}

				const profile = await userDataProfilesExportState.getProfileToExport();
				if (!profile) {
					return;
				}

				const saveResult = await this.saveProfileContent(profile.name, JSON.stringify(profile));
				if (saveResult) {
					const profileHandler = this.profileContentHandlers.get(saveResult.id);
					const buttons = profileHandler?.extensionId ? [localize('copy', "Copy Link"), localize('open', "Open in {0}", profileHandler?.name), localize('close', "Close")] : undefined;
					const result = await this.dialogService.show(
						Severity.Info,
						localize('export success', "Profile '{0}' is exported successfully.", profile.name),
						buttons,
						{ cancelId: 2 }
					);
					switch (result.choice) {
						case 0:
							await this.clipboardService.writeText(
								URI.from({
									scheme: this.productService.urlProtocol,
									authority: `${UserDataProfileImportExportService.PROFILE_URL_AUTHORITY_PREFIX}${saveResult.id}`,
									path: `/${saveResult.resource.toString()}`
								}).toString());
							break;
						case 1:
							await this.openerService.open(saveResult.resource.toString());
							break;

					}
				}
			});
		} finally {
			disposables.dispose();
		}
	}