IBSite

CodeSite 2, from Raize Software , is a powerful debugging tool for Borland Delphi and C++Builder. The problem? Often not all of the logic in your application is contained in Delphi or C++Builder code. Some logic is often contained in Stored Procedures and Triggers. However, by itself, CodeSite will only let you trace the flow of execution to the boundary of your Delphi or C++Builder code. What goes on inside your database is pretty much a mystery to CodeSite.

Well, IBSite tries to fix that. IBSite is a free extension to CodeSite 2 which allows CodeSite messages to be sent from Interbase Stored Procedures and Triggers. It comes as a collection of UDF’s (User Defined Functions), which once installed into Interbase, can be called like any other statement from Interbase SQL.

Requirements

IBSite has been tested with CodeSite 2 Professional and Interbase v6.0 on Windows. I don’t think I’m taking advantage of any of the features not present in CodeSite 2 Standard, so I believe it should also work with the Standard Edition, but let me know if you strike any issues. Additionally, Interbase has had UDF support for a number of versions, so I believe it should also work with any Interbase version on Windows which supports UDF’s. As I, or others, try it out with more versions, we’ll post the results.

Example:

As an example, the following test Stored Procedure:

set term # ;
createprocedure TestCS
AS
begin
  executeprocedure csClear;
  executeprocedure csCategoryColor 'clWhite';
  executeprocedure csEnterMethod 'TestCS';
  executeprocedure csCategory 'IBSite Test';
  executeprocedure csAddCheckPoint;
  executeprocedure csResetCheckpoint;
  executeprocedure csAddCheckPoint;
  executeprocedure csAddSeparator;
  executeprocedure csSendMemoryStatus;
  executeprocedure csSendMsg 'Msg';
  executeprocedure csDisable;
  executeprocedure csSendMsg 'Should not see this';
  executeprocedure csEnable;
  executeprocedure csCategoryColor 'clYellow';
  if (csEnabled() = 1) then
    executeprocedure csSendMsg 'CodeSite Already Enabled';
  else
  begin
    executeprocedure csEnable;
    executeprocedure csSendMsg 'Just Enabled CodeSite';
  end
  executeprocedure csSendMsg 'Should see this';
  executeprocedure csSendString 'String', 'Value';
  executeprocedure csSendInteger 'Integer', 1;
  executeprocedure csSendFloat 'Float', 1.1;
  executeprocedure csSendNote 'This is a test note';
  executeprocedure csWriteInteger 'First', 'Integer', 1;
  executeprocedure csWriteFloat 'Second', 'Float', 1.1;
  executeprocedure csWriteString 'Third', 'String', 'Value';
  executeprocedure csWriteMsg 'Fourth', 'Msg';
  executeprocedure csExitMethod 'TestCS';
end #
set term ; #

produces the following output in the CodeSite 2 viewer:

Click image for larger screenshot

Currently, IBSite supports the following CodeSite 2 calls, inside your Interbase SQL code. This seems to cover most basic requirements.

CodeSite
IBSite Equivalent
CodeSite.Category csCategory
CodeSite.CategoryColor csCategoryColor
CodeSite.AddSeparator csAddSeparator
CodeSite.AddCheckpoint csAddCheckpoint
CodeSite.ResetCheckpoint csResetCheckpoint
CodeSite.SendMemoryStatus csSendMemoryStatus
CodeSite.Clear csClear
CodeSite.Enabled := True csEnable
CodeSite.Enabled := False csDisable
CodeSite.Enabled csEnabled
CodeSite.DestinationDetails csDestinationDetails
CodeSite.EnterMethod csEnterMethod
CodeSite.ExitMethod csExitMethod
CodeSite.SendMsg csSendMsg
CodeSite.SendString csSendString
CodeSite.SendInteger csSendInteger
CodeSite.SendFloat csSendFloat
CodeSite.SendNote csSendNote
CodeSite.WriteInteger csWriteInteger
CodeSite.WriteFloat csWriteFloat
CodeSite.WriteString csWriteString
CodeSite.WriteMsg csWriteMsg

History

v1.0 – 18 August 2001

  • Initial Public Release
Download
CodeSite is a trademark of Raize Software .
Interbase is a trademark of CodeGear