New clion_adaptation environment config param, to allow for use of Bloom with CLion's new "debug server" functionality

This commit is contained in:
Nav
2025-02-02 15:52:26 +00:00
parent b06e8cc9ad
commit a9c8f24f8b
12 changed files with 69 additions and 152 deletions

View File

@@ -517,6 +517,7 @@ void Application::stopTargetController() {
void Application::startDebugServer() {
this->debugServer = std::make_unique<DebugServer::DebugServerComponent>(
this->environmentConfig.value(),
this->debugServerConfig.value()
);
this->debugServerThread = std::thread{&DebugServer::DebugServerComponent::run, this->debugServer.get()};
@@ -637,7 +638,10 @@ void Application::onDebugServerThreadStateChanged(const Events::DebugServerThrea
}
void Application::onDebugSessionFinished(const Events::DebugSessionFinished& event) {
if (this->environmentConfig->shutdownPostDebugSession || Services::ProcessService::isManagedByClion()) {
if (
this->environmentConfig->shutdownPostDebugSession
|| (this->environmentConfig->clionAdaptation && Services::ProcessService::isManagedByClion())
) {
this->triggerShutdown();
}
}