Skip to content

Breakpoint ignored when debugging a cell #8803

@kimadeline

Description

@kimadeline

Testing #141223, followed the steps in microsoft/vscode#131469 to set up Jupyter debugging

Environment: macOS 11.6.2, Python 3.10.1, ipykernel==6.7.0
Jupyter extension version 2022.1.1001744497, VS Code 1.64.0-insider commit f93c696

Tried setting a breakpoint in a cell, and the cell would just get executed normally, the breakpoint was ignored.

The cell:

d = "no"
print(f"What is the value of d? {d}")
d = "yes"
print(f"What is the value of d now? {d}")

Content of the Jupyter output channel after I click on the Debug Cell button:

Info 11:52:11: Executing (status idle) silently Code = import ipykernel\nprint(ipykernel.__version__)
Info 11:52:11: Executing silently Code (completed) = import ipykernel\nprint(ipykernel.__version__)
Info 11:52:12: Executing (status idle) silently Code = import debugpy\ndebugpy.debug_this_thread()
Info 11:52:12: Executing silently Code (completed) = import debugpy\ndebugpy.debug_this_thread()
Info 11:52:12: Execute Cells request 3
Info 11:52:12: Execute Cell 3 ~/Documents/Sandbox/notebooks/notebook.ipynb
Info 11:52:12: Cell 3 executed with state Success
Warn 11:52:12: StdErr from Kernel Process [IPKernelApp] ERROR | Exception in control handler:

Warn 11:52:12: StdErr from Kernel Process Traceback (most recent call last):

Warn 11:52:12: StdErr from Kernel Process   File "/Users/kimiguel/Documents/Sandbox/notebooks/.othervenv/lib/python3.10/site-packages/ipykernel/kernelbase.py", line 281, in process_control

Warn 11:52:12: StdErr from Kernel Process     else:

Warn 11:52:12: StdErr from Kernel Process   File "/Users/kimiguel/Documents/Sandbox/notebooks/.othervenv/lib/python3.10/site-packages/ipykernel/kernelbase.py", line 856, in debug_request

Warn 11:52:12: StdErr from Kernel Process     async def debug_request(self, stream, ident, parent):

Warn 11:52:12: StdErr from Kernel Process   File "/Users/kimiguel/Documents/Sandbox/notebooks/.othervenv/lib/python3.10/site-packages/ipykernel/ipkernel.py", line 426, in do_debug_request

Warn 11:52:12: StdErr from Kernel Process     return await self.debugger.process_request(msg)

Warn 11:52:12: StdErr from Kernel Process   File "/Users/kimiguel/Documents/Sandbox/notebooks/.othervenv/lib/python3.10/site-packages/ipykernel/debugger.py", line 606, in process_request

Warn 11:52:12: StdErr from Kernel Process     elif self.is_started:

Warn 11:52:12: StdErr from Kernel Process   File "/Users/kimiguel/Documents/Sandbox/notebooks/.othervenv/lib/python3.10/site-packages/ipykernel/debugger.py", line 348, in stop

Warn 11:52:12: StdErr from Kernel Process     cleanup_transforms = get_ipython().input_transformer_manager.cleanup_transforms

Warn 11:52:12: StdErr from Kernel Process   File "/Users/kimiguel/Documents/Sandbox/notebooks/.othervenv/lib/python3.10/site-packages/ipykernel/debugger.py", line 232, in disconnect_tcp_socket

Warn 11:52:12: StdErr from Kernel Process     def disconnect_tcp_socket(self):

Warn 11:52:12: StdErr from Kernel Process   File "zmq/backend/cython/socket.pyx", line 640, in zmq.backend.cython.socket.Socket.disconnect

Warn 11:52:12: StdErr from Kernel Process zmq.error.ZMQError: No such file or directory

image

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bugimportantIssue identified as high-prioritynotebook-debuggingverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions