Revision history [back]
turn off auto-evaluate in debugger?
Is there a way to tell Wing not to auto-evaluate a variable in the debugger? Here's my use case: I have a complicate Django ORM query....something like this:
my_results = Foo.objects.filter(....)
And I'm apparently getting a very bad query plan when I execute it. So what I want to do is set a breakpoint and look at my_results.query
, but as soon as I type
>>> my_results
Wing stops. I'm assuming it is trying to evaluate the value of my_results so that it can help with auto-completion, but it's actually causing the underlying query to execute.
UPDATE: I think I have a little workaround. If I type str(my_results.query)
into a text editor, then copy-and-paste that into the debug console, I get my SQL.
turn off auto-evaluate in debugger?
Is there a way to tell Wing not to auto-evaluate a variable in the debugger? Here's my use case: I have a complicate Django ORM query....something like this:
my_results = Foo.objects.filter(....)
And I'm apparently getting a very bad query plan when I execute it. So what I want to do is set a breakpoint and look at my_results.query
, but as soon as I type
>>> my_results
Wing stops. I'm assuming it is trying to evaluate the value of my_results so that it can help with auto-completion, but it's actually causing the underlying query to execute.
UPDATE: I think I have a little workaround. If I type str(my_results.query)
into a text editor, then copy-and-paste that into the debug console, I get my SQL.
turn off auto-evaluate in debugger?
Is there a way to tell Wing not to auto-evaluate a variable in the debugger? Here's my use case: I have a complicate Django ORM query....something like this:
my_results = Foo.objects.filter(....)
And I'm apparently getting a very bad query plan when I execute it. So what I want to do is set a breakpoint and look at my_results.query
, but as soon as I type
>>> my_results
Wing stops. I'm assuming it is trying to evaluate the value of my_results so that it can help with auto-completion, but it's actually causing the underlying query to execute.
UPDATE: I think I have a little workaround. If I type str(my_results.query)
into a text editor, then copy-and-paste that into the debug console, I get my SQL.