Skip to content

Code finishes fully executing after 'Disconnect' / Shift-F5 / terminate debugging #1686

@karthiknadig

Description

@karthiknadig

Discussed in microsoft/vscode-python#24205

Originally posted by PeterMuhlberger September 28, 2024
I recently ran into this: While doing a little step-through debugging with the vscode Python Debugger (extension), I tried to terminate the debugger by pressing the icon to disconnect the debugger. Instead of ending with a KeyBoardInterrupt as usual, the code after the breakpoint ran completely, creating quite a mess. The same problem occurs if I use Shift-F5, but not when I use the small square that terminates cell execution. I've tried a wide range of possible fixes to the problem, but it persists.

Before going any further, I should ask if this is the right place to report this problem and whether I should report it directly to Issues here? Beyond this: has anyone else run into this? Any suggested solutions?

(I've tried, among other things: Reinstalling my Python and Jupyter extensions; installing 2 month old versions of these extensions (before this problem started happening); disabling other extensions; inserting the default launch.json file in my workspace; trying to see if the problem occurs in a new notebook file outside the workspace I encountered the problem initially (it does); checking if setting the breakpoint above the initial line still causes continued code execution (it does); looking for potentially problematic lines in settings.json (saw none)).

Metadata

Metadata

Assignees

Labels

needs reproIssue has not been reproduced yet

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions