I want to use the JCLDebugHandler to send detailed error messages to CodeSite via CSX. How can I do this?
This is very simple to set up. Thanks to Robert Meek's design of this component, there are virtually no steps. Unlike other exception handlers, the JCLDebugHandler does NOT require any changes to the CSX.INC file. In fact, CodeSiteEx itself is NOT required; the JCLDebugHandler is sophisticated enough to send its messages directly to CodeSite without needing CSX to be the "middle-man".
- First, make sure you have BOTH JEDI libraries (JCL and the JVCL) installed. This is because the JCLDebugHandler is in the JVCL but the debug code it works with is located in the JCL.
- Drop a TJvDebugHandler component on your application's main form.
- In the JCLDebugHandler's OnOtherDestination event add the line: CodeSite.Send('Error:', JvDebugHandler1.ExceptionStringList). Note for CodeSite 2, this line should read: CodeSite.SendStringList('Error:', JvDebugHandler1.ExceptionStringList)
- If CodeSite represents a true CodeSite object, CSX is not required. If CodeSite represents a TCodeSiteEx object, CSX is being used as a middle-man to route the messages to CodeSite.