ABOUT
For anyone who has never heard of it before, CodeSite is an excellent application logging and debugging system from Raize Software. CodeSiteEx is a third-party add-on to CodeSite, developed by Developer Express' Dustin Campbell. CSX improves upon CodeSite's ability to debug Win32 code by adding an interface-based call tracing system.
This plug-in is designed to hook into CodeSiteEx to allow working with it directly from CodeRush.
FEATURES
Upon installation, this plug-in will register one new string function, csxTraceMethod, and three new commands csxInstrumentMethodsDialog, csxEmbedTimer, and csxTimeMethod into CodeRush. These additions are detailed below:
csxTraceMethod
This new function inserts a call to the CodeSiteEx TraceMethod function. It accepts up to three optional parameters which must be separated by commas.
csxEmbedTimer
Embeds a call to the CodeSiteEx Timer function. It accepts up to two optional parameters which must be separated by commas.
csxTimeMethod
Inserts a call to the CodeSiteEx Timer function at the beginning of the current method. It accepts one optional parameter.
csxInstrumentMethodsDialog
Displays a dialog that will allow you to add or remove TraceMethod calls to any or all of the method implementations in the current unit. It also detects if a method already has a call to TraceMethod.
NOTE: This command will only allow you to add calls if the unit meets one of the following conditions:
- Your unit contains a global variable of type TCodeSiteEx or TCSObjectEx.
- Your unit uses a unit that contains a global variable (in the interface section) of type TCodeSiteEx or TCSObjectEx. In addition, that unit must also be open in Delphi's editor.
If your code does not meet at least one of these requirements, the Instrument Methods dialog will appear with all methods greyed out, as follows:
Also, be aware of the following limitations of this command:
- Scope rules are not followed entirely. That is, it will happily allow you to use a global variable that is declared in your unit's implementation section *after* the methods that are being instrumented.
- It will not allow you to use TCodeSiteEx objects that are private fields of a class or local variables of a method even though they may in scope.
- You cannot instrument methods that do not contains a begin/end block (i.e., methods that only have asm/end blocks).