This post explains how to enable and disable the DEBUG MODE of the Pentax (and Samsung) DSLR line on-the-fly using nothing but your regular memory card with an extra text file on it.
I just found a site called Pentax Hack where they have disassembled and examined the firmware of the various Pentax and Samsung cameras. It turns out that it is possible to enable the infamous DEBUG MODE on all the Pentax and Samsung DSLRs without using the program I have previously mentioned.
All you need to do is make a text file called MODSET.TXT (the file ending depends on firmware & camera) and write a a bit of text that will enable you to enter the debug mode and also get out of it. Save the file on your SD-card.
For my GX-10 the MODSET.TXT file that enables it looks like this:
Remember to also append a newline-character (just press <ENTER>). Forgetting that made it not work for me.
To actually get into the menu that enables the DEBUG MODE, you have to open the memory card door and then turn on the camera. You should now be presented with a new menu, in which you can turn on/off the DEBUG MODE.
More info on the Pentax Hack homepage. Cred to the hackers!