[comp.os.os2.programmer] Debugging under Presentation Manager

drz@csri.toronto.edu (Jerry Zarycky) (09/01/90)

I've been programming under Presentation Manager for the last 6 months
or so, and I have a question about source-level debugging a Presentation
Manager application under either CodeView or LogiTech's Multiscope.

Debugging seems to work fine until I try to debug a Window Procedure.

Whenever I hit the first breakpoint which happens to be within a window
procedure, I can display all the things that I wish within the debugger.
However, if I try to resume the program after examination of the variables,
I find that the program "locks up", (i.e.) it doesn't respond to messages
any more, even though I can still move the mouse pointer around.
After a while, Presentation Manager will tell me that this program
isn't responding any more, and asks me if I want to terminate it.
Even though I say "OK", the system is still hung and I have to reboot.

Does this sound familiar to anyone else?
Is there anything that I can do to get around this problem AND still use
the debuggers that I have paid for?
Any answers would be appreciated, since I'm getting tired of "printf"
statements!

Oh, and I want to emphasize that debugging non-Presentation Manager
applications works fine, but then again, I don't need a fancy debugger
(usually) to debug those.


Jerry Zarycky

Usenet:	{uunet,watmath}!csri.toronto.edu!drz
CSNET:	drz@csri.toronto.edu         EAN:   drz@csri.toronto.cdn
BITNET:	drz@csri.utoronto

rommel@lan.informatik.tu-muenchen.dbp.de (Kai-Uwe Rommel) (09/02/90)

I assume you used CodeView in a PM window to debug another PM program.
This is currently impossible. When CodeView gets control, the PM
switches the focus from one PM window to another and therefore send
messages to the debugged program to change it's appearance. But this
program cannot respond because it is halted by the debugger. (I hope
this is right ?).
You can debug PM programs with Codeview only when you start CVP in a
fullscreen session. Also, be careful not to switch to the PM desk when
CVP halts the debugged program, use only F4.
If you want to debug PM apps rather often, I would recommend a secondary
monochrome debug monitor (on an AT-Bus machine, on a PS/2 you probably
need the 8514/A together with your old VGA).
This is the only way to debug PM programs in a useful and comfortable
way. I have a secondary Hercules card and TTL display (together with a
VGA) and I don't want to miss it again.

Kai Uwe Rommel

--
/* Kai Uwe Rommel
 * Munich
 * rommel@lan.informatik.tu-muenchen.dbp.de
 */

gerry@dialogic.UUCP (Gerry Lachac) (09/03/90)

Not that I do any PM programming, but the README file that came with
my Logitech Multiscope debugger mentioned that you needed to use the
remote machine debugging facilities to properly debug a PM application.
This was supposedly due to some bug in PM (imagine that :-)


This is all from memory since I installed the debugger several months
ago, so take it all with a grain of salt...

-- 
uunet!dialogic!gerry   | "Even a dead plant turns  |	Dialogic Corporation
	OR	       |  over a new leaf 	   |	300 Littleton Rd
gerry@dialogic.UUCP    |  when the wind blows."	   |	Parsippany, NJ 07054 
		       |  			   |	(201)334-8450