Game Development Community

Interpreter-Style Debugging

by Ronnie · in Technical Issues · 11/05/2007 (9:27 am) · 3 replies

Hello everyone,

Does anyone have Visual Basic 6.0 experience?

Since I haven't worked with Vicual C++ IDE all too
often (but I have, with the VB6 IDE, quite a bit),
I was wondering about debugging and/or viewing
a step-by-step behavior of TGE or TGEA at run-time.

My intention is to be able to examine code addition(s)
to the engine, but as far as I know, VC++ is a
compiled language, which means, that as soon as
I make a change in the code -- in the middle of runtime,
I would have to re-compile and then re-run everything
all over again, correct?

So let's assume the following,
to help illustrating this situation:

------------------------------
0. Prerequisites
------------------------------
Let's say we have 2 types of applications:
(a) First one is a VB6 application, with a single form and a TextBox on it.
(b) Second one is a TGE / TGEA game world, with a single building object in it.

Now, basically my questions are:

------------------------------
1. Edit & Continue
------------------------------
I recall from working with VB6, that I was able to
place a breakpoint at some code line, then have the
application run up until that breakpoint and pause there,
and then I could, say, assign some value to the
on-form TextBox.

Then, when the VB6 application would continue on running,
I would be able to see that new value appear in the
TextBox immediately upon resuming.

The question is, therefore - if I were to modify,
for example, the value of, say, a color property
of the TGE/TGEA game's building object - would
I be able to see that change immediately ?


--------------------------------------------------
2. On-Screen GUI-Element Consistency
--------------------------------------------------
Also while working with VB6, when I merely wanted
to track program flow by looking at specific code
sections, with breakpoints placed at various locatations,
then during run-time, when the VB6 application
would pause due to a breakpoint, I was able to resize
the VB6 IDE's window so that I could see BOTH the form
(of the VB6 application, as part of its run-time mode),
ALONG WITH the VB6 IDE with all of the code.

Now, as it seems to me, DirectX or OpenGL may have
a special "Graphic Mode" in which a game is displayed,
but - would I be able to pause TGE / TGEA application
due to a breakpoint in the C++ code, and just keep going
slowly, step-by-step, and switch back and forth
between display modes in order to just see the gameplay?

#1
11/05/2007 (9:28 am)
Oh BTW,

I forget to add:

Thanks in advance for any tip :-)

Ronnie
#2
11/05/2007 (9:31 am)
You have full engine debugging available through breakpoints and such in Visual Studio. If you are using it, you can set up your debugging in a similar fashion to VB.

For TorqueScript debugging, it is a good idea to use Torsion's debugger.

You will have to change application specific graphics contexts for DX/GL apps. VB uses the default windows api for applications, which is a completely different beast than DX/GL.
#3
11/05/2007 (9:42 am)
OK,

Thanks.