PTVS icon indicating copy to clipboard operation
PTVS copied to clipboard

Interactive Debugging not working anymore like expected

Open vsfeedback opened this issue 1 year ago • 2 comments

This issue has been moved from a ticket on Developer Community.


[regression] [worked-in:vs 2019 v16.6.5] Hello this week i had to change my virtual maschine for work and i took the chance to upgrad from working with python in visual studio 2019 to 2022. working on big projects with long execution times im really happy to be able to use interactive debugging. to be able to set a breakpoint, change some code and be able to either define new varibales like "testing = 1" and make them available immediatly either in the watch window or by running the quick watch on this highlighted line. sadly now i get this error -> SyntaxError('invalid syntax', ('', 1, 9, 'testing = 1')). when i evaluate expressions like "1 + 1" the watch and quick watch windows are still working. i searched for 2 days now and could not find any solution. today i even tought about going back to visual studio 2019 v16.11 and to my surprise its still not working! on my old virutal maschine i had VS 2019 v16.5 which is not available to download anymore, so i went back to v16.4 and i still get the same error!!! now i also upgraded to python 3.10 with the new machine and since i got a notice telling me its not supported yet by Visual studio i figured i can try old python versions as well (altough im 100% sure i should not be connected to the interpreter). i tried python version 3.9 and still got the same error. i even went back to the same python version as i had on my old machine v3.7 with vs 2019 v16.4 and still invalid syntax. this is really really frustrating and slows down my workflow so much now. not to forget that i almost lost 2 days researching about this problem. please tell me how to fix this problem? greetings jan kohlschuetter


Original Comments

Feedback Bot on 5/10/2023, 07:25 PM:

(private comment, text removed)


Original Solutions

(no solutions)

vsfeedback avatar Jun 21 '23 16:06 vsfeedback

Thanks for the issue. Would you be able to provide a minimal, self-contained code sample with repro steps that we can use to repro your issue?

StellaHuang95 avatar Jun 21 '23 21:06 StellaHuang95

well i just opened a complete new project and like i explained before i wrote the line testing = 1 i made a breakpoint at that only line started this one line python code when it stopped there, i highlighted the line and pressed shift +f9 to get to the watch window and still i get the same exact error SyntaxError('invalid syntax', ('', 1, 9, 'testing = 1')) that is as minimal as it gets thanx for your help

janPlan avatar Jun 28 '23 01:06 janPlan