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

Actual breakpoints #67

Open
Almenon opened this issue Dec 24, 2017 · 3 comments
Open

Actual breakpoints #67

Almenon opened this issue Dec 24, 2017 · 3 comments

Comments

@Almenon
Copy link
Owner

Almenon commented Dec 24, 2017

How breakpoints work currently is..... super hacky, but not in a good way. I simply slice off any text after the breakpoint. In simple cases this is okay but obviously it does not work with functions, whoch may be defined on line 1 yet called on line 100.

@Almenon
Copy link
Owner Author

Almenon commented Feb 7, 2018

The workaround for this (in the case of AREPL-vscode) is to simply debug it.

@Almenon
Copy link
Owner Author

Almenon commented Feb 7, 2018

I might be able to do this just by injecting something like the below into the users code:

# define global printLocals func


# later on in code
print(lineNumber, locals())

Or if the user only wants to print locals during a specific iteration:

called=0;called += 1; if called==X: print(lineNumber, locals()) # X being the iteration number

@Almenon
Copy link
Owner Author

Almenon commented May 7, 2018

another way I can use this is by using BDB, the base class for python's pdb debugger.

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

No branches or pull requests

1 participant