Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose a debug compile option #282

Open
barnjamin opened this issue Apr 18, 2022 · 1 comment
Open

Expose a debug compile option #282

barnjamin opened this issue Apr 18, 2022 · 1 comment
Labels

Comments

@barnjamin
Copy link
Contributor

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:

    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.

@barnjamin barnjamin added the new-feature-request Feature request that needs triage label Apr 18, 2022
@ahangsu
Copy link
Contributor

ahangsu commented Mar 8, 2023

A first attempt by Zeph here: #650, we are making src-mapper more performant

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants