Board index » cppbuilder » debugging GUI

debugging GUI


2005-08-03 03:42:56 PM
cppbuilder66
Hi,
I'm running a GUI app here under the de{*word*81}. the app contains all the usual graphical components. The problem is that I would like to step into the code and at the same time see the changes made to the GUI as the code executes. The problem is that I cannot switch from the code, back to the GUI and see the state of the GUI. Is is possible to do that, or is it normal that the GUI not be visible while the de{*word*81} is running?
thanks
G
 
 

Re:debugging GUI

grahamo wrote:
Quote
Is is possible to do that, or is it normal that the GUI not be
visible while the de{*word*81} is running?
Normal. The problem is down to the way Windows works. There is no
global video buffer that stores the current state of the desktop or
individual windows. This means that things are only visible until
something overwrites them and won't appear until the owning application
gets around to drawing them.
A program that is stopped at a breakpoint cannot by definition be
running and therefore will not respond to any WM_PAINT messages. Even
if it is running it can't always respond. Programs in the middle of an
intensive processing loop will often fail to redraw themselves.
I've been writing Windows applications for over eight years now and I
hardly ever need to look at the output while I'm stepping through the
code. What are you trying to write?
--
Andrue Cope [TeamB]
[Bicester, Uk]
info.borland.com/newsgroups/guide.html
 

Re:debugging GUI

"grahamo" < XXXX@XXXXX.COM >wrote in message
Quote

Hi,

I'm running a GUI app here under the de{*word*81}. the app contains all
the usual graphical components. The problem is that I would like to
step into the code and at the same time see the changes made to the
GUI as the code executes. The problem is that I cannot switch from
the code, back to the GUI and see the state of the GUI. Is is
possible to do that, or is it normal that the GUI not be visible
while the de{*word*81} is running?
Use a dual monitor graphics card.
HTH,
Bruce
 

{smallsort}

Re:debugging GUI

"grahamo" < XXXX@XXXXX.COM >ha scritto nel messaggio
Quote

Hi,

I'm running a GUI app here under the de{*word*81}. the app contains all the
usual graphical components. The problem is that I would like to step into
the code and at the same time see the changes made to the GUI as the code
executes. The problem is that I cannot switch from the code, back to the
GUI and see the state of the GUI. Is is possible to do that, or is it
normal that the GUI not be visible while the de{*word*81} is running?
Try to split the GUI displaying code from the rest of the application. So,
you can create two application: one that just display the GUI and intercept
user action and the other one that prepare data to be displayed, depending
on user message received from the GUI. The two application can be connected
via DDE or named pipes or OLE or anything you can immagine (even text
files!).
You can run GUI exe and then debug APP exe.
Stefano
 

Re:debugging GUI

thank Stefano, I'll give that a try.
cheers
G
"Stefano Gemma" < XXXX@XXXXX.COM >wrote:
Quote
"grahamo" < XXXX@XXXXX.COM >ha scritto nel messaggio
news:42f07580$ XXXX@XXXXX.COM ...
>
>Hi,
>
>I'm running a GUI app here under the de{*word*81}. the app contains all the
>usual graphical components. The problem is that I would like to step into
>the code and at the same time see the changes made to the GUI as the code
>executes. The problem is that I cannot switch from the code, back to the
>GUI and see the state of the GUI. Is is possible to do that, or is it
>normal that the GUI not be visible while the de{*word*81} is running?

Try to split the GUI displaying code from the rest of the application. So,
you can create two application: one that just display the GUI and intercept
user action and the other one that prepare data to be displayed, depending
on user message received from the GUI. The two application can be connected
via DDE or named pipes or OLE or anything you can immagine (even text
files!).

You can run GUI exe and then debug APP exe.

Stefano


 

Re:debugging GUI

"grahamo" < XXXX@XXXXX.COM >wrote in message
Quote

Hi,

I'm running a GUI app here under the de{*word*81}. the app contains all the
usual graphical components. The problem is that I would like to step into
the code and at the same time see the changes made to the GUI as the code
executes. The problem is that I cannot switch from the code, back to the GUI
and see the state of the GUI. Is is possible to do that, or is it normal
that the GUI not be visible while the de{*word*81} is running?
Several options come to mind immediately (in order of preference):
1) use multiple monitors -- one for the app, one for the IDE
2) use remote debugging -- run the app on a separate machine from the IDE
(slower than multiple monitors, but still usable)
3) minimize the IDE windows as much as possible, and resize/move the
application so that the critical portion of the application is visible at
all times (this is what we all did in the "old" days!)
- Dennis