Help with Debug
Moderator: Rathinagiri
- Rathinagiri
- Posts: 5471
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Help with Debug
Hi,
I never used debugging facility in my whole xBase programming life. Can somebody help me to know about debugging in Harbour? Is there any documentation about the usage of debug facility?
HMG+Debugging any difference with regard to GUI part?
Thanks in advance,
S. Rathinagiri.
I never used debugging facility in my whole xBase programming life. Can somebody help me to know about debugging in Harbour? Is there any documentation about the usage of debug facility?
HMG+Debugging any difference with regard to GUI part?
Thanks in advance,
S. Rathinagiri.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.
Re: Help with Debug
Debugging is beatiful!
You can monitor your variables, loops, you can change/set value of variables. You can view opened dbfs, indexes, arrays.
Place altd() function to your code, where you want to observe how program runs. You can run program line by line or run whole function/procedure. When debugger window opens, all possibilities are placed in upper menu.
I didn't search documentation about debug in the internet, because I use it from always (there was no internet years ago). I can search my installation diskettes for clipper 5.2, I think there was some information in norton guide format.
You can monitor your variables, loops, you can change/set value of variables. You can view opened dbfs, indexes, arrays.
Place altd() function to your code, where you want to observe how program runs. You can run program line by line or run whole function/procedure. When debugger window opens, all possibilities are placed in upper menu.
I didn't search documentation about debug in the internet, because I use it from always (there was no internet years ago). I can search my installation diskettes for clipper 5.2, I think there was some information in norton guide format.
- Rathinagiri
- Posts: 5471
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: Help with Debug
Thanks a lot Mol. I am sure it would be very much useful.
Now, coming to the GUI part, can we do something for that? Or is it already there?
Now, coming to the GUI part, can we do something for that? Or is it already there?
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.
Re: Help with Debug
Hey Rathi, you've asked the Question which I was thinking to post in this forum. Like you I too never used Debugger in Clipper. I just learnt it a year ago when I switched my job. The guys here use the debugger option heavely for dubugging any module.rathinagiri wrote:Hi,
I never used debugging facility in my whole xBase programming life. Can somebody help me to know about debugging in Harbour? Is there any documentation about the usage of debug facility?
HMG+Debugging any difference with regard to GUI part?
Thanks in advance,
S. Rathinagiri.
In Clipper the its done in this way:
To compile:
CLIPPER <APPNAME> /b (/b=debug info)
RTLINK FI <APNAME>
To invoke in application:
Alt-D (debugger's interface will popup)
Its really very good tool. Not tried in HMG..
Regards,
Swapan
Re: Help with Debug
Using debug with HMG is little different from using with clipper. With open windows, we cannot use alt-d, so we must put functon altd() ic code for invoke debugger.
I use debugger for code, not for graphics interface (in my opinion, nothing to debug...)
I use debugger for code, not for graphics interface (in my opinion, nothing to debug...)
- Rathinagiri
- Posts: 5471
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: Help with Debug
After your guidance, I had tried /d option in compile.bat and seen the nice debug window.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.
Re: Help with Debug
Hi,
Pls consider the following example,
#include "minigui.ch"
function Hello
altd()
use test new
dbgotop()
msginfo("Top Reached")
return NIL
When I compile with the /D option, debug window does not open up
I am using xHarbour 1.2.1 with HMG extended. Is that the problem ?
Alternatively, Rathinagiri, can u post some sample code which you have tested in HMG, so that I can test the same code and know if the xHarbour+HMG extended environment is a issue.
Warm regards,
Jayadev
Pls consider the following example,
#include "minigui.ch"
function Hello
altd()
use test new
dbgotop()
msginfo("Top Reached")
return NIL
When I compile with the /D option, debug window does not open up
I am using xHarbour 1.2.1 with HMG extended. Is that the problem ?
Alternatively, Rathinagiri, can u post some sample code which you have tested in HMG, so that I can test the same code and know if the xHarbour+HMG extended environment is a issue.
Warm regards,
Jayadev
Re: Help with Debug
Hi to all,
Tried to use the debugger by building with hmg.3.0.45 with the /d option.
Build works fine and the debugger starts in the console window after the build.
When pressing F5 "Go" the application (GUI) window opens and I can use the application.
As soon as ALTD() is encountered in the coding, there is a hangup.
In the console window the debugger displays the proper (ALTD()) line in the coding, but I cannot call commands (the enter key doesn't react), the GUI application window is there but gone (processing indicator when going there with the mouse) ... no reaction.
I have to close both windows ...
The "/d" debugger would be very useful - is there some way to make it work properly / without a hangup?
Thanks ...
Tried to use the debugger by building with hmg.3.0.45 with the /d option.
Build works fine and the debugger starts in the console window after the build.
When pressing F5 "Go" the application (GUI) window opens and I can use the application.
As soon as ALTD() is encountered in the coding, there is a hangup.
In the console window the debugger displays the proper (ALTD()) line in the coding, but I cannot call commands (the enter key doesn't react), the GUI application window is there but gone (processing indicator when going there with the mouse) ... no reaction.
I have to close both windows ...
The "/d" debugger would be very useful - is there some way to make it work properly / without a hangup?
Thanks ...
Re: Help with Debug
I'm building app via IDE and I heven't any problems with debugger.
Try this way
Try this way
- danielmaximiliano
- Posts: 2612
- Joined: Fri Apr 09, 2010 4:53 pm
- Location: Argentina
- Contact:
Re: Help with Debug
joerg wrote:Hi to all,
Tried to use the debugger by building with hmg.3.0.45 with the /d option.
Build works fine and the debugger starts in the console window after the build.
When pressing F5 "Go" the application (GUI) window opens and I can use the application.
As soon as ALTD() is encountered in the coding, there is a hangup.
In the console window the debugger displays the proper (ALTD()) line in the coding, but I cannot call commands (the enter key doesn't react), the GUI application window is there but gone (processing indicator when going there with the mouse) ... no reaction.
I have to close both windows ...
The "/d" debugger would be very useful - is there some way to make it work properly / without a hangup?
Thanks ...
Harbour say wrote: * $Id: altdtest.prg 17835 2012-07-18 13:41:31Z vszakats $
*/
// Testing AltD()
// Notice you have to compile it using /b
// 2012-07-18
PROCEDURE Main()
AltD( 1 ) // Enables the debugger. Press F5 to go
Alert( "debugger enabled" )
AltD() // Invokes the debugger
Alert( "debugger invoked" )
RETURN
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*
Saludos / Regards
DaNiElMaXiMiLiAnO
Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*
Saludos / Regards
DaNiElMaXiMiLiAnO
Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO