diff --git a/src/plugins/debugger/analyzer/startremotedialog.cpp b/src/plugins/debugger/analyzer/startremotedialog.cpp index 9ef484f9f97..e148c0f5bff 100644 --- a/src/plugins/debugger/analyzer/startremotedialog.cpp +++ b/src/plugins/debugger/analyzer/startremotedialog.cpp @@ -132,9 +132,13 @@ void StartRemoteDialog::validate() Runnable StartRemoteDialog::runnable() const { Kit *kit = d->kitChooser->currentKit(); + IDevice::ConstPtr device = DeviceKitAspect::device(kit); + FilePath filePath = FilePath::fromString(d->executable->text()); + if (device) + filePath = device->filePath(d->arguments->text()); + Runnable r; - r.device = DeviceKitAspect::device(kit); - r.command = {FilePath::fromString(d->executable->text()), d->arguments->text(), CommandLine::Raw}; + r.command = {filePath, d->arguments->text(), CommandLine::Raw}; r.workingDirectory = FilePath::fromString(d->workingDirectory->text()); return r; }