PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → Trace To File
Trace To File
Débuté par André Labuschagné, 14 avr. 2018 12:55 - 4 réponses
Posté le 14 avril 2018 - 12:55
Hi All

Sounds crazy but I have never had to use Trace before. Everything just seems to work. But now I am trying to establish why a procedure is no longer functioning - intermittently - under what circumstances I know not yet.

What I am needing to do is write a message to a file after each call that I suspect could fail.

Would one use Trace for this and if so how or is it better to just append to a text file programmatically and if so how.

The error returns if any from HExecuteSQLQuery and HAdd needs to be monitored. It is intermittent so I just need to write to a file that I can look at when the procedure no longer works. It is a procedure with a timer.

Cheers
Andre
Posté le 14 avril 2018 - 13:54
Hi André

yes, you can and should use trace for that (I do it all the time)...
There is a special syntax for it (see help)

And if you are interested in using it in a more advanced way, you can look at the Trace class in WXReplication (can mark creation and destruction of object, automatically add timestamp, etc)

Best regards
Posté le 14 avril 2018 - 16:03
Hi Fabrice

>>There is a special syntax for it (see help)

I have - saw nothing about writing to disk excepting the Linux default. That is why I posted.

Cheers
André
Posté le 14 avril 2018 - 18:15
Hi Andre,

take a look here: https://help.windev.com/en-US/…

Regards
Steven Sitas
www.alpha360.biz
Posté le 14 avril 2018 - 20:58
Hi Steven

Thanks - got that working now. Nice and powerful.

Cheers
André