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.dev12.tar.gz (68.5 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.dev12-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.dev12-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.dev12-cp39-abi3-macosx_14_0_arm64.whl (55.2 kB view details)

Uploaded CPython 3.9+macOS 14.0+ ARM64

File details

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

File metadata

  • Download URL: pymontrace-0.1.0.dev12.tar.gz
  • Upload date:
  • Size: 68.5 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.dev12.tar.gz
Algorithm Hash digest
SHA256 29b81598fecf764bf3d0631cefe4ec8083c30a8a1bb387841355f0038362ca91
MD5 b68d05ccc309c4034c4ade76278af804
BLAKE2b-256 af405d3003a93d926632ab411f5a2c4b02488edef285ed294ab48b5edf3ff164

See more details on using hashes here.

Provenance

The following attestation bundles were made for pymontrace-0.1.0.dev12.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.dev12-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.dev12-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 50149bba6eede47bec5c7f24dcc2e6238a39787befe4a6c0070ba087c7084d69
MD5 5e2fd08b6677518776d14ad3a2be3d2c
BLAKE2b-256 2a1576383e883b36b7890a4b8802264ebfdb4435b806326da0d3f92f24b3aa2f

See more details on using hashes here.

Provenance

The following attestation bundles were made for pymontrace-0.1.0.dev12-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.dev12-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for pymontrace-0.1.0.dev12-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 b56165007a5c98b442de3073ee532f8976314351d3973e1812da3141a80ed906
MD5 658c1cda059c0ce8823de54afda8f27e
BLAKE2b-256 c7668f6583f92ec186f11bd441475a5fe4a2d2d6897ecd1e91e4d60850c9f122

See more details on using hashes here.

Provenance

The following attestation bundles were made for pymontrace-0.1.0.dev12-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.dev12-cp39-abi3-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for pymontrace-0.1.0.dev12-cp39-abi3-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 4acd72792e1e3d295db7ff15d3b87eb8d681e8ff5a8fb7ca8e9ddc29e137e4b2
MD5 120030c06d917937f620340958e43b48
BLAKE2b-256 290757ac68bd3382cfbde13abf5505896f8d93afe1c55ecd266d1d958f2253c9

See more details on using hashes here.

Provenance

The following attestation bundles were made for pymontrace-0.1.0.dev12-cp39-abi3-macosx_14_0_arm64.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