You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recently started using traceback-with-variables and noticed some inconsistencies in behavior when using different methods to enable traceback enhancements. I would like to clarify whether these behaviors are intended and suggest an improvement for configuring global variable printing more conveniently.
Findings
1. Clickable Stack Trace Navigation
When I import tb.a at the top of my script and run it with:
python my_script.py
I can Cmd+Click (or Ctrl+Click) on file paths in the traceback output to quickly navigate to the corresponding code in my terminal.
However, if I only use:
traceback-with-variables my_script.py
without importing anything, the traceback is still enhanced, but the file paths are not clickable.
Question: Is this expected behavior? If so, could it be documented more explicitly?
2. Global Variable Printing Behavior
Running with:
traceback-with-variables my_script.py
prints global variables by default. But cannot click on it.
Running with:
importtb.a
at the top and executing:
python my_script.py
does NOT print global variables (which is sometimes undesirable). But can click on it.
The only way I found to enable global variable printing while still using python my_script.py so that I can click is to use:
The current method of configuring global variable printing is too complex. Sometimes I need global variables, and sometimes I don't, but right now the only way to configure this is by changing the import statements in my code.
Proposal: Could we introduce a new alias, such as:
importtb.ag# Equivalent to `import tb.a`, but enables global variable printing
This would make it much easier to switch between "with globals" and "without globals" modes, without modifying multiple lines of code, while can click on the traceback to nevigate.
The text was updated successfully, but these errors were encountered:
Description
I recently started using traceback-with-variables and noticed some inconsistencies in behavior when using different methods to enable traceback enhancements. I would like to clarify whether these behaviors are intended and suggest an improvement for configuring global variable printing more conveniently.
Findings
1. Clickable Stack Trace Navigation
tb.a
at the top of my script and run it with:I can Cmd+Click (or Ctrl+Click) on file paths in the traceback output to quickly navigate to the corresponding code in my terminal.
without importing anything, the traceback is still enhanced, but the file paths are not clickable.
2. Global Variable Printing Behavior
prints global variables by default. But cannot click on it.
at the top and executing:
does NOT print global variables (which is sometimes undesirable). But can click on it.
python my_script.py
so that I can click is to use:at the top of my script instead of
import tb.a
.Suggestion
The current method of configuring global variable printing is too complex. Sometimes I need global variables, and sometimes I don't, but right now the only way to configure this is by changing the import statements in my code.
Proposal: Could we introduce a new alias, such as:
The text was updated successfully, but these errors were encountered: