🍦 Never use print() to debug again.

Overview

icecream

IceCream -- Never use print() to debug again

Do you ever use print() or log() to debug your code? Of course you do. IceCream, or ic for short, makes print debugging a little sweeter.

IceCream is well tested, permissively licensed, and supports Python 2, Python 3, PyPy2, and PyPy3.

Inspect Variables

Have you ever printed variables or expressions to debug your program? If you've ever typed something like

print(foo('123'))

or the more thorough

print("foo('123')", foo('123'))

then ic() is here to help. With arguments, ic() inspects itself and prints both its own arguments and the values of those arguments.

from icecream import ic

def foo(i):
    return i + 333

ic(foo(123))

Prints

ic| foo(123): 456

Similarly,

d = {'key': {1: 'one'}}
ic(d['key'][1])

class klass():
    attr = 'yep'
ic(klass.attr)

Prints

ic| d['key'][1]: 'one'
ic| klass.attr: 'yep'

Just give ic() a variable or expression and you're done. Easy.

Inspect Execution

Have you ever used print() to determine which parts of your program are executed, and in which order they're executed? For example, if you've ever added print statements to debug code like

def foo():
    print(0)
    first()

    if expression:
        print(1)
        second()
    else:
        print(2)
        third()

then ic() helps here, too. Without arguments, ic() inspects itself and prints the calling filename, line number, and parent function.

from icecream import ic

def foo():
    ic()
    first()
    
    if expression:
        ic()
        second()
    else:
        ic()
        third()

Prints

ic| example.py:4 in foo()
ic| example.py:11 in foo()

Just call ic() and you're done. Simple.

Return Value

ic() returns its argument(s), so ic() can easily be inserted into pre-existing code.

>>> a = 6
>>> def half(i):
>>>     return i / 2
>>> b = half(ic(a))
ic| a: 6
>>> ic(b)
ic| b: 3

Miscellaneous

ic.format(*args) is like ic() but the output is returned as a string instead of written to stderr.

>>> from icecream import ic
>>> s = 'sup'
>>> out = ic.format(s)
>>> print(out)
ic| s: 'sup'

Additionally, ic()'s output can be entirely disabled, and later re-enabled, with ic.disable() and ic.enable() respectively.

from icecream import ic

ic(1)

ic.disable()
ic(2)

ic.enable()
ic(3)

Prints

ic| 1: 1
ic| 3: 3

ic() continues to return its arguments when disabled, of course; no existing code with ic() breaks.

Import Tricks

To make ic() available in every file without needing to be imported in every file, you can install() it. For example, in a root A.py:

#!/usr/bin/env python3
# -*- coding: utf-8 -*-

from icecream import install
install()

from B import foo
foo()

and then in B.py, which is imported by A.py, just call ic():

# -*- coding: utf-8 -*-

def foo():
    x = 3
    ic(x)

install() adds ic() to the builtins module, which is shared amongst all files imported by the interpreter. Similarly, ic() can later be uninstall()ed, too.

ic() can also be imported in a manner that fails gracefully if IceCream isn't installed, like in production environments (i.e. not development). To that end, this fallback import snippet may prove useful:

try:
    from icecream import ic
except ImportError:  # Graceful fallback if IceCream isn't installed.
    ic = lambda *a: None if not a else (a[0] if len(a) == 1 else a)  # noqa

Configuration

ic.configureOutput(prefix, outputFunction, argToStringFunction, includeContext) can be used to adopt a custom output prefix (the default is ic| ), change the output function (default is to write to stderr), customize how arguments are serialized to strings, and/or include the ic() call's context (filename, line number, and parent function) in ic() output with arguments.

>>> from icecream import ic
>>> ic.configureOutput(prefix='hello -> ')
>>> ic('world')
hello -> 'world'

prefix can optionally be a function, too.

>>> import time
>>> from icecream import ic
>>>  
>>> def unixTimestamp():
>>>     return '%i |> ' % int(time.time())
>>>
>>> ic.configureOutput(prefix=unixTimestamp)
>>> ic('world')
1519185860 |> 'world': 'world'

outputFunction, if provided, is called with ic()'s output instead of that output being written to stderr (the default).

>>> import logging
>>> from icecream import ic
>>>
>>> def warn(s):
>>>     logging.warning(s)
>>>
>>> ic.configureOutput(outputFunction=warn)
>>> ic('eep')
WARNING:root:ic| 'eep': 'eep'

argToStringFunction, if provided, is called with argument values to be serialized to displayable strings. The default is PrettyPrint's pprint.pformat(), but this can be changed to, for example, handle non-standard datatypes in a custom fashion.

>>> from icecream import ic
>>> 
>>> def toString(obj):
>>>    if isinstance(obj, str):
>>>        return '[!string %r with length %i!]' % (obj, len(obj))
>>>    return repr(obj)
>>> 
>>> ic.configureOutput(argToStringFunction=toString)
>>> ic(7, 'hello')
ic| 7: 7, 'hello': [!string 'hello' with length 5!]

includeContext, if provided and True, adds the ic() call's filename, line number, and parent function to ic()'s output.

>>> from icecream import ic
>>> ic.configureOutput(includeContext=True)
>>> 
>>> def foo():
>>>   ic('str')
>>> foo()
ic| example.py:12 in foo()- 'str': 'str'

includeContext is False by default.

Installation

Installing IceCream with pip is easy.

$ pip install icecream

IceCream in Other Languages

IceCream should be enjoyed with every language.

If you'd like a similar ic() function in your favorite language, please open a pull request! IceCream's goal is to sweeten print debugging with a handy-dandy ic() function in every language.

Comments
  • singledispatch argumentToString

    singledispatch argumentToString

    Current implementation requires users to rewrite argToStringFunction totally.

    I would suggest singledispatch argumentToString, which allows sort of ad-hoc way to stringify the argument.

    This makes codes shorter. Also, This is very handy especially on Jupyter Notebook because users may add customizations in working cells, instead of going back to the cell which defines custom argToStringFunction in a current manner.

    from icecream import ic, argumentToString
    import numpy as np
    
    @argumentToString.register(np.ndarray)
    def argumentToString_ndarray(obj):
        return f"shape: {obj.shape}, min: {obj.min()}, mean: {obj.mean()}, max: {obj.max()}"
    
    x = np.arange(10).reshape(5, -1)
    ic(x)
    
    ic| x: shape: (5, 2), min: 0, mean: 4.5, max: 9
    array([[0, 1],
           [2, 3],
           [4, 5],
           [6, 7],
           [8, 9]])
    
    opened by atusy 15
  • ic Error: Failed to access the underlying source code for analysis.

    ic Error: Failed to access the underlying source code for analysis.

    My first try with icecream (Python 3.8)

    ic| Error: Failed to access the underlying source code for analysis. Was ic() invoked in an interpreter (e.g. python -i), a frozen application (e.g. packaged with PyInstaller), or did the underlying source code change during execution?
    
    opened by rnoxy 13
  • feat(fstring): treat fstring as string literal

    feat(fstring): treat fstring as string literal

    I found the output of ic(f"var: {var}") is quite annoying, so I made some changes.

    Add includeFStringExpressions options to ic to control whether print fstring expressions. Change README.md for includeFStringExpressions

    f-string: PEP-498

    For python below 3.6, the f-string expression will not pass the syntax check, so I didn't add any python version checks in function isFString(s).

    Also, I'm not quite sure about how to implement unit tests in icecream repo. Please add tests if necessary.

    opened by kurikomoe 12
  • Call icecream without having to import it each time.

    Call icecream without having to import it each time.

    Hi there,

    I like icecream a lot. :) ... However, I often fall back to print() because I'm to lazy to type in from icecream import ic before each call. I guess it would be awesome if one could add icecream to the builtins or globals or something.

    I tried adding ic() to the buildins like this:

    import builtins
    
    def ic(x=None):
        from icecream import ic as ic_tmp
        if x:
            ic_tmp(x)
        else:
            ic_tmp()
    
    
    builtins.ic = ic
    
    

    This allow me to call ic() without having to import it first, but of cause this messes up ic's output...

    I was wondering if anyone has got an idea how to make ic global or builtin without breaking it?

    opened by feluxe 12
  • Dict contents displayed out of order

    Dict contents displayed out of order

    As of Python 3.7, standard dictionaries respect and maintain the order that the keys were inserted. When displaying with icecream, the order is not maintained. Easy fix?

    opened by peedrr 11
  • Doesn't work with pytest

    Doesn't work with pytest

    Under python 3.6, I used ic() regularly in my pytest tests to assist with debugging. Now we have switched our project to python 3.8, and I no longer can. It errors with

    ic| Error: Failed to access the underlying source code for analysis. Was ic() invoked in an interpreter (e.g. python -i), a frozen application (e.g. packaged with PyInstaller), or did the underlying source code change during execution?
    

    Is there something I can do to get it working with pytest / python3.8 again?

    opened by shacker 11
  • Jupyter Stderr

    Jupyter Stderr

    Since ic outputs to stderr, it displays weirdly in Jupyter, especially when the cell is both printing and ic-ing a lot of stuff at the same time, I've observed the order of output to be inconsistent at times. Would be nice to be able to redirect to stdout instead.

    Maybe something like:

    from icecream import ic
    ic.configureOutput(stdout=True)
    

    After digging deeper, I found out that what I'm looking for can be accomplished with:

    ic.configureOutput(outputFunction=print)
    

    It took me a while to figure it out, so I'm sure there are others. Should probably be added to the README as an example showing to how to redirect to stdout instead of stderr. Although, the line above is quite long, something shorter would be nicer.

    P.S. Jupyter inconsistency can be achieved with:

    from icecream import ic
    for i in range(1, 100):
        print(i)
        ic('test')
    

    outputs with messed up order:

    Screen Shot 2021-04-16 at 10 49 03 PM

    Adding flush=True solves it, but obviously rather just have everything in stdout instead.

    opened by Mathemmagician 10
  • ycecream: a no dependency. Pythonic fork of IceCream

    ycecream: a no dependency. Pythonic fork of IceCream

    I like the IceCream package very much, but there were several reasons why I made a fork. This solves also a number of issues raised here.

    The ycecream package can be found here: https://github.com/salabim/ycecream and can be installed directly from PyPI.

    Here are the main differences:

    • ycecream can't colourize the output (a nice feature of IceCream)
    • ycecream runs only on Python 3.6 and higher. (IceCream runs even on Python 2.7).
    • ycecream uses y as the standard interface, whereas IceCream uses ic. For compatibility, ycecream also supports ic.
    • yceceam has no dependencies. IceCream on the other hand has many (asttoken, colorize, pyglets, ...).
    • ycecream is just one .py file, whereas IceCream consists of a number of .py files. That makes it possible to use ycecream without even (pip) installing it. Just copy ycecream.py to your work directory.
    • ycecream can be used as a decorator of a function or method showing the enter and/or exit event as well as the duration (useful for simple benchmarks)
    • ycecream can output directly to a callable (like IceCream), but also an open file (e.g. sys.stdout) or a file given by the name (strr of Path)
    • ycecream uses a different PEP8 compatible API to customize (rather than IceCream's configureOutput method)
    • ycecream time showing can be controlled independently from context showing
    • ycecream can optionally show a delta (time since start of the program)
    • ycecream does not sort dicts by default. This behaviour can be controlled with the sort_dict parameter. (This is implemented by including the pprint 3.8 source code)
    • ycecream uses pytest for the test scripts rather than IceCream's unittest script.
    opened by salabim 10
  • Make a command line option for icecream module to find and delete all the `ic` statements in the code

    Make a command line option for icecream module to find and delete all the `ic` statements in the code

    Description

    • This is a great tool for debugging python code. If we could just add a CLI with a remove keyword like so:
    ic remove all
    

    this would save devs a lot of time a la Black the linter!

    • Some pseudo code (for the implementation of the CLI functionality):
    from os import listdir
    from os.path import isfile, join
    import re
    
    onlyfiles = [f for f in listdir(mypath) if isfile(join(mypath, f))]
    
    for file_name in onlyfiles:
        with open(file_name, w):
              re.search("ic").seek(). --> or something like this
              # find and replace logic here
    
    opened by AthulMuralidhar 10
  • Error: Failed to access the underlying source code for analysis. - a variation.

    Error: Failed to access the underlying source code for analysis. - a variation.

    I searched on repl and found a history for this.

    I can see that icecream works for ipython, which is nice - but it doesn't appear to work in an elpy buffer in Emacs - which uses ipython. Elpy is an Emacs mode for editing and running python code.

    I suppose icecream needs some kind of screen magic to get the highlighting and that's something that Emacs would support only with difficulty?

    Highlighting, from ipython, as seen here:

    https://imgur.com/a/fOWKGJD

    opened by patfla 9
  • IndentationError: unexpected indent

    IndentationError: unexpected indent

    In my source code I am using icecream and on line 401 of gridtrader.py I make the call ic(deepest_i) and it fails with the following stack trace:

    INFO:app:Aborting: Traceback (most recent call last):
      File "/home/schemelab/prg/adsactly-gridtrader/gridtrader/gridtrader.py", line 597, in main
        grid_trader.poll()
      File "/home/schemelab/prg/adsactly-gridtrader/gridtrader/gridtrader.py", line 401, in poll
        ic(deepest_i)
      File "/home/schemelab/prg/adsactly-gridtrader/venv/lib/python3.7/site-packages/icecream/icecream.py", line 471, in __call__
        out = self._format(callFrame, *args)
      File "/home/schemelab/prg/adsactly-gridtrader/venv/lib/python3.7/site-packages/icecream/icecream.py", line 498, in _format
        context = self._formatContext(callFrame, icNames, icMethod)
      File "/home/schemelab/prg/adsactly-gridtrader/venv/lib/python3.7/site-packages/icecream/icecream.py", line 590, in _formatContext
        callFrame, icNames, icMethod)
      File "/home/schemelab/prg/adsactly-gridtrader/venv/lib/python3.7/site-packages/icecream/icecream.py", line 613, in _getContext
        _, lineNumber, _ = getCallSourceLines(callFrame, icNames, icMethod)
      File "/home/schemelab/prg/adsactly-gridtrader/venv/lib/python3.7/site-packages/icecream/icecream.py", line 283, in getCallSourceLines
        node for node in ast.walk(ast.parse(parentBlockSource))
      File "/home/schemelab/install/python37/lib/python3.7/ast.py", line 35, in parse
        return compile(source, filename, mode, PyCF_ONLY_AST)
      File "<unknown>", line 1
        def poll(self):
        ^
    IndentationError: unexpected indent
    
    opened by metaperl 9
  • Colorize context: highlight file name, line number and function name with different colors

    Colorize context: highlight file name, line number and function name with different colors

    I have done some investigation, it seems that current icecream and pygments architecture are incompatible with it.

    1. everything is rendered first, then colorized with pygments, then a hack for legacy Windows support is executed, all within colorize.
    2. If we annotate output with control codes, they are escaped by pygments.

    Reengineering of icecream seems to be needed to handle this.

    opened by KOLANICH 0
  • icecream does not work with pytest (Failed to access the underlying source code for analysis)

    icecream does not work with pytest (Failed to access the underlying source code for analysis)

    This bug happens when using icecream + pytest and you have a multiline assertion on the test function. This will cause any ic() inside the test function containing the multiline assertion to fail, and also any ic() outside of any function will fail. See the example below.

    How to reproduce the bug

    Create a file test_icecream.py and paste this code:

    from icecream import ic
    
    print("\n\nFirst bug")
    ic()
    
    
    def test_icecream_fine():
        print("No bug")
        ic()
        assert 1 + 1 == 2 if 1 == 1 else 2 + 2 == 4 or 3 + 3 == 6 or 4 + 4 == 8
    
    
    def test_icecream_bug():
        print("Second bug")
        ic()
        assert (
            1 + 1 == 2 if 1 == 1 else 2 + 2 == 4 or 3 + 3 == 6 or 4 + 4 == 8 or 5 + 5 == 10
        )
        print(
            "Bug happens when this print is executed and does not happen when it is not executed"
        )
    

    Run

    pytest test_icecream.py -s
    

    Results

    First bug
    ic| Error: Failed to access the underlying source code for analysis. Was ic() invoked in a REPL (e.g. from the command line), a frozen application (e.g. packaged with PyInstaller), or did the underlying source code change during execution?
    collected 2 items                                                                                                                                                                                                                                                                                         
    
    test_icecream.py No bug
    ic| test_icecream.py:9 in test_icecream_fine() at 05:36:01.133
    .Second bug
    ic| Error: Failed to access the underlying source code for analysis. Was ic() invoked in a REPL (e.g. from the command line), a frozen application (e.g. packaged with PyInstaller), or did the underlying source code change during execution?
    Bug happens when this print is executed and does not happen when it is not executed
    

    If you comment the last print statement on this example, the bug will not happen. Super strange. The cause of the error is the multiline assertion, if you remove it, then it works as expected.

    Extra details

    OS

    macOS Monterey 12.6

    Python version

    3.10.6

    IDE

    Visual Studio Code 1.73.0

    Installation method

    poetry add icecream
    
    opened by FilipeMarch 1
  • python3.11

    python3.11

    ic| Error: Failed to access the underlying source code for analysis. Was ic() invoked in a REPL (e.g. from the command line), a frozen application (e.g. packaged with PyInstaller), or did the underlying source code change during execution?

    opened by talentlb 7
  • icecream strange output

    icecream strange output

    new to icecream with 2.1.3 on windows python38

    from icecream import ic
    ic("progress remark")
    

    produces garbage: round my text:- ============= RESTART: C:/Python/Python38/OurStuff/icecream-test.py ============ ic| 'progress remark'

    other uses if ic() are no better.

    opened by nickums 3
  • Unable to print timings of ic calls?

    Unable to print timings of ic calls?

    After seeing the issue about ic being slower, I thought I'd add a quick test:

    def testPerformance(self): from timeit import timeit print(timeit('print("a")', number=1000)) print(timeit('ic("a")', 'from icecream import ic', number=1000))

    however, the output with

    pytest -k "Performance" -rP

    gives me:

    ======================================================= PASSES ======================================================== ____________________________________________ TestIceCream.testPerformance _____________________________________________ ------------------------------------------------ Captured stdout call ------------------------------------------------- a a a a a a a a a a 0.0005997000262141228 0.022074999986216426 ------------------------------------------------ Captured stderr call ------------------------------------------------- ic| Error: Failed to access the underlying source code for analysis. Was ic() invoked in a REPL (e.g. from the command line), a frozen application (e.g. packaged with PyInstaller), or did the underlying source code change during execution? ic| Error: Failed to access the underlying source code for analysis. Was ic() invoked in a REPL (e.g. from the command line), a frozen application (e.g. packaged with PyInstaller), or did the underlying source code change during execution? ic| Error: Failed to access the underlying source code for analysis. Was ic() invoked in a REPL (e.g. from the command line), a frozen application (e.g. packaged with PyInstaller), or did the underlying source code change during execution? ic| Error: Failed to access the underlying source code for analysis. Was ic() invoked in a REPL (e.g. from the command line), a frozen application (e.g. packaged with PyInstaller), or did the underlying source code change during execution? ic| Error: Failed to access the underlying source code for analysis. Was ic() invoked in a REPL (e.g. from the command line), a frozen application (e.g. packaged with PyInstaller), or did the underlying source code change during execution? ic| Error: Failed to access the underlying source code for analysis. Was ic() invoked in a REPL (e.g. from the command line), a frozen application (e.g. packaged with PyInstaller), or did the underlying source code change during execution? ic| Error: Failed to access the underlying source code for analysis. Was ic() invoked in a REPL (e.g. from the command line), a frozen application (e.g. packaged with PyInstaller), or did the underlying source code change during execution? ic| Error: Failed to access the underlying source code for analysis. Was ic() invoked in a REPL (e.g. from the command line), a frozen application (e.g. packaged with PyInstaller), or did the underlying source code change during execution? ic| Error: Failed to access the underlying source code for analysis. Was ic() invoked in a REPL (e.g. from the command line), a frozen application (e.g. packaged with PyInstaller), or did the underlying source code change during execution? ic| Error: Failed to access the underlying source code for analysis. Was ic() invoked in a REPL (e.g. from the command line), a frozen application (e.g. packaged with PyInstaller), or did the underlying source code change during execution? ========================================== 1 passed, 37 deselected / 1 selected

    Which seems to indicate that I'm unable to call ic from within a timeit call? Wondering what I might be doing incorrectly?

    opened by marksmayo 1
  • Handling of \n

    Handling of \n

    When a string contains '\n' icecream interprets it as a new line, even if the string actually contains '\\n' or equivalent. I would expect the same behavior print shows.

    Expected behavior:

    ic(r'C:\Users\new test')
    

    ic| r'C:\Users\new test': 'C:\Users\new test'

    ic('C:\\Users\\new test')
    

    ic| 'C:\Users\new test': 'C:\Users\new test'

    Actual behavior:

    ic(r'C:\Users\new test')
    

    ic| r'C:\Users\new test': 'C:\Users
                                          ew test'

    ic('C:\\Users\\new test')
    

    ic| 'C:\Users\new test': 'C:\Users
                                         ew test'

    Possible Quick Fix (creates new problem)

    Changing

    @singledispatch
    def argumentToString(obj):
        s = DEFAULT_ARG_TO_STRING_FUNCTION(obj)
        s = s.replace('\\n', '\n')  # Preserve string newlines in output.
        return s
    

    to

    @singledispatch
    def argumentToString(obj):
        if type(obj) == str:
            return obj
        else:
            s = DEFAULT_ARG_TO_STRING_FUNCTION(obj)
            s = s.replace('\\n', '\n')  # Preserve string newlines in output.
            return s
    

    in icecream.py line 181 onwards will get rid of this speciific problem, but there will be no coloring.

    The chosen example of a path shows the problem of this behavior. Especially when paths are entered, the usability suffers. A possible solution would be the introduction of a new parameter that allows the choice of behavior. Of course, this would only circumvent the problem.

    opened by ICreedenI 0
Releases(v2.1.3)
  • v2.1.3(Jul 21, 2022)

    Added: The contextAbsPath= parameter to ic.configureOutput() which, when True, outputs absolute paths, like /path/to/foo.py, instead of just filenames, like foo.py. See https://github.com/gruns/icecream/pull/122. Huge thank you to @HelinXu! Changed: Raise TypeError if no arguments are provided to ic.configureOutput().

    Source code(tar.gz)
    Source code(zip)
  • v2.1.2(Feb 15, 2022)

    • Added: Ability to register and unregister singledispatch argumentToString functions. See https://github.com/gruns/icecream/pull/115. Huge thank you to @atusy!
    Source code(tar.gz)
    Source code(zip)
  • v2.1.1(Jun 22, 2021)

  • v2.1.0(Apr 16, 2021)

    • Added: install() and uninstall() functions that add or remove ic() from the builtins module.
    • Changed: Switch to ast.literal_eval() to determine if an argument and value are the same, and thus only the value should be output. Huge thank you to Ed Cardinal and Alex Hall.
    Source code(tar.gz)
    Source code(zip)
  • v2.0.0(Oct 26, 2019)

    • Added: Support for Python 3.8.
    • Removed: Support for Python 3.4.
    • Changed: Switched core AST parsing engine to Alex Hall's executing (https://github.com/alexmojaki/executing). Huge thank you to Alex Hall.
    • Changed: Whitespace in arguments is no longer collapsed. Indentation in multiline arguments is now preserved.
    Source code(tar.gz)
    Source code(zip)
  • v1.3.1(Jun 6, 2018)

    • Removed: Support for Python 3.3, which reached EOL on 2017-09-29.
    • Fixed: ic() invocations that fail to find or access source code (e.g. eval(), exec(), python -i, etc) now print an error message instead of throwing an IOError (Python 2) or OSError (Python 3).
    Source code(tar.gz)
    Source code(zip)
  • v1.3(Jun 6, 2018)

Owner
Ansgar Grunseid
Ansgar Grunseid
An improbable web debugger through WebSockets

wdb - Web Debugger Description wdb is a full featured web debugger based on a client-server architecture. The wdb server which is responsible of manag

Kozea 1.6k Dec 09, 2022
VizTracer is a low-overhead logging/debugging/profiling tool that can trace and visualize your python code execution.

VizTracer is a low-overhead logging/debugging/profiling tool that can trace and visualize your python code execution.

2.8k Jan 08, 2023
Sampling profiler for Python programs

py-spy: Sampling profiler for Python programs py-spy is a sampling profiler for Python programs. It lets you visualize what your Python program is spe

Ben Frederickson 9.5k Jan 08, 2023
pdb++, a drop-in replacement for pdb (the Python debugger)

pdb++, a drop-in replacement for pdb What is it? This module is an extension of the pdb module of the standard library. It is meant to be fully compat

1k Dec 24, 2022
Sentry is cross-platform application monitoring, with a focus on error reporting.

Users and logs provide clues. Sentry provides answers. What's Sentry? Sentry is a service that helps you monitor and fix crashes in realtime. The serv

Sentry 32.9k Dec 31, 2022
Tracing instruction in lldb debugger.Just a python-script for lldb.

lldb-trace Tracing instruction in lldb debugger. just a python-script for lldb. How to use it? Break at an address where you want to begin tracing. Im

156 Jan 01, 2023
A drop-in replacement for Django's runserver.

About A drop in replacement for Django's built-in runserver command. Features include: An extendable interface for handling things such as real-time l

David Cramer 1.3k Dec 15, 2022
pdb++, a drop-in replacement for pdb (the Python debugger)

pdb++, a drop-in replacement for pdb What is it? This module is an extension of the pdb module of the standard library. It is meant to be fully compat

1k Jan 02, 2023
Never use print for debugging again

PySnooper - Never use print for debugging again PySnooper is a poor man's debugger. If you've used Bash, it's like set -x for Python, except it's fanc

Ram Rachum 15.5k Jan 01, 2023
A configurable set of panels that display various debug information about the current request/response.

Django Debug Toolbar The Django Debug Toolbar is a configurable set of panels that display various debug information about the current request/respons

Jazzband 7.3k Dec 29, 2022
Full featured multi arch/os debugger built on top of PyQt5 and frida

Full featured multi arch/os debugger built on top of PyQt5 and frida

iGio90 1.1k Dec 26, 2022
Little helper to run Steam apps under Proton with a GDB debugger

protongdb A small little helper for running games with Proton and debugging with GDB Requirements At least Python 3.5 protontricks pip package and its

Joshie 21 Nov 27, 2022
Hunter is a flexible code tracing toolkit.

Overview docs tests package Hunter is a flexible code tracing toolkit, not for measuring coverage, but for debugging, logging, inspection and other ne

Ionel Cristian Mărieș 705 Dec 08, 2022
Trashdbg - TrashDBG the world's worse debugger

The world's worse debugger Over the course of multiple OALABS Twitch streams we

OALabs 21 Jun 17, 2022
NoPdb: Non-interactive Python Debugger

NoPdb: Non-interactive Python Debugger Installation: pip install nopdb Docs: https://nopdb.readthedocs.io/ NoPdb is a programmatic (non-interactive) d

Ondřej Cífka 67 Oct 15, 2022
A drop-in replacement for Django's runserver.

About A drop in replacement for Django's built-in runserver command. Features include: An extendable interface for handling things such as real-time l

David Cramer 1.3k Dec 15, 2022
Hypothesis debugging with vscode

Hypothesis debugging with vscode

Oliver Mannion 0 Feb 09, 2022
Python's missing debug print command and other development tools.

python devtools Python's missing debug print command and other development tools. For more information, see documentation. Install Just pip install de

Samuel Colvin 637 Jan 02, 2023
Cyberbrain: Python debugging, redefined.

Cyberbrain1(电子脑) aims to free programmers from debugging.

laike9m 2.3k Jan 07, 2023
Visual Interaction with Code - A portable visual debugger for python

VIC Visual Interaction with Code A simple tool for debugging and interacting with running python code. This tool is designed to make it easy to inspec

Nathan Blank 1 Nov 16, 2021