Table of Contents
Citadel and Wildfire
To show debugging information without jamming the layout Wildfire was born. libcitadel caries a portable implementation of it, ready to be used in “your program too” [tm]. WebCit uses this implementation to send error messages via the Wildfire protocol to your Browser along with the Payload.
Use it with WebCit
prerequisites
- Install the 1231347286 FireBug Mozilla plugin
- configure/compile libcitadel/webcit with execinfo:
./configure --with-backtrace
working witht it
- click the tiny bug symbol in your lower right browserbar to activate FireBUG.
- Enable the “Console” and the “Network” Tab in FireBUG for your WebCit host
- Enable FirePHP for your webcit host in the menu with the blue bug
- manipulate a template by adding a blank to a token so its “broken”
- hit that template with Firefox.
- note the red icon in the FireBUG Console? Click on it to view the full error message
Using the libcitadel Wildfire implementation in your application
- add -rdynamic to your CFLAGS and LDFLAGS else backtraces won't work
- get the SVN Head libcitadel
- link your application to it
- call WildFireInitBacktrace() in your programm, so it can start addr2line for line number decoding
- add code like this to add Wildfire Messages:
Buf = NewStrBufPlain(HKEY("test error message")); SerializeJson(Header,WildFireException(Buf, HKEY(__FILE__), __LINE__, 1), 1); WildFireSerializePayload(Header, <HeaderBuffer>&n, <HeaderAddFunc>);
- n needs to be an integer counting up through one http request
- if you want it to use <HeaderAddFunc> to add new http headers to your webserver, add it here, else it will append HTTP-Headers to <HeaderBuffer>. Null the one you don't want.
- check your hello world message!