Skip to main content

Trade time for space when debugging your code.

Project description

Space Tracer

Trade Time for Space When You Debug

The Space Tracer displays what happens to your code so you can read through it like a book, instead of stepping through it like most debuggers. For example, here's a simple script that assigns a variable, then loops a few times making changes to that variable, before printing out the final message.

message = 'Hello, World'
for i in range(3):
    message += '!'
print(message)

A regular debugger would let you set break points, look at variable values, and step through the code. Space Tracer shows you the code with all of the variable assignments, and the loop iterations in columns. Here, you see the script on the left, and the variable values and loops on the right, so you can read through what happened, like reading a book.

message = 'Hello, World' | message = 'Hello, World' 
for i in range(3):       | i = 0                     | i = 1                      | i = 2 
    message += '!'       | message = 'Hello, World!' | message = 'Hello, World!!' | message = 'Hello, World!!!' 
print(message)           | print('Hello, World!!!') 

You can run Space Tracer as a command-line tool, or you can use it in the Live Coding in Python plugins for PyCharm, Emacs, and Sublime Text. See the Getting Started page for a full introduction.

Installing Space Tracer

Space Tracer is a regular Python package, so you can install it with pip install space_tracer. If you haven't installed Python packages before, read Brett Cannon's quick-and-dirty guide.

Then copy the script above into a file called hello.py, and run it with the space_tracer command:

$ space_tracer hello.py
message = 'Hello, World' | message = 'Hello, World' 
for i in range(3):       | i = 0                     | i = 1                      | i = 2 
    message += '!'       | message = 'Hello, World!' | message = 'Hello, World!!' | message = 'Hello, World!!!' 
print(message)           | print('Hello, World!!!') 
$

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

space_tracer-4.7.0.tar.gz (71.1 kB view details)

Uploaded Source

Built Distribution

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

space_tracer-4.7.0-py3-none-any.whl (39.7 kB view details)

Uploaded Python 3

File details

Details for the file space_tracer-4.7.0.tar.gz.

File metadata

  • Download URL: space_tracer-4.7.0.tar.gz
  • Upload date:
  • Size: 71.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for space_tracer-4.7.0.tar.gz
Algorithm Hash digest
SHA256 99f878cb1303918c78575239ae03bc6188146078a9ef731c566791b48f181d35
MD5 77712423bac00c0910eca3e9647e9513
BLAKE2b-256 988cf91d113a81642b3f42d7a9b6c4404f6ae3864b199ebf6c35db680b3b2147

See more details on using hashes here.

File details

Details for the file space_tracer-4.7.0-py3-none-any.whl.

File metadata

  • Download URL: space_tracer-4.7.0-py3-none-any.whl
  • Upload date:
  • Size: 39.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for space_tracer-4.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 336b9c87f83f8e126e3555b8351ffa9b71e2346fe19cc311d6d51fa8703de1f7
MD5 9152c4389b6b8ddb2eaafff841cdeb30
BLAKE2b-256 e2f3f32040e3627d72246d44c13cec7aca7cd27fb1aadaddb7b8802eacc0e386

See more details on using hashes here.

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