in rider/src/main/kotlin/com/jetbrains/aspire/rider/sessions/projectLaunchers/DotNetSessionProcessLauncher.kt [48:84]
override suspend fun launchRunProcess(
sessionId: String,
launchConfiguration: DotNetSessionLaunchConfiguration,
sessionProcessEventListener: ProcessListener,
sessionProcessLifetime: Lifetime,
aspireHostRunConfigName: String?,
project: Project
) {
LOG.trace { "Starting run session for ${launchConfiguration.projectPath}" }
val aspireHostRunConfig = getAspireHostRunConfiguration(aspireHostRunConfigName, project)
val (executable, _) = getDotNetExecutable(launchConfiguration, false, aspireHostRunConfig, project)
?: return
val executableWithOTLPEndpoint = modifyDotNetExecutableToUseCustomOTLPEndpoint(executable)
val (modifiedExecutable, callback) = modifyDotNetExecutable(
executableWithOTLPEndpoint,
launchConfiguration.projectPath,
launchConfiguration.launchProfile,
sessionProcessLifetime,
project
)
val runtime = getDotNetRuntime(modifiedExecutable, project) ?: return
val projectPath = launchConfiguration.projectPath
val aspireHostProjectPath = aspireHostRunConfig?.let { Path(it.parameters.projectFilePath) }
val profile = getRunProfile(
sessionId,
projectPath,
modifiedExecutable,
runtime,
sessionProcessEventListener,
sessionProcessLifetime,
aspireHostProjectPath
)
executeProfile(profile, false, callback, project)
}