Digging in the Solr code: 5 minutes howto

How to quickly debug a custom Apache Solr component (e.g. request handler, query parser, filter) in your favourite IDE.
The example uses IntelliJ but it is valid for any IDE.