drfjm
New Member
Posts: 13
|
debug
Apr 28, 2012 10:57:56 GMT 1
Post by drfjm on Apr 28, 2012 10:57:56 GMT 1
Long ago i knew how to debug, but I forgot. I want every instruction to be displayed and after pressing a key the next instruction is displayed in the debug window. I remember it was something With TRON ON and TRON OFF. Please explain, your help will be appreciated.
|
|
|
debug
Apr 28, 2012 20:41:45 GMT 1
Post by dragonjim on Apr 28, 2012 20:41:45 GMT 1
If you look in the helpfile under 'Trace$', you'll find details of how to get the command that is to be executed next.
If you look at the example at the bottom (well, it's at the bottom in the English version - not sure about the German version, if you're using that), you'll see how to print this command into the Debug window.
Hope this helps.
|
|
drfjm
New Member
Posts: 13
|
debug
Apr 28, 2012 23:01:59 GMT 1
Post by drfjm on Apr 28, 2012 23:01:59 GMT 1
My helpfile does not have that item
|
|
drfjm
New Member
Posts: 13
|
debug
Apr 29, 2012 2:56:03 GMT 1
Post by drfjm on Apr 29, 2012 2:56:03 GMT 1
I downloaded GB32 and found the English and German version. Although the German version is more extensive, both versions don't contain an example at the bottom. Perhaps it could be reproduced here.
|
|
|
debug
Apr 29, 2012 18:21:37 GMT 1
Post by dragonjim on Apr 29, 2012 18:21:37 GMT 1
The entry I was referring to is listed below:
Description
Trace$ is a string variable which, inside the Tron procedurename, contains the command which will be executed next. Tron procedurename, specifies a subroutine which will be invoked before execution of every command. The combination of Tron procedurename and Trace$ is a very efficient way of looking for errors.
Example
Auto mk%, mx%, my% OpenW # 1 GraphMode R2_XORPEN QBColor 11 Line 0, _Y - 20, _X, _Y - 20 Tron debug Do Exit If Len(InKey$) Mouse mx%, my%, mk% If mk% %& 1 If my% < _Y - 55 Box mx%, my%, mx% + 30, my% + 30 EndIf EndIf Loop CloseW # 1 End Procedure debug If MouseK = 2 Then Debug.Print Trace$ Return
Draws rectangles on the screen when the left mouse button is held down. When the right mouse button is hel down Trace$ shows the commands in debug output window.
|
|
drfjm
New Member
Posts: 13
|
debug
Jul 17, 2012 8:09:07 GMT 1
Post by drfjm on Jul 17, 2012 8:09:07 GMT 1
I downloaded windows8 to see whether GB32 still functions, that is OK, but the help file is still not accessible, win8 is not that far developed that it offers a solution to that problem. Dragonjim, thanks for your help.
|
|
drfjm
New Member
Posts: 13
|
debug
Jul 17, 2012 8:23:46 GMT 1
Post by drfjm on Jul 17, 2012 8:23:46 GMT 1
I tried the small program dragonjim provided earlier, it draws rectangles indeed, but when pressing the right mouse nothing happens!
|
|
drfjm
New Member
Posts: 13
|
debug
Jul 17, 2012 8:28:12 GMT 1
Post by drfjm on Jul 17, 2012 8:28:12 GMT 1
sorry, wrong again, the program functions as described,
|
|