feature request: allow pdb tracing of snapcraft plugin code

Bug #1882270 reported by Dmitrii Shcherbakov
12
This bug affects 2 people
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://bugs.launchpad.net/snapcraft/+bug/1882124

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.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.