Search code examples
debuggingopenedgeprogress-4gl

How to use the OpenEdge debugger (OpenEdge Debugger 11.6)


I'm working with OpenEdge Progress-4GL AppBuilder and Procedure Editor, and now I'd like to start working with the OpenEdge Debugger, release 11.6.

As found on quite some places on the internet, I've taken following actions to enable debugging of my Progress application:

Using Proenv, I've launched following command:

prodebugenable -enable-all

I get following response:

OpenEdge Release 11.6 as of Fri Oct 16 19:01:51 EDT 2015

==============================================================================
        PROGRESS Debug Enabler
==============================================================================

Debugging is enabled for the Progress 4GL installed in
C:\PROGRE~1\OpenEdge.

For your information, some information on environment variables:

proenv>set DLC
DLC=C:\PROGRE~1\OpenEdge

proenv>set WRK
WRKDIR=C:\OPENED~1\WRK

proenv>set ENABLE_OPENEDGE_DEBUGGER
Environment variable ENABLE_OPENEDGE_DEBUGGER not defined

As far as my application is concerned, the application is based on a shortcut, which looks as follows:

C:\Progressx86\OpenEdge\bin\prowin32.exe
  -basekey "INI"
    -ininame c:\progress\our_application\progress.ini
  -pf c:\progress\our_application\misc\run_our_application.pf
  -p our_application.r
  -rr

The file "run_our_application.pf" contains a list of entries, like the following:

-db   our_DB
-H  DC1
-N  tcp
-S  6543

To the mentioned shortcut, I've added -debugReady 5001 in order to enable debugging, based on TCP portnumber 5001. When I launch the application, I get a warning message about this, and netstat -aon gives me following entry:

TCP    0.0.0.0:5001           0.0.0.0:0              LISTENING       11344

Where 11344 is confirmed as the prowin32 application.

In OpenEdge debugger, I've following entries in menu item "Edit", "Preferences", "Attachable":

C:\progress\our_application
Z:\Progress\our_application\PRG
C:\Progressx86\OpenEdge

For your information: The Z:-drive is an external server drive, Z:\Progress\our_application\PRG is the directory where files (*.w and *.p) get compiled into *.r files, the file our_application.r can be found there.

Nevertheless, when I open a *.w file and I go to the menu "Debug", the "Attach to Process" menu item stays disabled.

What can I do in order to debug my application/*.w file?


Solution

  • There are several ways of debugging. Start simple. You should be able to use any of the following:

    1. from the procedure editor

    Instead of selecting [ Compile / Run ], select [ Compile / Debug ]. The AVM will start executing the current file and the debugger will suspend execution on the first line.

    1. from any alert-box

    Add -debugalert to your startup parameters and every alert-box will display an additional 'Help' button. Clicking on it will show the stack-trace and a 'Debug' button. Clicking on that will start the debugger, execution is suspended at the line of the alert-box, this can be your own alert-box or an error.

    1. stand-alone debugger

    Start the debugger application (the Windows shortcut starts proDebugger.bat) and select [ Debug / Attach To Process... ] you can then either enter a PID or select a local running session (AVM).

    1. remote attachable debugger

    This is what you seem to be trying to setup - this allows you to attach the stand alone debugger (see option 3) to a process running on another machine, this can be useful when you have an AppServer or WebSpeed agent that you want to debug.

    1. PDSOE debugger

    Not relevant for you since you are not using Progress Developer Studio for OpenEdge, but just mentioning it for completeness. This allows adding break points in your source code by double clicking in the left margin and stepping through your source code instead stepping through a debug-listing.