Skip to main content

Trace Python functions into a color coded HTML log file.

Project description

I had to refactor a big file, and needed to know which functions are called and in which order when i click a button in the UI. I used this in a python file, with a UI from Qt Creator. The output is a HTML file with color codes.

Pink = name of function that is called Blue = file name and line number

The is a division line between different button clicks, and the call order is indented.

To use it: call the enable_tracing() function at the start of the program, and the disable_tracing() at the end of the program.

Example: import FunctionTraceHTML FunctionTraceHTML.set_project_path(os.path.dirname(os.path.abspath(file)))

from FunctionTraceHTML import FunctionTrace
FunctionTrace.enable_tracing()

--- CODE ---

app = QApplication(sys.argv)
window = QWidget()
window.show()
app.exec()

FunctionTrace.disable_tracing()

This package was made by me, (charlie-de-muis on GitHub) with the help of ChatGPT. It isn't broadly tested, but seems to work perfectly fine. I'm not responsible if anything goes wrong, use at your own risk :)

Project details


Release history Release notifications | RSS feed

This version

1.1

Download files

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

Source Distribution

functiontracehtml-1.1.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

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

functiontracehtml-1.1-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file functiontracehtml-1.1.tar.gz.

File metadata

  • Download URL: functiontracehtml-1.1.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.0

File hashes

Hashes for functiontracehtml-1.1.tar.gz
Algorithm Hash digest
SHA256 119e3eb3cf6f36f0f32861a64e7d5d2990aad9a32a74e57005f5686c1aaffe01
MD5 ad1dd63298cedaf10262b045405cc1aa
BLAKE2b-256 b1173e57ddbd7e4d6b3e2fe2922270f7956bba95997a8740abd95c55d69b6918

See more details on using hashes here.

File details

Details for the file functiontracehtml-1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for functiontracehtml-1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0a16c5824eee334c6d1674bb05de7ab6f65c5e199b791defdbbbeb6990eb3b58
MD5 692c464943146f9c83a40e3b5f5f779d
BLAKE2b-256 628077008abd215df13354601b3554a4b8ad2dbca5d2f5382f4250276b125431

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