Skip to content

Troubleshooting

Igal edited this page Apr 12, 2017 · 3 revisions

Logging

The first thing you should do is enable logging by creating a log named websocket in the Lucee Web Admin. For development, you should set the Log Level to DEBUG or TRACE.

Dumping

Since the event handlers are called asynchronously, you can not dump information to the regular response stream. If you want to dump objects from the event handlers you should do so to a file.

Another thing to keep in mind is that many events may fire simultaneously, so it's a good idea to make the filename unique by using getTickCount("nano"). For example:

onOpen(websocket, endpointConfig, sessionScope, applicationScope){ 

    dump(
         var   : arguments
        ,format: "html"
        ,output: getTempDirectory() & "/onOpen-#getTickCount('nano')#.html"
    );
}
Clone this wiki locally