feature request: allow pdb tracing of snapcraft plugin code
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Snapcraft |
New
|
Undecided
|
Unassigned |
Bug Description
It is quite useful to be able to drop into the python code of snapcraft and do things it does step-by-step when it isn't apparent what is going on during the build process.
One example of that is this bug: https:/
While it is possible to do something like this inside a build VM created by multipass:
snap remove snapcraft
mkdir /var/tmp/snapraft && cd /var/tmp/snapcraft
unsquashfs ../snapcraft.snap
# edit the .py files of snapcraft to insert `import pdb; pdb.set_trace()`
snap try squashfs-root/ --classic
snapcraft build
I think those trace points could be setup inside snapcraft (e.g. at the start of the build function of a given plugin) and invoked via some command. This could be more user-friendly than what I suggested above.