src/vs/platform/windows/electron-main/windowsMainService.ts/WindowsMainService/resolveProfileForBrowserWindow
class WindowsMainService:	private async resolveProfileForBrowserWindow(options: IOpenBrowserWindowOptions): Promise<IUserDataProfile> {
		let profile: IUserDataProfile | undefined;
		if (this.userDataProfilesMainService.isEnabled()) {
			if (options.forceProfile) {
				profile = this.userDataProfilesMainService.profiles.find(p => p.name === options.forceProfile) ?? await this.userDataProfilesMainService.createNamedProfile(options.forceProfile);
			} else if (options.forceTempProfile) {
				profile = await this.userDataProfilesMainService.createTransientProfile();
			}
		}
		if (profile) {
			if (!options.cli?.extensionDevelopmentPath) {
				this.userDataProfilesMainService.setProfileForWorkspaceSync(options.workspace ?? 'empty-window', profile);
			}
		} else {
			profile = this.userDataProfilesMainService.getOrSetProfileForWorkspace(options.workspace ?? 'empty-window', (options.windowToUse ?? this.getLastActiveWindow())?.profile ?? this.userDataProfilesMainService.defaultProfile);
		}
		return profile;
	}