Expose a `debug` compile option
Open
community interest
new-feature-request
Team Scytale
- Dominant language
- Python
- Stars
- 288
- Forks
- 138
- PR merge metrics
- No merged PRs in 30d
Description
## Problem
It is difficult to map the `pc` returned from a failed transaction back to the PyTeal source line that caused it.
## Solution
Add a `debug: bool` flag to the compile options and, if set to True, Assert should return something like:
```py
return Assert(And(thing_being_asserted, Int(currentframe().f_back.f_lineno)))
```
This allows the small 3 line stack of the failing program to contain the python source line number.
Other possible debug flag changes might include adding comments to the source teal for source file names or line numbers.
Contributor guide
Assessment
This issue has not been assessed yet.