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

  1. A remote device with SSH access enabled
  2. Username and password for the device
  3. Check the IP address of the device, you'll need it during configuration
  4. gdbserver must be installed in the remote device. The debugging port (2345 by default) must be open
  5. flush the ip tables if the connection to the host fails

Execution Steps

  1. Start Eclipse
  2. On the initial workspace selection dialog, Click OK to select the default one
  3. First, create a dummy project to test. Go to File > New > C++ Project
  4. Project Name: testDebug
  5. Project Type: Hello World C++ project
  6. Toolchains: Linux GCC
  7. Click Finish
  8. Go to Project > Build All
  9. Now create the remote debug configuration. Go to Run > Debug configurations...
  10. In the navigation list, select C/C++ Remote Application. Click on New, or right-click it and select New.
  11. On the Main tab, fill in the fields
  12. Name: remoteDebug
  13. C/C++ Application: click on Search Project... and select testDebug
  14. Connection: click on New...
  15. Select SSH Only. Click on Next
  16. Host name: the device IP address
  17. Connection name: remote
  18. Click on Next
  19. Click on Next
  20. Click on Next
  21. Click on Finish
  22. Remote absolute path for C/C++ application: /home/user/testDebug
  23. When you are done, click on Debug
  24. It will prompt for a change to Debug perspective. Click Yes
  25. The code should show with a highlighted line, which notes the breakpoint
  26. Hit F6 to debug the next line
  27. 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