Debugging python snap

I have a simple app written in one python file (at least for now). The snap builds successfully and I can launch the program and display the help content. But when I try to execute the program it does nothing. No echo, no change, nothing. Its not possible to get 0 output from the program. So how do I figure out / debug where things are stopping?


After a quick scan of your code I think you might be better off with confinement: classic. When in non classic mode, you end up doing a pivot root onto core. You can verify this by running snap run --shell <command>.

When going down the classic path, you will be better off creating a to drive the installation of to ensure the proper shebangs are set, alternatively, you could make sure that you have a command that looks a bit more like this command: $SNAP/usr/bin/python3

Thanks, i was under the impression confinement: devmode was unconfined…

No wonder it does not work, but still, i dont get any warnings or printout, which is strange. “classic” was fine :wink:

Print outs and such really depend on the reliability of the code you use. As an example, if a thread crashes while gtk is loaded because it couldn’t configure fonts, the entire bring up just deadlocks.

devmode is unconfined, but you still pivot to the new root.