Skip to main content

dynamic python tracing

Project description

First Terminal

python3 examples/script_to_debug.py

Second terminal

pymontrace -p "$(pgrep '[Pp]ython')" -e 'line:*/script_to_debug.py:13 {{ print("a", ctx.a, "b", ctx.b) }}'
Waiting for process to reach safepoint...
Probes installed. Hit CTRL-C to end...
a 4 b 3
a 3 b 7
a 7 b 1
a 1 b 8
a 8 b 0
^CRemoving probes...
Waiting for process to reach safepoint...
.


INSTALLATION:

pymontrace can be installed with pip or pipx or just run with pipx run at
your preference.

pip install pymontrace

pipx install pymontrace

pipx run pymontrace

uvx pymontrace


DOCUMENTATION:

See pymontrace -h and https://cakemanny.com/pymontrace or
docs/SUMMARY.md in the github repository for some initial documentation.


WARNING:

- This is under early development and is in no way safe to use against
production workloads.

- The interface will change wildly without warning. There are no versioning
guarantees at this point.


CAVEATS:

- Use on macOS requires root. Use `sudo`.

- Probes will only fire if the function is entered after the probe has
been installed. This means that top level statements cannot be traced and
that the statements inside an outermost forever-loop cannot be traced.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pymontrace-0.1.0.dev13.tar.gz (68.4 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

pymontrace-0.1.0.dev13-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (124.1 kB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

pymontrace-0.1.0.dev13-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (127.1 kB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ ARM64manylinux: glibc 2.28+ ARM64

pymontrace-0.1.0.dev13-cp39-abi3-macosx_10_9_universal2.whl (79.9 kB view details)

Uploaded CPython 3.9+macOS 10.9+ universal2 (ARM64, x86-64)

File details

Details for the file pymontrace-0.1.0.dev13.tar.gz.

File metadata

  • Download URL: pymontrace-0.1.0.dev13.tar.gz
  • Upload date:
  • Size: 68.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pymontrace-0.1.0.dev13.tar.gz
Algorithm Hash digest
SHA256 4f941cd63eaeca0402fb654567b4182fa1bfbd8a65a482bcca3431fa4007bdee
MD5 4e712cc95f34eda426b368801a4fb0d1
BLAKE2b-256 ded79125bfde3812ed47bce82ea4f4a6eac80c9a3d243d4039114bdc0007e678

See more details on using hashes here.

Provenance

The following attestation bundles were made for pymontrace-0.1.0.dev13.tar.gz:

Publisher: build-and-publish.yml on cakemanny/pymontrace

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pymontrace-0.1.0.dev13-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pymontrace-0.1.0.dev13-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 0ebb6caa7a58233d6c9d373fe482ede1f378b00813c600b190d065db502cd58c
MD5 47d72faa4b39cb14cc1921df7a71691f
BLAKE2b-256 3d6c4d6bb8f4ec75232476d107055ee63f4c045bfb84df52962993d0ef47c024

See more details on using hashes here.

Provenance

The following attestation bundles were made for pymontrace-0.1.0.dev13-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl:

Publisher: build-and-publish.yml on cakemanny/pymontrace

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pymontrace-0.1.0.dev13-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for pymontrace-0.1.0.dev13-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 92c69b01ff2f98f28c8255ba94a5bbf8186bc7ad1450de32b53ad4287369c3ed
MD5 e5deebd4ed6d01e8349e4c553d3999c1
BLAKE2b-256 1cb8aa99894bc5077718b219db9d4d5f991643e80d03100d05a8a0d373fec1ec

See more details on using hashes here.

Provenance

The following attestation bundles were made for pymontrace-0.1.0.dev13-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl:

Publisher: build-and-publish.yml on cakemanny/pymontrace

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pymontrace-0.1.0.dev13-cp39-abi3-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for pymontrace-0.1.0.dev13-cp39-abi3-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 1f8e62b3aeea0f729d2b9ef511857661ba58862d0c690186e1bbcf95118b314d
MD5 1b589bb2f831e4fd43ae61a4b13d5c07
BLAKE2b-256 127ae9a28b8c02cbd223ed9d41dd84fa4c75c27b9ba5e57ac4c5999ab62a46e2

See more details on using hashes here.

Provenance

The following attestation bundles were made for pymontrace-0.1.0.dev13-cp39-abi3-macosx_10_9_universal2.whl:

Publisher: build-and-publish.yml on cakemanny/pymontrace

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page