Giter VIP home page Giter VIP logo

pyext's Introduction

WinDbg Extensions for Python

Build Status

This debugger extension provides visualizations for Python objects and stacktraces when debugging the CPython interpreter. It helps with live debugging and post-mortem analysis of dump files.

The goal of this project is to provide a similar debugging experience in WinDbg/CDB/NTSD as already exists in GDB.

Currently, the extension is tested against 32bit and 64bit builds of Python versions 2.7, 3.3, 3.4, 3.5, and 3.6.

Extension Commands

!pystack

Displays the Python callstack for the current thread.

Example usage:

0:000> !pystack
Thread 0:
    File "C:\Python36\lib\threading.py", line 1072, in _wait_for_tstate_lock
    File "C:\Python36\lib\threading.py", line 1056, in join
    File "scripts\win32debug.py", line 148, in _launch_and_wait
    File "scripts\win32debug.py", line 175, in dump_process
    File ".\fibonacci_test.py", line 18, in recursive_fib
    File ".\fibonacci_test.py", line 18, in recursive_fib
    File ".\fibonacci_test.py", line 18, in recursive_fib
    File ".\fibonacci_test.py", line 28, in <module>

Use ~*e!pystack to display the Python stack for all threads.

!pyobj

Displays the reference count, type, and value of a Python object, using similar formatting to Python's builtin repr() function.

Example usage:

0:000> !pyobj autoInterpreterState->tstate_head->frame->f_code
PyCodeObject at address: 000001fc`b6a87f60
RefCount: 2
Type: code
Repr: <code object, file "scripts\win32debug.py", line 120>
0:000> !pyobj autoInterpreterState->tstate_head->frame->f_globals
PyDictObject at address: 000001fc`b6ba6bd0
RefCount: 15
Type: dict
Repr: {
    '__name__': 'win32debug',
    '__doc__': 'Wrappers around various Win32 APIs debugging.',
# ...
}

pyext's People

Contributors

seancline avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.