New Posts New Posts RSS Feed: How To Use the IdeaBlade DebugLog and TraceViewer
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

How To Use the IdeaBlade DebugLog and TraceViewer

 Post Reply Post Reply
Author
HFloyd View Drop Down
Groupie
Groupie


Joined: 27-Jul-2007
Location: United States
Posts: 44
Post Options Post Options   Quote HFloyd Quote  Post ReplyReply Direct Link To This Post Topic: How To Use the IdeaBlade DebugLog and TraceViewer
    Posted: 03-Nov-2008 at 3:15pm
I just wanted to add this bit of info for newbies who might benefit from it.

If you'd like to be able to watch your application make calls to the database, etc. in real time and see where performance bottlenecks are occurring, set up your app to use the built-in IdeaBlade TraceViewer.


Add the TraceViewer to Your Program
 
It's incredibly easy to do.
  1. In your start-up project, add a reference to IdeaBlade.UI.WinForms.PlatformControls.
  2. Open your start-up class (typically Program.cs or Program.vb).
  3. Find the static Main method (Shared Main in VB).
  4. Make some room just below any calls to the Application class (e.g., Application.EnableVisualStyles()).
  5. Add the following code to show the TraceViewer.

// C#:
IdeaBlade.UI.WinForms.PlatformControls.TraceViewerForm traceForm
;
traceForm =
new IdeaBlade.UI.WinForms.PlatformControls.TraceViewerForm();
traceForm.Show();

' VB.NET:
Dim traceForm As _
  
New IdeaBlade.UI.WinForms.PlatformControls.TraceViewerForm()
traceForm.Show()

That is all there is to it. Next time you launch your application, the TraceViewer will appear, followed shortly thereafter by your application's main window. You can toggle between the two windows at will.

More info about the TraceViewer is here: http://www.ideablade.com/techtip_what_is_myDevForce_application_doing.htm

To add your own messages to the TraceViewer's DebugLog.xml file,

1. Add "using IdeaBlade.Util;" to the file.

2. Write your debug statements like this:
    DebugFns.WriteLine("My debug Message");


-Heather
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down