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.
- configure/compile libcitadel/webcit with execinfo:
- 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
- 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!