Host tools in snap shell

Sergio Schvezov sergio.schvezov at canonical.com
Tue Oct 25 16:37:13 UTC 2016


El 25/10/16 a las 12:05, Alberto Mardegan escribió:
> Hi all!
>    I've a weird issue in my snap which needs some debugging. I understand
> that
>
>    snap run --shell <snap-name>
>
> is the command I want to use in order to start a shell with the same
> confinement and environment of my snap (which BTW is in --devmode), and
> so far so good. But now I want to use "strace" on my application, and it
> seems that while "strace" is available on my host system, it's not
> accessible from the snap shell (or I didn't find a way to reach it).
>
> Is adding strace and gdb to my snap the only way to go, or is there some
> trick that would allow me to use these tools without modifying my snap?

This is how I do it on the fly (there was a session at the sprint for 
this to be easier)...

```
snapcraft prime
snap try prime --devmode
cp /usr/bin/strace prime
snap shell <snap.app> --shell
(sudo) ./strace ...
```




More information about the Snapcraft mailing list