Assuming it’s similar to wheezy on a Raspberry Pi, you can stop the service (“sudo service openhab stop”) and then run the start_debug.sh script from a command line.
Based on your question I’m assuming you are running it as a service.
So on the RasPi you can stop openHAB with the command:
sudo service openhab stop
Then you can run openhab using the start_debug.sh and the debug logs will be printed to the screen as @steve1 recommends.
Another approach is to stop openHAB and swap the logback.xml and logback_debug.xml files in your config folder (if you installed using apt-get that is in /etc/openhab. Then you can restart openHAB using
Asuming openHab is already running you can use the tail command mentioned above to continuously print the log to command line. If the log is not detailed enough, you have to edit the logback.xml to set your level of logging.
/opt/openhab/configurations/logback.xml and /opt/openhab/configurations/logback_debug.xml
Logback_debug = logging like start_debug.sh
So if you copy logback_debug to logback and using tail command you should get the same result as start_debug.sh
After a bit of trial and error from the suggestions above i found that the correct(?) way to do it is in the file /etc/default/openhab to change DEBUG=no to DEBUG=true
When installing with apt it seems to use systemd now (running ubuntu 16.04 xenial) so > /etc/default/openhab i think is no longer used.
Looking into > /usr/lib/systemd/system/openhab.service i Couldn’t find an equivalent option to DEBUG=true.
Right now my only option seems to be replaceing the with the debug version of the log xml file.
I know this thread is very old, but I just stumbled across this through a Google search and the solutions posted here didn’t work for me. Just changing the log level as suggested above won’t help either if you intend to use a JVM debugger.
In case anyone finds this who is using Arch Linux or systemd in general, just edit /usr/lib/systemd/system/openhab3.service and change ExecStart=/usr/share/openhab3/karaf_wrapper.sh server to ExecStart=/usr/share/openhab3/karaf_wrapper.sh server debug.
I hope this helps someone!