Eclipse source level debug linux projects from windows remotely - shijunjing/edk2 GitHub Wiki

Below is how I remotely do the source level debug on linux project from windows

Install Eclipse in Linux machine

Install the Eclipse in ubuntu 18.04: https://www.hiroom2.com/2018/05/14/ubuntu-1804-eclipse-cdt-en/

jshi19@ub2-uefi-b01:~$ URL=https://www.eclipse.org/downloads/download.php
jshi19@ub2-uefi-b01:~$ ECLIPSE=/oomph/epp/oxygen/R/eclipse-inst-linux64.tar.gz
jshi19@ub2-uefi-b01:~$ MIRROR=1
jshi19@ub2-uefi-b01:~$ wget -q -O eclipse-inst-linux64.tar.gz   "${URL}?file=${ECLIPSE}&mirror_id=${MIRROR}"
jshi19@ub2-uefi-b01:~$ tar zxf eclipse-inst-linux64.tar.gz
jshi19@ub2-uefi-b01:~$ cd eclipse-installer/
jshi19@ub2-uefi-b01:~/eclipse-installer$ ./eclipse-inst
  • After the installer launch, switch to advanced mode firstly:

  • Configure the network as 'manual' mode and set the http proxy:

Install Putty in windows machine

(if you work at home, you'd better use a office windows machine which is close to the linux machine, and remote desktop to login it from your home. Don't try to directly forwarding X11 (need network speed +500Kb) through VPN to your home, which is too slow)

If you already configured the Putty, you can export and import the configures to another machine: https://stackoverflow.com/questions/13023920/how-to-export-import-putty-sessions-list

Install VcXsrv Windows X Server in windows machine

"C:\Program Files\VcXsrv\vcxsrv.exe" :0 -ac -terminate -lesspointer -multiwindow -clipboard -wgl

  • Double click the shortcut to launch the VcXsrv Windows X service in your windows machine

Launch the Eclipse

Remote desktop to your office windows(w10-uefi-b01), then use Putty in office windows to login the linux machine (ub2-uefi-b01) and run the eclispe in linux:

jshi19@ub2-uefi-b01:~$ ~/eclipse/cpp-oxygen/eclipse/eclipse

Project Source Level Debug Example:

Debug DG program slicer: https://github.com/shijunjing/edk2/wiki/DG-program-slicer-enabling-for-uefi#source-level-debug-dg-in-eclipse