Debugging with multiple network adapters

I just spent the entire day trying to get the Remote Debug feature working with my iMac running the IDE (2018.1.1) and the intended target a Raspberry Pi 3. Most of that time was trying to solve the “Cannot connect to the debugger Since we could not locate the target IDE to start a debug session, this application will now exit” message mystery.

I tried every suggestion I could find on this forum as well as general internet search (perhaps I missed one), only to be continually thwarted by the message. Grasping at straws, I finally turned off the wifi (I use three networks adapters that are on different subnets) on my iMac, and behold the debugger worked as advertised with no message. Apparently, the debugger would select the network that the Pi was connected to (wifi on the Pi, but wired ethernet on the iMac) when it downloaded the app, but would not listen on that network when the debugger engaged.

I had also tried to the the iMac’s network services order to favor the ethernet connection, but that didn’t help. The subnets are (wifi), (USB3 to ethernet), and (wired ethernet). The order I selected was ethernet, wifi, USB.

My question for those on this forum is, is there a way to set the IDE debugger to listen on the same network (subnet) that it used transferred the application to the target? Alternatively, is there a way to set the debugger to listen on a specific network?

Thanks in advance for any insights.

I haven’t got my Pi up to check, but the Linux debugger allows you to select your network interface in the GUI under Edit | Options. The IDE allows (requires) you to input the target IP. If those settings don’t work maybe file a bug report with a small screencast.

Yes. There’s an option in the debugger stub options.

When I set the Pi on the IDE’s subnet ( - wired) and set the IDE to talk to the Pi on that subnet, the program compiles and loads onto the target (Pi), but doesn’t run (message is displayed). If I change the Pi to the subnet associated with the IDE’s wifi ( and set the IDE to talk to the Pi on that subnet, everything works.

So, it seems to me that the IDE is only listening on the subnet (perhaps because it’s numerically lower, not because that the wired ethernet subnet is set at a higher priority in the Network Preferences Panel). When I have more time, I’ll investigate more. For now, I can live with the work around, even though the wifi is slower than the wired connection.