You can find information about debugging snaps on the following page at http://snapcraft.io:
https://snapcraft.io/docs/build-snaps/debugging