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
After a recent update, ipdb does not show current line and context in jupyter notebook anymore. The 'l' command works fine, though. So I have to run 'l' after every single 'n' manually.
I've traced down the problem and the source is the direction of the slashes. The function format_stack_entry receives a frame object with mixed slashes: <frame at 0x000001F092B6A388, file 'C:\Users\ASUS\AppData\Local\Temp/ipykernel_20044/714112756.py', line 2, code f>
Then the 'l' command (do_list) queries linecache with this mixed slashes and succeeds, while the print_stack_entry canonizes the filename so that it looks like 'C:\Users\ASUS\AppData\Local\Temp\ipykernel_20044\714112756.py' (note two last slashes are now forward slashes, not backslashes) — and linecache returns an empty list.
Did not dig deeper, but this quick and dirty workaround helps:
I ran git blame against IPython/core/debugger.py and this particular line is >10 years old, so it is definitely not the source of the problem, but this fix works for me.
The text was updated successfully, but these errors were encountered:
axil
changed the title
ipdb broken in jupyter on windows 10
ipdb broken in jupyter notebook on windows 10
Feb 26, 2022
After a recent update, ipdb does not show current line and context in jupyter notebook anymore. The 'l' command works fine, though. So I have to run 'l' after every single 'n' manually.
I've traced down the problem and the source is the direction of the slashes. The function format_stack_entry receives a frame object with mixed slashes: <frame at 0x000001F092B6A388, file 'C:\Users\ASUS\AppData\Local\Temp/ipykernel_20044/714112756.py', line 2, code f>
Then the 'l' command (
do_list
) querieslinecache
with this mixed slashes and succeeds, while theprint_stack_entry
canonizes the filename so that it looks like 'C:\Users\ASUS\AppData\Local\Temp\ipykernel_20044\714112756.py' (note two last slashes are now forward slashes, not backslashes) — andlinecache
returns an empty list.Did not dig deeper, but this quick and dirty workaround helps:
I ran
git blame
againstIPython/core/debugger.py
and this particular line is >10 years old, so it is definitely not the source of the problem, but this fix works for me.The text was updated successfully, but these errors were encountered: