StrataFrame Forum

Data Debug Mode

http://forum.strataframe.net/Topic14979.aspx

By Ertan Deniz - 3/17/2008

In Strataframe documentation, I couldn't find any related information about this topic ?

Could you give us some information ?

By StrataFrame Team - 3/18/2008

I'm not sure where in the documentation it is, but there are several posts on how to set the debug mode on a data source. 

http://forum.strataframe.net/FindPost5090.aspx

That one might help.  Like it says, simply call SetDebugOn() on the data source, then check the output HTML file for all of the commands that were executed through it.

By Peter Jones - 3/18/2008

Hi Ertan,

This falls into the 'dirty but effective' category. We have the following code in the InitApplication sub in all our AppMain's.

        If System.IO.File.Exists("C:\WINDOWS\Temp\TMSSQLLog.html") Then
            MicroFour.StrataFrame.Data.DataBasics.DataSources("").SetDebugOn("C:\WINDOWS\Temp\TMSSQLLog" & System.Diagnostics.Process.GetCurrentProcess.Id.ToString & ".html", True)


With this we get a unique logging file for each Project and we can turn logging on/off as needed by manually creating/deleting the C:\WINDOWS\Temp\TMSSQLLog.html file.

Cheers, Peter

By Trent L. Taylor - 3/19/2008

Peter,  that is a good idea.  We actually have a registry key that we look for in our application that allows us to turn on debugging on the run-time application.  We also have a registry key that allows the path and file name to be specified.  Since it is generally a developer that prompts this log to be created, this has been pretty effective for us.
By Edhy Rijo - 5/21/2008

Trent L. Taylor (03/19/2008)
Peter,  that is a good idea.  We actually have a registry key that we look for in our application that allows us to turn on debugging on the run-time application.  We also have a registry key that allows the path and file name to be specified.  Since it is generally a developer that prompts this log to be created, this has been pretty effective for us.

Hi Trent,

Is there any plan to include this functionality in SF?

Also does the call to SetDegubOn() should be done per each form, or is this a global setting that can be done once and will affect all forms?

By Trent L. Taylor - 5/21/2008

Is there any plan to include this functionality in SF?

Technically it is already there.  You just need to have the ability (if you would like) to turn it on within your application at run-time. For example, in the SetDataSources methods of the AppMain.vb or program.cs, you would just look to see if that key is set, and if so, turn on the debugging.

Also does the call to SetDegubOn() should be done per each form, or is this a global setting that can be done once and will affect all forms?

No.  This is per data source, the individual BOs, forms, etc. have nothing to do with it.  If you turn on debugging it is for a particular data source.