We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
To reproduce: 1 - create a file test.ipy:
test.ipy
def fun(): res = 1 %debug print(res) fun()
2 - run with ipython test.ipy 3 - After pressing continue on the pdb promt, I get: NameError: name 'res' is not defined
ipython test.ipy
NameError: name 'res' is not defined
This is in contrast with the following code, which works:
def fun(): res = 1 %timeit print(res) fun()
The difference seems to be that the timeit magic is decorated with @needs_local_scope
timeit
@needs_local_scope
The text was updated successfully, but these errors were encountered:
PR: Add needs_local_scope to debug magic (#13960)
83f90a3
Fixes #13959
Successfully merging a pull request may close this issue.
To reproduce:
1 - create a file
test.ipy
:2 - run with
ipython test.ipy
3 - After pressing continue on the pdb promt, I get:
NameError: name 'res' is not defined
This is in contrast with the following code, which works:
The difference seems to be that the
timeit
magic is decorated with@needs_local_scope
The text was updated successfully, but these errors were encountered: