Skip to content
This repository has been archived by the owner on May 2, 2024. It is now read-only.

Expose PYTHONBREAKPOINT config variable with default of ipdb #45

Closed
kdmccormick opened this issue Feb 5, 2022 · 2 comments · Fixed by overhangio/tutor#688
Closed

Expose PYTHONBREAKPOINT config variable with default of ipdb #45

kdmccormick opened this issue Feb 5, 2022 · 2 comments · Fixed by overhangio/tutor#688
Assignees
Labels
enhancement Relates to new features or improvements to existing features good first issue A good task for a newcomer to start with

Comments

@kdmccormick
Copy link
Collaborator

kdmccormick commented Feb 5, 2022

Context

Since Python 3.7, there exists a breakpoint() builtin function, which is a small but significant quality-of-life improvement over typing out import pdb;pdb.set_trace(), or import ipdb;ipdb.set_trace(), or something else. The function drops into pdb.set_trace unless PYTHONBREAKPOINT has been any other callable or 0 (disable breakpoints).

The Open edX development docs currently recommend using import ipdb;ipdb.set_trace().

Acceptance

  • Expose PYTHONBREAKPOINT as a Tutor configuration variable, with a default of "ipdb.set_trace".
  • Set ARG PYTHONBREAKPOINT={{ PYTHONBREAKPOINT }} in the openedx dockerfile
  • Change the docs to recommend using breakpoint().
    • Explain that PYTHONBREAKPOINTcan be modified in order to use a custom debugger.
@kdmccormick kdmccormick added the enhancement Relates to new features or improvements to existing features label Feb 5, 2022
@regisb
Copy link

regisb commented Feb 7, 2022

This is definitely doable in the devevelopment image, where ipdb is installed: https://github.com/overhangio/tutor/blob/68b46aa72046402d399cae74a9f32dee6088296a/tutor/templates/build/openedx/Dockerfile#L226
We could tag this item "good first issue".

@kdmccormick kdmccormick added the good first issue A good task for a newcomer to start with label Mar 8, 2022
@kdmccormick kdmccormick moved this to Ungroomed (Kyle) in Tutor DevEnv Adoption (OLD BOARD) Mar 8, 2022
@kdmccormick kdmccormick moved this from Ungroomed (Kyle) to Groomed in Tutor DevEnv Adoption (OLD BOARD) Mar 22, 2022
@Carlos-Muniz
Copy link

Gonna tackle this issue @kdmccormick

@kdmccormick kdmccormick moved this from Backlog to Next Up in Tutor DevEnv Adoption Jun 6, 2022
@kdmccormick kdmccormick moved this from Next Up to In Progress in Tutor DevEnv Adoption Jun 15, 2022
regisb pushed a commit to overhangio/tutor that referenced this issue Jun 22, 2022
PYTHONBREAKPOINT has been exposed as an environment variable in
the openedx Dockerfile available to be changed in config.yml. The docs have also been changed to recommend using
breakpoint and explaining how PYTHONBREAKPOINT can be modified to use a
custom debugger.

Close openedx-unsupported/wg-developer-experience#45
Repository owner moved this from Groomed to Closed in Tutor DevEnv Adoption (OLD BOARD) Jun 22, 2022
Repository owner moved this from In Progress to Backlog in Tutor DevEnv Adoption Jun 22, 2022
@kdmccormick kdmccormick moved this from Backlog to Closed in Tutor DevEnv Adoption Jun 23, 2022
@jmakowski1123 jmakowski1123 moved this to Done - To ship in future Named Release in Open edX Roadmap Oct 6, 2022
@jmakowski1123 jmakowski1123 moved this from Done - To ship in future Named Release to To ship in Olive in Open edX Roadmap Oct 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Relates to new features or improvements to existing features good first issue A good task for a newcomer to start with
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants