Breakpoints in list / dict comprehensions

When I set a breakpoint inside a list or dict comprehension, the debugger does not show all the relevant bound variables when it stops at the breakpoint, even when inside one of the iterations of that iteration. Am I doing something wrong?

return { x : y  ### BREAKPOINT HERE
         for x, y in self.foo  ### OR HERE
         if pred(x) } ### OR HERE

Thanks!
2 comments
Comment actions Permalink
Hi Des! For me PyCharm debugger shows x and y variables standing at the 3rd line - if pref(x)
And it seems correct for me.

What variables are missing for you?
0
Comment actions Permalink
It was a newbie error, sorry for the noise, thanks for the help!

On Oct 16, 2012, at 11:57 AM, Dmitry Trofimov - PyCharm wrote:

PyCharm > Breakpoints in list / dict comprehensions [ debugger + breakpoint ] 12:57 pm Dmitry Trofimov


Hi Des! For me PyCharm debugger shows x and y variables standing at the 3rd line - if pref(x)
And it seems correct for me.

What variables are missing for you?

Des D @ Oct 13


When I set a breakpoint inside a list or dict comprehension, the debugger does not show all the relevant bound variables when it stops at the breakpoint, even when inside one of the iterations of that iteration. Am I doing something wrong?

return { x : y ### BREAKPOINT HERE
for x, y in self.foo ### OR HERE
if pred(x) } ### OR HERE

Thanks!
0

Please sign in to leave a comment.