in rider/src/main/kotlin/com/jetbrains/aspire/rider/sessions/wasmHost/WasmHostProjectSessionDebugProgramRunner.kt [61:92]
override suspend fun createAndStartSession(
env: ExecutionEnvironment,
state: IDotNetDebugProfileState,
protocol: IProtocol,
sessionLifetime: Lifetime,
workerProcessHandler: DebuggerWorkerProcessHandler,
sessionModel: DotNetDebuggerSessionModel,
workerModel: DebuggerWorkerModel
): XSessionStartedResult {
val executionResult = state.execute(env.executor, this, workerProcessHandler, sessionLifetime)
val executionConsole = executionResult.executionConsole
val processHandler = executionResult.processHandler
val wasmProfileState = state as? WasmHostProjectSessionDebugProfileState
?: throw CantRunException("State profile is not supported")
return createAndStartSession(
executionConsole,
env,
sessionLifetime,
processHandler,
protocol,
sessionModel,
state.getDebuggerOutputEventsListener(),
wasmProfileState.browserRefreshHost
) { xDebuggerManager, xDebugProcessStarter ->
xDebuggerManager
.newSessionBuilder(xDebugProcessStarter)
.environment(env)
.startSession()
}
}