To perform local debugging

Note: Local debugging means you are running Net Express on your Windows server, not on the client, and you are logged on to the server itself to run the program being debugged.
  1. Configure and start the Lawson Debug Server (ladebug).
    1. Make sure that there is an entry for the Lawson Debug Server (ladebug.exe) in laserv.cfg. The entry should be as follows:

      ladebug "%gendir%\bin\ladebug.exe"

    2. Set the ENABLEDBG parameter in %LAWDIR%\system\ladebug.cfg to TRUE.
    3. Start the Lawson Debug Server (ladebug). At the command line, type

      startladebug

      If the ENABLEDBG parameter in ladebug.cfg is set to TRUE and if ladebug is running, Lawson client programs will check with the Lawson Debug Server to see if the application program is being debugged. Because this setting incurs some overhead, the ENABLEDBG parameter should always be set to FALSE in a production Lawson Environment. For more information on the Lawson Debug Server, see the Lawson Administration: Server Setup and Maintenance guide.

  2. Compile the program you want to debug.

    qcompile -D productline systemcode programcode

  3. From a command line window set up for Lawson, start Net Express:

    mfnetx

    Note: After you have set up a project’s application path variable, you can double-click the Net Express icon to start it.

    The following parameters are valid:

    Parameter Description
    projname Load the specified project (for example, gl00.app).
    /DEBUG:progname Animate a program without loading a project.
    /DEBUGPROJ:projname Load a project and start animating the main program.
    /DEBUGWAIT:Directory Start the debugger and wait for an executable in the directory to start.
    /N Do not load the last project used.
    /? Read this help message.
    /CLONE:projname Make a copy of an existing project structure.
    /PROJECTWIZARD Start the wizard for creating new projects.
  4. Create a Net Express project for the program to be debugged.
    1. From the File menu, select New, then Project.
    2. In the New Project wizard, select Empty Project.
    3. Enter the name of the project, such as GL00.
    4. Enter the location of the project, typically %LAWDIR%\productline\obj.
    5. Click on Create.
  5. Add files to the project by right-clicking in the left side of the Project window and selecting the Add Files to Project option.
  6. Set debug settings.
    1. From the Animate menu, select the Settings… option.
    2. In the Command line parameters field, enter -D DataArea , where DataArea is the data area or data ID the program is to run against.
    3. Close the Settings window.
  7. Set the path variable for the project.
    1. From the Project menu, select Properties.
    2. Click the Application button.
    3. On the Environment Variables tab, type path in the Variable Name field and, in the Value field, type the actual path for %GENDIR%\bin. Do not type "%GENDIR%, but rather what it is equivalent to on your system. Also, type the actual path to the jvm.dll file.
    4. Click Set and then click OK.
  8. Set the build type.
    1. From the Project menu, select Types of Build.
    2. Highlight Debug and click Change.
    3. Clear the Build subdirectory field, and then click OK and then Close.
  9. If you are debugging a batch program, enter any parameters for it in Job Definition (jobdef).
  10. From the Animate menu, select Start Animating.
  11. Set break points as needed. In the case of online programs, all breakpoints must be after the statement:
    CALL "InitOnline" USING WS-DB-PRODUCT-LINE,
    CRT-PROGRAM-CODE,
    WS-DATE-DISPLAY-FORMAT
    CRT-DEFAULT-PRINTER.
  12. From the Animate menu, select Run.
  13. If you are working with an online program, use a Lawson client to bring up the program form and perform a transaction. (This step is not necessary with batch programs.)

    Net Express will stop execution if the program hits any of the break points.