deshaw / pyflyby

A set of productivity tools for Python
https://deshaw.github.io/pyflyby/
Other
349 stars 52 forks source link

[New] A utility to dump info for debugging / reproducing #355

Open saharan-deshaw opened 4 weeks ago

saharan-deshaw commented 4 weeks ago

Hi,

Logging this issue as an FYI that we (D.E. Shaw) will be contributing a utility to the pyflyby repo that can be used for debugging and reproducing any issues.

Background: Sometimes it’s challenging to share a reproducer with other teams when an issue originates from their code. Users will be able to use this utility to dump useful info into a file and share it with the other team so that they can reproduce the issue themselves.

Info dumped in the file: This utility will dump the error stack frames into the file in a pickled form, specifically the values of the local variables from the stack frames. By default, only the last frame from the bottom will be dumped. The utility will provide options to configure the frames and the variables that the user wants to dump.

This utility will be provided with two interfaces:

  1. As a script: For cases where the user wants to create a dump file for their failing script or command.
  2. As a function: For interactive cases. For instance, if the user is already in an IPython debugger, they can use this function to dump the required info.
saharan-deshaw commented 2 weeks ago

Raised the PR against this issue: https://github.com/deshaw/pyflyby/pull/356