How to debug cinnamon applet? How to debug cinnamon applet? linux linux

How to debug cinnamon applet?


Your best bet here is the old trick of printing messages to the terminal. Use global.log(...) for it, the lines are sent to the ~/.cinnamon/glass.log file, to watch them just do:

tail -f ~/.cinnamon/glass.log 

Also, as stated by @elParaguayo, type Alt+F2 to bring the Cinnamon prompt, type in lg and press ENTER to show the Looking Glass Debugger topmost dialog, there you can evaluate expressions by typing them in the Exec: input box and watching the results listed in the Results tab.


I know this is over a year old now, but I came across it as I was trying to write my own applet so I though I'd share my experiences.

In terms of debugging, I'm not sure these can be done in a browser. I debugged mine by updating my code, re-activating the applet in Cinnamon and then looking at the error log (Alt+F2 and then type lg).

Not a great solution at all, but it's the only solution I've found.


Use the browser is not possible. You need to read:

  1. ~/.xsession-errors (because not all errors can appear as a cinnamon errors if you interact with other system applications) or you also can read the terminal output of cinnamon (same as xsession-errors, but will be update dynamically). Execute "cinnamon --replace" to enable the output mode, is possible that this will required to be execute more than one time.

  2. ~/.cinnamon/glass.log or you can use Melange - Cinnamon Debugger.Just click on cinnamon panel, TroubleShoot and find the application.