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

Debugging RedDeer

Marián Labuda edited this page Nov 3, 2016 · 28 revisions

From time to time you can observe 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

You have several ways that could help you to diagnose the issue:

  • examining log debug and error messages
  • debugging code with Eclipse (with or without maven)
  • enable pausing of failed tests and examine running test @since 0.4
  • check screenshot @since 0.5

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

Pause failing test

Sometimes you know there are failing test but you would like to check IDE state when such test fails. There is an option for it. Just add pauseFailedTest=true into your VMarguments in Eclispe or mvn command line so for example you can run you test like this

mvn clean verify -DpauseFailedTest=true

Once test fails, it hooks to RedDeer watch dog and test exeuction is paused until resumed by pressing [Enter] key.

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 verify -DdebugPort=8000

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

Clone this wiki locally