fun getStartBrowserAction()

in core/src/main/kotlin/com/jetbrains/aspire/util/BrowserUtils.kt [12:27]


fun getStartBrowserAction(
    browserUrl: String,
    launchBrowser: Boolean,
    params: DotNetStartBrowserParameters
): (ExecutionEnvironment, RunProfile, ProcessHandler) -> Unit =
    { _, runProfile, processHandler ->
        if (launchBrowser && runProfile is RunConfiguration) {
            val startBrowserSettings = StartBrowserSettings().apply {
                isSelected = true
                url = browserUrl
                browser = params.browser
                isStartJavaScriptDebugger = params.withJavaScriptDebugger
            }
            BrowserStarter(runProfile, startBrowserSettings, processHandler).start()
        }
    }