← Back to issue list

feature request: allow pdb tracing of snapcraft plugin code

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1882270
Type
issue
State
open
Author
~dmitriis
Labels
—
Created
Updated
Closed
—

Current evaluation

2019 request to allow pdb tracing into Snapcraft's plugin code during builds. Still open, unlabelled, no maintainer response; only workaround is unsquashing and hand-patching the snap. --debug/--shell exist but give no Python-level tracing.

Suggested action: needs triage

Reason: The issue has zero labels, zero comments and no assignee after 2310 days, so it has never been assessed by a maintainer. I verified the feature is still unimplemented: grepping the tree for 'pdb', 'set_trace', 'breakpoint' and 'SNAPCRAFT_DEBUG' returns no source matches (only a gdb/VS Code doc), and no commit mentions pdb — the existing --debug/--shell/--shell-after options (snapcraft/commands/core22/lifecycle.py:61, snapcraft/parts/lifecycle.py:450) only open a shell, not a Python debugger. Actionability is low because the request offers two vague approaches with no design spec, and the referenced 'plugin build function' now lives in craft-parts rather than snapcraft, so the scope is ambiguous and arguably spans another repo.

Evaluated by: mr-cal-bot

Impact: 30 Quick Win: 5 Complexity: 55 Confidence: 80 Actionability: 35

Issue body

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.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 30
Quick Win: 5
Complexity: 55
Confidence: 80
Actionability: 35
needs triage 2019 request to allow pdb tracing into Snapcraft's plugin code during builds. Still open, unlabelled, no maintainer response; only workaround is unsquashing and hand-patching the snap. --debug/--shell exist but give no Python-level tracing.
stealth/space-bunny-alpha
Impact: 34
Quick Win: 7
Complexity: 63
Confidence: 90
Actionability: 52
needs triage Requests interactive Python debugger tracing inside Snapcraft plugin code. The 2,302-day-old request remains unlabelled, has no maintainer response, and offers only a manual snap-repacking workaround.
qwen/qwen3.8-27b
Impact: 20
Quick Win: 12
Staleness: 95
Complexity: 40
Confidence: 70
Support Request: 10
close stale Feature request (6+ years old, no labels, no comments) to add built-in pdb tracing of snapcraft plugin code for step-by-step build debugging; motivated by legacy bug 1882124 from the Python 3.6 plugin era.
qwen/qwen3.8-27b
Impact: 25
Quick Win: 14
Staleness: 95
Complexity: 45
Confidence: 65
Support Request: 10
close stale Feature request to add pdb trace points in snapcraft plugin code for step-by-step build debugging. 6+ years old, zero comments, no labels, no maintainer engagement; plugin code has since moved to the craft-parts library.
qwen/qwen3.6-35b-a3b
Staleness: 98
Complexity: 35
Confidence: 90
Support Request: 10
close stale Feature request to add built-in pdb tracing for snapcraft plugins via a CLI flag. Submitted over six years ago with no maintainer response or activity. The request is outdated given modern Python debugging tools and significant changes to snapcraft architecture.
qwen/qwen3.6-35b-a3b
Staleness: 98
Complexity: 30
Confidence: 90
Support Request: 10
close stale Feature request to add built-in pdb tracing for snapcraft plugin code. Unlabelled, zero maintainer interaction, inactive for over six years.
qwen3.6-35b-a3b-mtp-q6
Staleness: 98
Complexity: 45
Confidence: 85
Support Request: 10
close stale Feature request to add built-in pdb tracing for snapcraft plugin code. Unaddressed for over 6 years with no maintainer interaction or labels.

Update history

Date Change
created

Related work

  • Related To: snapcraft (launchpad)#1609803 (confidence 65%)

    Related debugging UX request that was implemented as --debug (commit a24083e75); --debug only opens a shell after failure and does not provide Python-level tracing, so it does not satisfy this request.

Related issues

No related issues found above the similarity threshold.