eclipse-plugins-remote-debugging manual
medium
- Image Types:
- sdk-amd64
- Image Deployment:
- APT
- Type:
- functional
Description
Test remote debugging within Eclipse. It will create a dummy project and then create a configuration to copy the binary file to a remote device and debug it remotely using Eclipse.
Pre Conditions
- A remote device with SSH access enabled
- Username and password for the device
- Check the IP address of the device, you'll need it during configuration
- gdbserver must be installed in the remote device. The debugging port (2345 by default) must be open
- flush the ip tables if the connection to the host fails
Execution Steps
- Start Eclipse
- On the initial workspace selection dialog, Click OK to select the default one
- First, create a dummy project to test. Go to File > New > C++ Project
- Project Name: testDebug
- Project Type: Hello World C++ project
- Toolchains: Linux GCC
- Click Finish
- Go to Project > Build All
- Now create the remote debug configuration. Go to Run > Debug configurations...
- In the navigation list, select C/C++ Remote Application. Click on New, or right-click it and select New.
- On the Main tab, fill in the fields
- Name: remoteDebug
- C/C++ Application: click on Search Project... and select testDebug
- Connection: click on New...
- Select SSH Only. Click on Next
- Host name: the device IP address
- Connection name: remote
- Click on Next
- Click on Next
- Click on Next
- Click on Finish
- Remote absolute path for C/C++ application: /home/user/testDebug
- When you are done, click on Debug
- It will prompt for a change to Debug perspective. Click Yes
- The code should show with a highlighted line, which notes the breakpoint
- Hit F6 to debug the next line
- When it reaches the Hello, world! statement, the output should show in the Console view at the bottom
Expected
Remote debugging started succesfully
"Hello, World!" shown on the Console view of Eclipse