Debug Trace

Started by Mark Strickland, December 29, 2009, 04:00:51 PM

Previous topic - Next topic

Mark Strickland

From time to time I have had a program become non-responsive and not been able to determine where in the code things had gone bad.  This generally happens in big complex programs that make debugging even harder.

It would be nice if FF3 could optionally generate some Trace code so you could follow the program flow.  I have not had much luck with PB Trace with FF2.  If I could be enlightened about PB Trace maybe this would not be needed.

My thought would be to specify a log file name and when the program runs it would write "stuff" (date/time plus current function) to the trace log.  Here is a partial list of "events" that might generate a trace log for each control that had any custom code:

SetFocus
KillFocus
Timer
ButtonClick

The trace function should also allow some sort of meta statement that could write stuff to the same log file.  If trace was turned off for the compile the meta statement would not generate any code.  Otherwise it would write to the log file.  This meta statement should be able to include the contents of a variable.

Put it on the Wish List.   ;D
Mark Strickland, CISSP, CEH
www.SimplyBASICsoftware.com

Paul Squires

Hi Mark,

Have you tried Patrice's zTrace debugging utility? http://www.jose.it-berater.org/smfforum/index.php?board=151.0

It is built into FF3. You enable it via the project's properties.
Paul Squires
PlanetSquires Software

Mark Strickland

I had not tried Patrice's zTrace until now.  I created something similar (from an old PB post) several years ago to that simply opens a console window and displays what you put in the "debug" statement.  Patrice's tool as a few more features and includes tracing to a file.  I have used my version for years and it made the nearly impossible possible.

zTrace does what I need but it is not practical to add enough zTrace calls to easily track down a problem.

I was hoping for a FF3 setting to add the zTrace calls for me at various points that could be turned on with a project option.  This way I could profile the execution of the program and see where it stopped.

Previously I had tried some PB #DEBUG options in FF2 but without much luck.  I just tried them in FF3 (already in place as a comment in the FF_AppStart module) and this may solve the problem.

If the PB #DEBUG feature does not help I will come back and lobby for this again.

Thanks.
Mark Strickland, CISSP, CEH
www.SimplyBASICsoftware.com

Paul Squires

Quote from: Mark Strickland on December 30, 2009, 11:16:02 AM
... but it is not practical to add enough zTrace calls to easily track down a problem.

I was hoping for a FF3 setting to add the zTrace calls for me at various points that could be turned on with a project option.  This way I could profile the execution of the program and see where it stopped.

Hi Mark,

I am not sure that I understand what it is that you are asking for? You would like FF3 to automatically insert zTrace calls into the code during code generation? How would FF3 even know where to put them?
Paul Squires
PlanetSquires Software