4259 links
  • Arnaud's links
  • Home
  • RSS Feed
  • Tag cloud
  • Login
search: tag:pudb tag:terminal tag:python — newest first
  • Note: debug python terminal

    ++++++++++++++++++++++
    Version avec interface cmd
    ++++++++++++++++++++++

    Prérequis :

    pip install pudb

    Pour docker, dans le docker compose ajouter

    stdin_open: true
    tty: true
    Faire docker attach container_name

    Comment break/debug :

    Là où on veut break, il suffit de coller cette ligne : import pudb; pu.db

    Dans le terminal où on a fait docker attach on doit voir l'interface de pudb

    ++++++++++++++++++++++
    Version + simple
    ++++++++++++++++++++++
    Prérequis : python 3.7

    Pour docker, dans le docker compose ajouter

    stdin_open: true
    tty: true
    Faire docker attach container_name

    Comment break/debug :

    breakpoint()

    Dans le terminal où on a fait docker attach on doit voir un prompt

    On peut print les variables
    "continue" pour continuer

    February 12, 2021 - permalink - https://links.infomee.fr/shaare/lTcZoA
    debug pudb python terminal