[Gambas-user] Using DEBUG to print to console in "compiled" applications
Tobias Boege
tobiasboege01 at ...1601...
Mon Aug 6 17:54:33 CEST 2012
On Mon, 06 Aug 2012, RICHARD WALKER wrote:
> I have an application which interacts with two or three other
> non-gambas applications and daemons and I am not absolutely certain
> these interactions are completely robust.
>
> I had littered the code with PRINT statements to get console output at
> various critical points of the application. Soon it got too much and I
> thought I would replace the PRINT with DEBUG (getting location
> information in the output) and giving me a way to turn these messages
> on or off, leaving the reduced number of PRINT statements to appear in
> a "cleaner" console output.
>
> So far so good. The DEBUG statements have proved invaluable in helping
> me to get the code into a working state, but they do not appear at all
> when I run the compiled application in a console. I never did find the
> way, which I thought must exist, to turn these messages on and off.
>
> The manual suggests it is possible to see DEBUG output in the compiled
> app's console but is completely silent on how this might be achieved.
>
> Any suggestions?
>
> Richard
>
Quoting the doc: "Prints expressions to the standard error output, only if
your program is compiled with debugging informations."
Have you tried:
$ gbc3 -ga
$ gbx3
in your project source directory?
I think, the IDE compiles your project with debugging symbols per default,
because it can debug it. Per default, when creating an executable, these
are stripped, I assume.
If the above works, can you find the little checkbox in the "Create
executable" dialog which says to include debugging information? If I
remember correctly, it is there...
Regards,
Tobi
More information about the User
mailing list