Kbase 20110: How to Debug a Procedure Running Remotely on an AppServer
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  2/7/2011 |
|
Status: Unverified
GOAL:
Debug AppServer code
GOAL:
How to debug an application that has a call to a procedure that will run remotely on a Progress AppServer.
SYMPTOM(s):
No Debugger listing file available for <procedure>. (3071)
Cannot STEP INTO '<procedure>'. SERVER '<server>' is not debug enabled. (5525)
FIX:
Follow these steps:
1) Enable debugging for the AppServer installation. Run a proenv session from the AppServer installation and run the command:
proDebugEnable -enable-all
2) Compile the procedure that will run on the AppServer (for example, proc.p) using the Application Compiler, but first select the "compiler" option in the options menu of the Application Compiler and add a debug file name.
This debug file should have the same name as the compiling file. It is suggested to assign the debug the extension .cmp.
3) Deploy the result files ( proc.r and proc.cmp) to the AppServer working directory. In OpenEdge 10, the proc.cmp or the source code needs to be available to the Debugger session on the client side.
4) Within the appServer properties -> Agent properties -> Advanced Features, "4GL debugger enabled" needs to be enabled.
5) Add the parameter "-debugReady <port#>" to the Agent Startup line. That will make the 'first' AppServer agent enabled for debugging on the given port#. Although not recommended, you can specify port 0 (zero) and it will assign a different port to each agent (check the tail of the AppServer server log file for the port numbers that get allocated), but this makes it quite difficult to debug and you would need to run a Debugger session for each port simultaneously.
6) Set your min, max, initial agents to 1. This is so that all of the code that is run will hit the same agent (the one that is enabled for debugging). Unless of course you used port 0 in step 5.
7) Start the AppServer broker.
8) Run the Debugger from the Tools menu in the client side (AppBuilder or Procedure Editor). Connect the Debugger to the port number that you gave in step 5.
When the main procedure runs the proc.r on the AppServer, the debugger brings the proc.cmp to the debugger screen and you will be able to continue with the debug task as if the procedure was local.