Clion Build remotely on machinA and debug on machineB

Answered

I working on project which requires cross compilation.
1. I have docker (clion connects to it via SSH. Call it machinA) which has necessary tool-chain. I build the code and gets exec (test1) as result in machinA.

2. Now I need to debug this exec on machinB- clion connects to it via SSH. I use Run/Debug Configuration and choose Remote GDB Server. When I try to run debug session I get ERROR that CLion can't find exec. It tries to find it on my local PC machine instead of on machinA where it currently is.

 

Why Clion is searching artefacts on local PC while toolchain was set on remote? It should acutally gets the build result form machineA and run it on machineB. My PC should be only to display Clion GUI

 

2 comments
Comment actions Permalink

Find the answer: seems like new version CLion disables rsync on artefacts file like ELF. Even 'Rsync with Remote Host' doesn't work.
Similar story with kind of solution:
https://youtrack.jetbrains.com/issue/CPP-22619

BTW: As this change is like feature not a bug, how it should supposed to my scenario work after this change?

0
Comment actions Permalink

Hello!

We have a detailed guide for that scenario - https://www.jetbrains.com/help/clion/complicated-remote-scenarios.html. Please follow it.

Please pay attention to the fact that you need to use the debugger from your build machine.

0

Please sign in to leave a comment.