microsoft / debugpy

An implementation of the Debug Adapter Protocol for Python
https://pypi.org/project/debugpy/
Other
1.87k stars 138 forks source link

After continue from breakpoint an enter is inserted in my code #1728

Closed AUNL-BartRijvers closed 2 weeks ago

AUNL-BartRijvers commented 2 weeks ago

Environment data

Actual behavior

I'm debuging my python code and put a breakpoint where execution halts without issues. When I however step over, step out, continue with, also an enter is inserted at the cursor position. This sometimes also occurs just before hitting the breakpoint.

Expected behavior

Debug controls should not modify my code

Steps to reproduce:

Edit any python scipt in vscode Put a breakpoint Debug the script, let it hit the breakpoint Put the cursor mid-line Choose step over or continue and the code is changed afterward, an enter has been put at the cursor position

A reboot of my computer did not give other results

Image 1) I put my cursor at this position where the line was still complete with the next line appended. 2) I put a breakpoint there and ran the code in debugger 3) Choose Continue button 4) Code hit the next breakpoint 5) I scrolled back to find the previous break location changed like in the picture, text after the previous cursor position was put at next line

rchiodo commented 2 weeks ago

Thanks for the issue but this wouldn't be debugpy doing this. Debugpy has no code running in VS code. There must be some other extension that's doing something when a debug event occurs.

I would try it again with all other extensions disabled.

AUNL-BartRijvers commented 1 week ago

Thanks, I was working from home yesterday (using bluetooth mouse, different keyboard, different monitor) and now working from office (wired mouse, docking station) and the issue is not seen anymore, I can't reproduce anymore. I will check next time I work from home but I agree to close it.