Eclipse Remote Debug pre-launch script?
Asked Answered
R

1

3

I've created a "C/C++ Remote Application" debug configuration in and am able to debug my application remotely. I chose to use the "SSH Only" connection option and noticed, as a result, a new entry was created in my Remote System Explorer (RSE) in . When I run the configuration the tool automatically deploys (sftp?) my binary to the remote SSH target - this part works great.

Is it possible to setup the configuration to deploy other files to the target along with my debug binary using the same (sftp?) mechanism?

My application opens files upon running and I'd like them to be present when the debug session starts. I can create my own separate script to copy them over manually before the debug configuration is run - but I'd like to have an integrated solution that uses the connection entries that are already available in the RSE.

UPDATE1

I've come across this similar question, which also has no answer.

Rabato answered 21/5, 2015 at 21:9 Comment(0)
J
2

I was also looking for such as solution, I'm afraid there isn't a direct solution to what you want as far as I know, but there is something you can manipulate to accomplish what you want.

Under "C/C++ Remote Application" debug configuration there is a box for 'Command to execute before application'. In this text box you can write an SCP command to copy required files from host to target. As the command would be executed before executing application binary you should have all the files on your target.

Using SCP for this would need to setup an account in your system that does not need authentication. Another option is to host a FTP server on your host and in the text filed 'Command to execute before application' add a command to copy file from host to target using FTP

Justinjustina answered 3/11, 2016 at 4:20 Comment(2)
Using SCP for this would need to setup an account in your system that does not need authentication. Another option is to host a FTP server on your host and in the text filed 'Command to execute before application' add a command to copy file from host to target using FTP.Justinjustina
"..an account in your system that does not need authentication". You can configure key-based SSH authentication. This would allow SCP to be used securly without a password prompt.Lowpitched

© 2022 - 2024 — McMap. All rights reserved.