File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -180,6 +180,12 @@ void DebugControlsWidget::performLaunch()
180180 {
181181 isLocalLaunch = false ;
182182 }
183+
184+ // Also consider debug server connections as remote
185+ if (m_controller->IsConnectedToDebugServer ())
186+ {
187+ isLocalLaunch = false ;
188+ }
183189
184190 if (isLocalLaunch && firstLaunch && Settings::Instance ()->Get <bool >(" debugger.confirmFirstLaunch" ))
185191 {
@@ -188,6 +194,16 @@ void DebugControlsWidget::performLaunch()
188194 if (QMessageBox::question (this , " Launch Target" , prompt) != QMessageBox::Yes)
189195 return ;
190196 }
197+ else if (!isLocalLaunch && firstLaunch && Settings::Instance ()->Get <bool >(" debugger.confirmFirstLaunch" ))
198+ {
199+ auto remoteHost = QString::fromStdString (m_controller->GetRemoteHost ());
200+ auto remotePort = m_controller->GetRemotePort ();
201+ auto prompt = QString (" You are about to launch \n\n %1\n\n on remote host %2:%3. "
202+ " Are you sure to continue?" ).arg (QString::fromStdString (m_controller->GetExecutablePath ()))
203+ .arg (remoteHost).arg (remotePort);
204+ if (QMessageBox::question (this , " Launch Target" , prompt) != QMessageBox::Yes)
205+ return ;
206+ }
191207
192208 auto data = m_controller->GetData ();
193209 if (!data->GetDefaultPlatform ())
Original file line number Diff line number Diff line change @@ -476,6 +476,12 @@ void GlobalDebuggerUI::SetupMenu(UIContext* context)
476476 {
477477 isLocalLaunch = false ;
478478 }
479+
480+ // Also consider debug server connections as remote
481+ if (controller->IsConnectedToDebugServer ())
482+ {
483+ isLocalLaunch = false ;
484+ }
479485
480486 if (isLocalLaunch && firstLaunch && Settings::Instance ()->Get <bool >(" debugger.confirmFirstLaunch" ))
481487 {
@@ -485,6 +491,16 @@ void GlobalDebuggerUI::SetupMenu(UIContext* context)
485491 if (QMessageBox::question (context->mainWindow (), " Launch Target" , prompt) != QMessageBox::Yes)
486492 return ;
487493 }
494+ else if (!isLocalLaunch && firstLaunch && Settings::Instance ()->Get <bool >(" debugger.confirmFirstLaunch" ))
495+ {
496+ auto remoteHost = QString::fromStdString (controller->GetRemoteHost ());
497+ auto remotePort = controller->GetRemotePort ();
498+ auto prompt = QString (" You are about to launch \n\n %1\n\n on remote host %2:%3. "
499+ " Are you sure to continue?" ).arg (QString::fromStdString (controller->GetExecutablePath ()))
500+ .arg (remoteHost).arg (remotePort);
501+ if (QMessageBox::question (context->mainWindow (), " Launch Target" , prompt) != QMessageBox::Yes)
502+ return ;
503+ }
488504
489505 if (!ensureBinaryViewHasPlatform (controller->GetData (), context->mainWindow ()))
490506 return ;
You can’t perform that action at this time.
0 commit comments