View Full Version: Debugging Programs On Windows

LawsonTalk > Coding, Program Errors and Bugs > Debugging Programs On Windows


Title: Debugging Programs On Windows


ssun - June 7, 2007 04:01 PM (GMT)
LSF9

Does batchdebug work from the LID client? I don't see the debugging session that let's you step through the code. Nothing happens when I type the batchdebug command, not even an error message.

I can remote connect to the server desktop and animate the program using NetExpress5. Is that the only way you can debug a program in Windows? Seems like alot of work.

trezaei - June 7, 2007 06:36 PM (GMT)
Yep, windows is like that. Can't get it to work unless you're on the server and even then it's a lot of work.

Milo - June 12, 2007 06:39 PM (GMT)
There are two Lawson 4GL debugging techniques that are useful in Windows. They also work pretty well in UNIX. They don't require using the debugger, so I've used them when necessary.

-- Compile using the -T option. This enables Trace. You'll only see labels, but it's very useful to see where the problem occurs. If you're running an Update program, not a batch program, you must run your program in LID and enable the "univwin" mode. This allows the form to pop up in its own window, while your original logon window shows the trace output.

-- Place DISPLAY statements into the program. This works best on batch programs. The DISPLAY statement output usually goes right into the log. You can even see what's happening while your program is still running. This is just about the only way you can see the values of working storage variables while a program is running.

shane pennington - June 13, 2007 03:03 PM (GMT)
Would help to change the INSERTBUFFERSIZE to a 1?

I don't know. I'm an admin, not a 4GL guy. That's why I thought I'd ask.

Keith_G_Thompson - June 22, 2007 08:45 PM (GMT)
Sorry Steven, the guys are right. Windows Lawson only allows a debug via remote control on the application server itself. The -T compile option and the DISPLAY thing can definitely be useful tools, but if you need to see play-by-play action, server-based animation is the only way to go.

This isn't TOO bad when debugging a batch program, but on-line debugging is quite a pain. There's a bit of setup to do and you'll need to ask GSC for the documentation. I haven't found it on-line, but they were able to email it to me. Important notes include that fact that you have to have the server "ladebug" setting turned on AND you have to run both the animator and the on-line program on the server itself via LID. (animating on the server and running the on-line program from your desktop will not work).

Sorry to hear you're moving to Windows!! But, welcome to the club. (yes, I'm a Unix bigot in a Windows shop) :)




Hosted for free by InvisionFree