File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -181,11 +181,7 @@ void DebugControlsWidget::performLaunch()
181181 isLocalLaunch = false ;
182182 }
183183
184- // Also consider debug server connections as remote
185- if (m_controller->IsConnectedToDebugServer ())
186- {
187- isLocalLaunch = false ;
188- }
184+ bool connectedToDebugServer = m_controller->IsConnectedToDebugServer ();
189185
190186 if (isLocalLaunch && firstLaunch && Settings::Instance ()->Get <bool >(" debugger.confirmFirstLaunch" ))
191187 {
@@ -194,7 +190,8 @@ void DebugControlsWidget::performLaunch()
194190 if (QMessageBox::question (this , " Launch Target" , prompt) != QMessageBox::Yes)
195191 return ;
196192 }
197- else if (!isLocalLaunch && firstLaunch && Settings::Instance ()->Get <bool >(" debugger.confirmFirstLaunch" ))
193+ else if (!isLocalLaunch && connectedToDebugServer &&firstLaunch &&
194+ Settings::Instance ()->Get <bool >(" debugger.confirmFirstLaunch" ))
198195 {
199196 auto remoteHost = QString::fromStdString (m_controller->GetRemoteHost ());
200197 auto remotePort = m_controller->GetRemotePort ();
Original file line number Diff line number Diff line change @@ -477,11 +477,7 @@ void GlobalDebuggerUI::SetupMenu(UIContext* context)
477477 isLocalLaunch = false ;
478478 }
479479
480- // Also consider debug server connections as remote
481- if (controller->IsConnectedToDebugServer ())
482- {
483- isLocalLaunch = false ;
484- }
480+ bool connectedToDebugServer = controller->IsConnectedToDebugServer ();
485481
486482 if (isLocalLaunch && firstLaunch && Settings::Instance ()->Get <bool >(" debugger.confirmFirstLaunch" ))
487483 {
@@ -491,7 +487,8 @@ void GlobalDebuggerUI::SetupMenu(UIContext* context)
491487 if (QMessageBox::question (context->mainWindow (), " Launch Target" , prompt) != QMessageBox::Yes)
492488 return ;
493489 }
494- else if (!isLocalLaunch && firstLaunch && Settings::Instance ()->Get <bool >(" debugger.confirmFirstLaunch" ))
490+ else if (!isLocalLaunch && connectedToDebugServer && firstLaunch &&
491+ Settings::Instance ()->Get <bool >(" debugger.confirmFirstLaunch" ))
495492 {
496493 auto remoteHost = QString::fromStdString (controller->GetRemoteHost ());
497494 auto remotePort = controller->GetRemotePort ();
You can’t perform that action at this time.
0 commit comments