Creating Launch Configurations

Perl Local: Running a Perl Script on the Local Machine

Perl Local Dialog
  1. Enter the name for the launch configuration in the Name field.

  2. In the Main tab

  3. If you wish to pass command-line parameters to the script or to the Perl interpreter, enter them in the Arguments tab.

  4. If you wish to modify environment variables for the script, enter them in the Environment tab.

    Note

    Be careful when removing or overriding the standard environment variables. For example, the environment variable %SYSTEMROOT% is essential for Perl socket IO to work under Windows.

  5. Press the Apply button

Perl CGI: Run Perl Programs in a CGI Environment

Perl CGI Dialog
  1. Enter the name for the launch configuration in the Name field.

  2. In the Web Server tab

    • HTML Root Directory field: enter the base directory that contains all HTML files or use the Browse button to select the appropriate directory.

    • HTML Startup File field: enter the file name to be shown in the browser after startup or use the Browse button to select this file.

    • CGI Root Directory field: enter the base directory that contains all CGI files or use the Browse button to select the appropriate directory.

    • Extension for CGI files field: this is a comma separated list of file extensions (each starting with a "." ) used for CGI files in the project.

  3. In the Browser tab, there are two possible settings:

    • Select Custom Browser: specify the path to the browser executable and add the required command line parameters. Use %1 as a place holder for the HTML file to be opened.

    • Select Default System Browser to use the browser defined as default browser by your OS preferences.

  4. If you wish to modify environment variables for the script, enter them in the Environment tab.

  5. If you wish to pass command-line parameters to the Perl interpreter, enter them in the Arguments tab.

  6. Press the Apply button.

Perl Remote: Debug a Perl Script on a Remote Machine

Note

This feature is not tested very well and should be considered experimental.

Some points to consider:
  • You need a Perl interpreter installed on the remote host.

  • During debugging the remote host connects to the local (Eclipse) host using three TCP ports: the debugger port, the stdout/stdin port and the stderr port. The debugger port is specified statically in the launch configuration (see below). The two other ports are picked up from the range 5000-10000. (EPIC attempts to reserve these ports in ascending order starting with 5000.) Make sure that your firewall does not block these required connections.

  • Scripts executed and code shown are from different sources: EPIC displays the code present on your local host and executes a copy of this code on the remote host. So if you make changes within your project please make sure to transfer these changes to the remote host (see below for further details).

    This problem gets more significant for code/modules provided by your Perl installation. If modules on your local and remote host differ, debugging results may be quite meaningless. So try to have the same Perl version installed on both hosts and make sure all modules you require (which are not part of your Eclipse project) are identical.

  • @INC path handling: if the include path references directories within your project or directories that are linked into your projects, EPIC will include these modules in the list of files to be copied to the remote host and adjust the @INC-path for your remote host accordingly. Overall, it is best to set up project-relative @INC paths in the project properties.

Perl Remote Dialog
  1. Enter the name for the launch configuration in the Name field.

  2. In the Configuration tab

  3. Local Host IP: this is the IP-address used by the remote host to connect to your local host. In most cases the default value is appropriate.

  4. Target Host Project Installation Path: the project's location on the remote host. Make sure that your Eclipse project can be found at this location.

  5. Port: Port used by the remote debugger to connect to the local host.

  6. Create Debug Package: if checked, a ZIP file containing the project files to be transfered to the remote host is created. This file is stored at the location indicated in Debug Package File Path.

  7. Press the Debug button. At this point, the local host starts listening for a remote debugger connection.

  8. Extract the ZIP file to the location on your remote host indicated in Target Host Project Installation Path.

  9. Start the script start_epicDB.pl on your remote host (it is included in the ZIP archive and thus located in the project directory after extraction). This script starts the debugger and makes it connect to the local host.

  10. Enjoy debugging...