The Eric Python IDE

How to perform 'Remote Debugging' with eric7

This Howto document describes a way to do remote debugging with eric7. It shows the steps to be performed with eric7 starting with release 23.12. For earlier releases please see the other Howto document related to this topic.

Prerequisites

  1. The source code of the project to be debugged must be available on the remote and local computer. This is ideally done via a shared directory. Please note, that the synchronization of the sources is outside the scope of this document.
  2. A login to the remote computer must be possible without entering a user and/or a password. This can be achieved with ssh with a pre-shared key. Please test this is working before remote debugging is attempted.
  3. Because the eric IDE opens an arbitray port for the connection of the debug client of the remote computer, it is neccessary that this is not prohibited by local security policies.

Prepair for Remote Debugging

The eric IDE works with "Virtual Environments" for several purposes. This means, you have to configure one for the remote machine like shown in the following image.

Remote Virtual
Environment Configuration

Please enter the paths on the remote machine for Directory and Python Interpreter. Ensure that the Remote Environment checkbox is selected.

The remote machine must able to connect back to the local computer via the network. Therefore it is essential, that the eric IDE is listening on a network interface other than localhost. This is shown in the next image.

Network Settings

Preparing the project for Remote Debugging

In order to prepare the project for remote debugging you should enter the relevant data into the Debugger Properties dialog and save that data.

Debugger Properties

It is recommended to select the remote virtual environment in this dialog to avoid the necessity to select the environment whenever a debugging session is started. For remote debugging it is essential, that the Remote Debugger group is selected and all data is entered. Please observe, that file system paths have to be given with the correct separator of the respective system (i.e. \ for Windows® and / for other systems). The eric IDE will translate the paths from remote to local and vice versa as required. With Perform Path Translation deselected, it is assumed, that the paths are identical on both systems.

Start Remote Debugging

After these preparation steps have been performed, starting a remote debugging session is not different to local debugging. Just select the Debug Project action and the start dialog will be shown. If you selected the configured remote virtual environment in the previous step, it is essential, that you leave the respective selection of this dialog empty as shown in the image below.

Start Dialog no
environment selected

If no project specific remote virtual environment was selected or the configured one shall be overridden, the environment must be selected in the start dialog as shown in the next image.

Start Dialog with
environment selected

Once debugging has started all debugging commands are sent by the eric IDE to the remote debugger and data from the remote debugger are received and displayed by the eric IDE.

Have fun and good luck with troubleshooting!