Debugger (I think)

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Templar
Posts: 51
Joined: Sun Apr 01, 2018 5:37 pm
DBs Used: DBF

Re: Debugger (I think)

Post by Templar »

???? :? No entiendo, esas pantallas son en modo consola, cómo
estás utilizando HMG ?

HMG = Libreria Gráfica para Windows
----------------------------------------------------------------------------
???? :? I do not understand, those screens are in console mode, how
are you using HMG?

HMG = Graphic Library for Windows

Podrías anexar imagenes de cómo estás compilando...
----------------------------------------------------------------------
You could attach images of how you are compiling ...
[/quote]

I don't understand how it works either! HMG claimed it could convert Clipper to Windows in 5 minutes and (more or less) it has; it just needs a few tweeks for some Clipper commands which HMG doesn't recognise and some which it interprets differently.
The point is, the application works fine. The only issue is when the debugger has been invoked. When the debugger is not invoked, I get normal screens and when it crashes an error message like the first screen below. When it has, I get crazy screens and an error box like the second screen below. So it is certainly dependant on whether the debugger has been invoked orr not and that I cannot seem to control!
Templar
Attachments
without debugger
without debugger
ascreen.jpg (49.01 KiB) Viewed 3652 times
with debugger
with debugger
bscreen.jpg (104.22 KiB) Viewed 3652 times
User avatar
serge_girard
Posts: 3158
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: Debugger (I think)

Post by serge_girard »

Hi Templar,

I cannot help here. I don't use this debugging-tool. May I suggest the following 'trick' to do about the same:
At start of your program:

Code: Select all

SET PRINTER TO C:\somefolder\debug.txt
SET PRINTER ON 
SET CONSOLE OFF
// continue your program
? 'print your debug info'
// etc. continue your program

// at end
SET PRINTER TO 
SET PRINTER OFF
SET CONSOLE ON
Recompile your program and run and see in your C:\somefolder\debug.txt what has happened.

Regards, Serge
There's nothing you can do that can't be done...
User avatar
dragancesu
Posts: 920
Joined: Mon Jun 24, 2013 11:53 am
DBs Used: DBF, MySQL, Oracle
Location: Subotica, Serbia

Re: Debugger (I think)

Post by dragancesu »

It's not a good combination to mix the console and graphic mode, and probably it can

If the program is console and passes a compilation with a clipper, then

build /c myprogram.prg

If you want the debugger then add the switch /d

p.s. I do not use this, maybe it can

If the clipper program is then clipper debugger
User avatar
mol
Posts: 3718
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: Debugger (I think)

Post by mol »

I'm using debugger from years.
But I don't understand problem presented here.
What's going on?
User avatar
Anand
Posts: 595
Joined: Tue May 24, 2016 4:36 pm
DBs Used: DBF

Re: Debugger (I think)

Post by Anand »

Hi Templar,

As per screen shot it looks like you are using Harbour compiler and not HMG.
Harbour will compile and produce clipper like output for 99% of clipper codes. So the error is in 'DispAll()' function in your code.

Maybe uploading the code will help us to check it.

Regards,

Anand
Regards,

Anand

Image
User avatar
andyglezl
Posts: 1461
Joined: Fri Oct 26, 2012 7:58 pm
Location: Guadalajara Jalisco, MX
Contact:

Re: Debugger (I think)

Post by andyglezl »

It's not a good combination to mix the console and graphic mode, and probably it can
El ejemplo lo puse solo para enfatizar que se puede hacer con las 2 formas, falta ver de que forma está trabajando templar.
---------------------------------------------------------------------------------------------------------------------------------------------------------
I put the example just to emphasize that it can be done with the 2 forms, it is still necessary to see what form the templar is working on.



Templar

Si tus archivos .prg utilizan alguna libreria externa que aun no esté convertida a HARBOUR, deberás de buscar la forma
de convertirlas ó remplazarlas tu.

En resumen, tus programas clipper los debes de compilar con HARBOUR y debería de funcionar.

Si deseas convertirlos a modo gráfico, deberas utilizar la libreria de HMG con los respectivos cambios que esto implica.
-----------------------------------------------------------------------------------------------------------------------------------------------------------
Templar

If your .prg files use an external library that is not yet converted to HARBOUR, you should look for the form
to convert or replace them.

In summary, your clipper programs must be compiled with HARBOUR and should work.

If you want to convert them to graphic mode, you must use the HMG library with the respective changes that this implies.
Andrés González López
Desde Guadalajara, Jalisco. México.
Templar
Posts: 51
Joined: Sun Apr 01, 2018 5:37 pm
DBs Used: DBF

Re: Debugger (I think)

Post by Templar »

Thanks for all those suggestions and help. It's certainly nice to feel I am not alone!
I am using the HMG compliler (it seems to be HMG.3.3.4) and the strange thing is that it works fine and the application works fine except for not being able to control whether the debugger is activated or not.
The whole application is what I have writen for Clipper and works fine in that and does not use any external sources.
The odd thing is that it seems to be random whether it complies with the debugger or without and if I could just turn the thing off, I'd be a happy bunny!
Tim
Templar
Posts: 51
Joined: Sun Apr 01, 2018 5:37 pm
DBs Used: DBF

Re: Debugger (I think)

Post by Templar »

Anand wrote: Thu Apr 19, 2018 12:42 pm Hi Templar,

As per screen shot it looks like you are using Harbour compiler and not HMG.
Harbour will compile and produce clipper like output for 99% of clipper codes. So the error is in 'DispAll()' function in your code.

Maybe uploading the code will help us to check it.

Regards,

Anand
I could do that, but there are about 60 different component programs running to probably 50,000 lines of code!
Templar
edk
Posts: 909
Joined: Thu Oct 16, 2014 11:35 am
Location: Poland

Re: Debugger (I think)

Post by edk »

Templar wrote: Thu Apr 19, 2018 3:16 pm
I could do that, but there are about 60 different component programs running to probably 50,000 lines of code!
Templar
In that case, would you be able to prepare a working short fragment of the program that reproduces the indicated problem?
Are you sure that the problem is caused by the debugger? When unexpected characters appear on the screen, are you able to call the debugger?
Templar wrote: Thu Apr 19, 2018 3:14 pm I am using the HMG compliler (it seems to be HMG.3.3.4) and the strange thing is that it works fine and the application works fine except for not being able to control whether the debugger is activated or not.
What does it mean that you are not able to control whether the debugger is activated or not :?:
During compilation, you decide if the debugger is to be attached to the program. There is no possibility that the debugger will be attached in a random way.

It seems to me rather a problem with runtime changed CP than with a debugger.
edk
Posts: 909
Joined: Thu Oct 16, 2014 11:35 am
Location: Poland

Re: Debugger (I think)

Post by edk »

dragancesu wrote: Thu Apr 19, 2018 11:22 am It's not a good combination to mix the console and graphic mode, and probably it can
I have several APIs done with mixed mode and so far I have not noticed any problems. :mrgreen:
Post Reply