-
Notifications
You must be signed in to change notification settings - Fork 44
Debugging RedDeer
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
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
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
...
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
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
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