Skip to content
This repository has been archived by the owner on Dec 5, 2024. It is now read-only.

Debugging RedDeer

jpeterka edited this page Oct 15, 2013 · 28 revisions

From time to time you can observed unexpected behavior that is not caused by your code but by a bug in RedDeer itself. This chapter covers some basic approaches of howto find a problem and gather enough information for issue reporting or fixing a problem

Find error in common log

There is a standard RedDeer log produced on in your primary output (either terminal or Eclipse console view).

INFO [thread][class] Log message-1
INFO [thread][class] Log message-n
...
ERROR [thread][class] Something bad and unexpected happened
DEBUG [thread][class] Some additional debug information

INFO [thread][class] Log message-n+1

Enable and see debug log

When you want more detail information about what is happening you should enable DEBUG messages. You can do it by setting appropriate vm variable logDebug to true either in eclipse

-DlogDebug=true

Then after test restart you'll also see messages marked by DEBUG

DEBUG [thread][class] Debug message
...

Eclipse debugging

Of course you can also use Eclipse debugger and set your breakpoints to track cause of the problem right in the source code. But this is not specific so you can follow some good tutorial on the web for example this one

Maven debugging

Debugging via maven is simple, you just need to run maven with -DdebugPort=<debug_port> like this, for example

mvn clean install -DdebugPort=8000

Then set your breakpoints and attach to the running process from IDE

Saving screencast of failed tests

(since version 0.5)

To enable automatic saving of screencasts of failed tests vm variable recordScreenCast has to be set to true either in Eclipse Run configurations or from command line for maven

-DrecordScreenCast=true

Screencasts are stored in screencast subdirectory of particular test plugin

Clone this wiki locally