1
Vote

Changes made in Python Debug Interactive window are not reflected in Locals or Watch windows

description

Repro:

1) Create a python application project with its default .py file containing:
i = 0
print(i)
2) Set a breakpoint on the first line

3) Start debugging

4) While broken in the debugger on the first line, add a watch item for 'i'
Watch window contains 'i' with a value of not defined
Local window does not contain 'i'
5) Debug step to the second line
Watch window contains 'i' with a value of 0
Local window contains 'i' with a value of 0
6) Open the Python Debug Interactive window (Tools\Python Tools\Python Debug Interactive)

7) In the Python Debug Interactive window type 'i = 1' followed by enter

Result:
Watch window still contains 'i' with a value of 0
Local window still contains 'i' with a value of 0
Expected:
Watch window should contain 'i' with a value of 1
Local window should contain 'i' with a value of 1
Note:
Debug stepping over the second line correctly prints the value of 'i' updated in the debug interactive window.

comments

ZachA wrote Oct 18, 2012 at 4:33 PM

This was repro-ed for an "all user" install of 1.5 over VS2010 on Win8

Ptools wrote Oct 19, 2012 at 10:02 PM

May need support from the debugger team to do this (refresh).

dinov wrote Nov 28, 2012 at 10:53 PM

Could potentially do a dummy step which the debugger responds to as a nop, and then VS refreshes after the step.

ZachA wrote Aug 20, 2013 at 9:52 PM

Fixed in 2.0RC

** Closed by ZachA 08/20/2013 2:52PM

ZachA wrote Aug 20, 2013 at 9:53 PM

A regression from this fix is captured in https://pytools.codeplex.com/workitem/1680

Zooba wrote Aug 20, 2013 at 10:41 PM

This results in a deadlock, probably due to a later fix.

ZachA wrote Aug 21, 2013 at 8:08 PM

We have decided to revert the fix for this bug. Unfortunately, there is no public API in the VS debugger infrastructure to either ask to refresh break state (locals, etc.) without affecting focus, or to get an event when break state handling, including focus handling, is complete. This leaves our solution to keeping break state (locals, etc.) up to date with changes in the debug REPL with the nasty side effect of automatically changing focus to the editor window. These changes back out this original fix, as the bad side effect outweighs the improvement of keeping break state in sync.

Reverting the changes effectively fixes the spurious deadlock issue.

Zooba wrote Aug 22, 2013 at 10:01 PM

Changing back to Proposed, since there is no fix checked in yet.