alexmojaki / birdseye

Graphical Python debugger which lets you easily view the values of all evaluated expressions
https://birdseye.readthedocs.io
MIT License
1.65k stars 71 forks source link

Expressions inside f-strings don't get observed #102

Open Lampe2020 opened 1 year ago

Lampe2020 commented 1 year ago

I have written a lot of little Python3 scripts by now and now I discovered the "Birdseye" debugger in Thonny and tried it out. It's honestly a great debugger with one big flaw:
Inside an f-string, for example

try:
    raise SyntaxError('Oops!')
except Exception as e:
    print(f'{type(e).__name__}: {e}')

It correctly prints out SyntaxError: Oops! but in Birdseye the f-string is just one block: birdseye Would it be possible to split up the f-string into its methods and string parts in Birdseye?

alexmojaki commented 1 year ago

This comes down to https://github.com/gristlabs/asttokens/issues/6. It may be possible to fix this once https://github.com/gristlabs/asttokens/pull/93 is released.