You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Breakpoints appear to no longer be sent by DAP, neither during initial attach, nor if I add/remove a breakpoint while the debug session is active.
Looking at the message trace, I see setExceptionBreakpoints being sent with an uncaught exception breakpoint, but setBreakpoints is never sent.
PyCharm definitely thinks I have a breakpoint set:
But my attach trace looks like this:
Attaching 'Python- Debugpy' at main:5678
[Trace - 11:14:25] Received notification 'output'
[Trace - 11:14:25] Received notification 'output'
[Trace - 11:14:25] Received notification 'debugpySockets'
[Trace - 11:14:25] Sending request 'initialize - (1)'.
[Trace - 11:14:25] Received response 'initialize - (1)' in 6ms.
[Trace - 11:14:25] Sending request 'attach - (2)'.
[Trace - 11:14:25] Received notification 'debugpyWaitingForServer'
[Trace - 11:14:26] Received notification 'initialized'
[Trace - 11:14:26] Sending request 'setExceptionBreakpoints - (3)'.
[Trace - 11:14:26] Received response 'setExceptionBreakpoints - (3)' in 51ms.
[Trace - 11:14:26] Sending request 'configurationDone - (4)'.
[Trace - 11:14:26] Received response 'configurationDone - (4)' in 47ms.
[Trace - 11:14:26] Received response 'attach - (2)' in 244ms.
I'm using 0.16.1 plugin, but I also tried with every version down to and including 0.11.0 with no luck. Maybe there was a platform change in the Intellij platform that broke something?
I'm using PyCharm 2025.2.0.1
Build #PY-252.23892.515, built on August 11, 2025
Yes, it did work before. I don't remember exactly when the last time it worked was, unfortunately. I regenerated the config and the only difference is that the new one doesn't have <option name="serverTrace" value="verbose" />. Still no luck.
I'm not sure what you mean by the breakpoint type being Debug Adapter Protocol? These are the only breakpoint types that I am offered when I click the + button:
I have tried with Java file which have Java Breakpoint and I have defined a fake DAP server with Java mapping.
When I set a breakpoint to a line, IJ ask me which breakpoint type I need to create:
I need to create on DAP to create this type.
Otherwise breakpoints are stored (with my case) in MY_PROJECT/.idea/workspace.xml, try to take an existing breakpoint and change the attribute type to type="dap-breakpoint" (just to test)
Got it. So, if I manually change that in the workspace.xml and then restart PyCharm, it does recognize it as a DAP Breakpoint. I do also see now how I can set the DAP Breakpoint in the UI by first clicking in the gutter to enable a Python breakpoint, and then clicking on the line to enable a DAP breakpoint in the same spot.
That breakpoint then does get sent over when I attach, and it does get hit as well! I can see the DAP collecting stackTrace, scopes, variables. I am able to inspect values of variables in the editor pane. I'm even able to continue. However, the Threads & variables section of the debugger locks up, I believe when it is attempting to render the stack frame into the PyCharm UI:
java.lang.IllegalArgumentException: Argument for @NotNull parameter 'sourceName' of com/redhat/devtools/lsp4ij/dap/client/files/DAPFileRegistry.getOrCreateDAPFile must not be null
at com.redhat.devtools.lsp4ij.dap.client.files.DAPFileRegistry.$$$reportNull$$$0(DAPFileRegistry.java)
at com.redhat.devtools.lsp4ij.dap.client.files.DAPFileRegistry.getOrCreateDAPFile(DAPFileRegistry.java)
at com.redhat.devtools.lsp4ij.dap.client.DAPStackFrame.doGetSourcePosition(DAPStackFrame.java:94)
at com.redhat.devtools.lsp4ij.dap.client.DAPStackFrame.getSourcePosition(DAPStackFrame.java:84)
at com.intellij.xdebugger.impl.frame.XStackFramesListColorsCache$Monolith.get(XStackFrameColorsCacheProvider.kt:52)
at com.intellij.xdebugger.impl.frame.XDebuggerFramesList.getFrameBgColor(XDebuggerFramesList.java:266)
at com.intellij.xdebugger.impl.frame.XDebuggerFramesList$XDebuggerFrameListRenderer.customizeCellRenderer(XDebuggerFramesList.java:375)
at com.intellij.ui.ColoredListCellRenderer.getListCellRendererComponent(ColoredListCellRenderer.java:45)
at com.intellij.xdebugger.impl.frame.XDebuggerFramesList$XDebuggerGroupedFrameListRenderer.getListCellRendererComponent(XDebuggerFramesList.java:304)
at com.intellij.ui.ExpandedItemListCellRendererWrapper.getListCellRendererComponent(ExpandedItemListCellRendererWrapper.java:24)
at com.intellij.ui.components.WideSelectionListUI.updateLayoutState(WideSelectionListUI.java:198)
at java.desktop/javax.swing.plaf.basic.BasicListUI.maybeUpdateLayoutState(BasicListUI.java:1394)
at java.desktop/javax.swing.plaf.basic.BasicListUI$Handler.valueChanged(BasicListUI.java:2815)
at java.desktop/javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:231)
at java.desktop/javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:206)
at java.desktop/javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:258)
at java.desktop/javax.swing.DefaultListSelectionModel.changeSelection(DefaultListSelectionModel.java:459)
at java.desktop/javax.swing.DefaultListSelectionModel.changeSelection(DefaultListSelectionModel.java:469)
at java.desktop/javax.swing.DefaultListSelectionModel.setSelectionInterval(DefaultListSelectionModel.java:513)
at java.desktop/javax.swing.JList.setSelectedIndex(JList.java:2232)
at com.intellij.xdebugger.impl.frame.XDebuggerFramesList.selectFrame(XDebuggerFramesList.java:222)
at com.intellij.xdebugger.impl.frame.XFramesView$StackFramesListBuilder.selectFrame(XFramesView.java:751)
at com.intellij.xdebugger.impl.frame.XFramesView$StackFramesListBuilder.selectCurrentFrame(XFramesView.java:732)
at com.intellij.xdebugger.impl.frame.XFramesView$StackFramesListBuilder.lambda$addStackFrames$0(XFramesView.java:642)
at com.intellij.openapi.application.TransactionGuardImpl$1.run(TransactionGuardImpl.java:205)
at com.intellij.openapi.application.impl.AppImplKt$runnableUnitFunction$1.invoke(appImpl.kt:104)
at com.intellij.openapi.application.impl.AppImplKt$runnableUnitFunction$1.invoke(appImpl.kt:104)
at com.intellij.platform.locking.impl.NestedLocksThreadingSupport.doRunWriteIntentReadAction(NestedLocksThreadingSupport.kt:666)
at com.intellij.platform.locking.impl.NestedLocksThreadingSupport.runPreventiveWriteIntentReadAction(NestedLocksThreadingSupport.kt:640)
at com.intellij.platform.locking.impl.NestedLocksThreadingSupport.runWriteIntentReadAction(NestedLocksThreadingSupport.kt:633)
at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:1022)
at com.intellij.openapi.application.impl.ApplicationImpl$6.run(ApplicationImpl.java:574)
at com.intellij.util.concurrency.ChildContext$runInChildContext$1.invoke(propagation.kt:167)
at com.intellij.util.concurrency.ChildContext$runInChildContext$1.invoke(propagation.kt:167)
at com.intellij.util.concurrency.ChildContext.runInChildContext(propagation.kt:173)
at com.intellij.util.concurrency.ChildContext.runInChildContext(propagation.kt:167)
at com.intellij.util.concurrency.ContextRunnable.run(ContextRunnable.java:27)
at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:122)
at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:43)
at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:781)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:728)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:722)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:750)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.kt:595)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:488)
at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$12$lambda$11$lambda$10$lambda$9(IdeEventQueue.kt:313)
at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:865)
at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$12$lambda$11$lambda$10(IdeEventQueue.kt:312)
at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$3(IdeEventQueue.kt:974)
at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:110)
at com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:974)
at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$12(IdeEventQueue.kt:307)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.kt:347)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92)
Got it. So, if I manually change that in the workspace.xml and then restart PyCharm, it does recognize it as a DAP Breakpoint. I do also see now how I can set the DAP Breakpoint in the UI by first clicking in the gutter to enable a Python breakpoint, and then clicking on the line to enable a DAP breakpoint in the same spot.
That breakpoint then does get sent over when I attach, and it does get hit as well! I can see the DAP collecting stackTrace, scopes, variables. I am able to inspect values of variables in the editor pane. I'm even able to continue. However, the Threads & variables section of the debugger locks up, I believe when it is attempting to render the stack frame into the PyCharm UI:
java.lang.IllegalArgumentException: Argument for @NotNull parameter 'sourceName' of com/redhat/devtools/lsp4ij/dap/client/files/DAPFileRegistry.getOrCreateDAPFile must not be null
at com.redhat.devtools.lsp4ij.dap.client.files.DAPFileRegistry.$$$reportNull$$$0(DAPFileRegistry.java)
at com.redhat.devtools.lsp4ij.dap.client.files.DAPFileRegistry.getOrCreateDAPFile(DAPFileRegistry.java)
at com.redhat.devtools.lsp4ij.dap.client.DAPStackFrame.doGetSourcePosition(DAPStackFrame.java:94)
at com.redhat.devtools.lsp4ij.dap.client.DAPStackFrame.getSourcePosition(DAPStackFrame.java:84)
at com.intellij.xdebugger.impl.frame.XStackFramesListColorsCache$Monolith.get(XStackFrameColorsCacheProvider.kt:52)
at com.intellij.xdebugger.impl.frame.XDebuggerFramesList.getFrameBgColor(XDebuggerFramesList.java:266)
at com.intellij.xdebugger.impl.frame.XDebuggerFramesList$XDebuggerFrameListRenderer.customizeCellRenderer(XDebuggerFramesList.java:375)
at com.intellij.ui.ColoredListCellRenderer.getListCellRendererComponent(ColoredListCellRenderer.java:45)
at com.intellij.xdebugger.impl.frame.XDebuggerFramesList$XDebuggerGroupedFrameListRenderer.getListCellRendererComponent(XDebuggerFramesList.java:304)
at com.intellij.ui.ExpandedItemListCellRendererWrapper.getListCellRendererComponent(ExpandedItemListCellRendererWrapper.java:24)
at com.intellij.ui.components.WideSelectionListUI.updateLayoutState(WideSelectionListUI.java:198)
at java.desktop/javax.swing.plaf.basic.BasicListUI.maybeUpdateLayoutState(BasicListUI.java:1394)
at java.desktop/javax.swing.plaf.basic.BasicListUI$Handler.valueChanged(BasicListUI.java:2815)
at java.desktop/javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:231)
at java.desktop/javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:206)
at java.desktop/javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:258)
at java.desktop/javax.swing.DefaultListSelectionModel.changeSelection(DefaultListSelectionModel.java:459)
at java.desktop/javax.swing.DefaultListSelectionModel.changeSelection(DefaultListSelectionModel.java:469)
at java.desktop/javax.swing.DefaultListSelectionModel.setSelectionInterval(DefaultListSelectionModel.java:513)
at java.desktop/javax.swing.JList.setSelectedIndex(JList.java:2232)
at com.intellij.xdebugger.impl.frame.XDebuggerFramesList.selectFrame(XDebuggerFramesList.java:222)
at com.intellij.xdebugger.impl.frame.XFramesView$StackFramesListBuilder.selectFrame(XFramesView.java:751)
at com.intellij.xdebugger.impl.frame.XFramesView$StackFramesListBuilder.selectCurrentFrame(XFramesView.java:732)
at com.intellij.xdebugger.impl.frame.XFramesView$StackFramesListBuilder.lambda$addStackFrames$0(XFramesView.java:642)
at com.intellij.openapi.application.TransactionGuardImpl$1.run(TransactionGuardImpl.java:205)
at com.intellij.openapi.application.impl.AppImplKt$runnableUnitFunction$1.invoke(appImpl.kt:104)
at com.intellij.openapi.application.impl.AppImplKt$runnableUnitFunction$1.invoke(appImpl.kt:104)
at com.intellij.platform.locking.impl.NestedLocksThreadingSupport.doRunWriteIntentReadAction(NestedLocksThreadingSupport.kt:666)
at com.intellij.platform.locking.impl.NestedLocksThreadingSupport.runPreventiveWriteIntentReadAction(NestedLocksThreadingSupport.kt:640)
at com.intellij.platform.locking.impl.NestedLocksThreadingSupport.runWriteIntentReadAction(NestedLocksThreadingSupport.kt:633)
at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:1022)
at com.intellij.openapi.application.impl.ApplicationImpl$6.run(ApplicationImpl.java:574)
at com.intellij.util.concurrency.ChildContext$runInChildContext$1.invoke(propagation.kt:167)
at com.intellij.util.concurrency.ChildContext$runInChildContext$1.invoke(propagation.kt:167)
at com.intellij.util.concurrency.ChildContext.runInChildContext(propagation.kt:173)
at com.intellij.util.concurrency.ChildContext.runInChildContext(propagation.kt:167)
at com.intellij.util.concurrency.ContextRunnable.run(ContextRunnable.java:27)
at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:122)
at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:43)
at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:781)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:728)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:722)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:750)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.kt:595)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:488)
at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$12$lambda$11$lambda$10$lambda$9(IdeEventQueue.kt:313)
at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:865)
at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$12$lambda$11$lambda$10(IdeEventQueue.kt:312)
at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$3(IdeEventQueue.kt:974)
at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:110)
at com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:974)
at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$12(IdeEventQueue.kt:307)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.kt:347)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92)
I am happy that you have fixed your issue.
Could you please create a new issue with your new problem please.
Could you share your dap traces in the new issue as verbose when you have this problem please.
@scweber-cisco I close the issue since it was the wrong breakpoint which was used.
@scweber-cisco I am pretty sure that some other people will have the same problem than you, please contribute to the doc with a screenshot to explain that DAP breakpoint must be used. Thanks!
Activity
angelozerr commentedon Sep 24, 2025
First breakpoint type must be Debug Asapter Protocol and not Python.
Is it working before?
If yes could you remove your run config and recreate it.
scweber-cisco commentedon Sep 24, 2025
Yes, it did work before. I don't remember exactly when the last time it worked was, unfortunately. I regenerated the config and the only difference is that the new one doesn't have
<option name="serverTrace" value="verbose" />. Still no luck.I'm not sure what you mean by the breakpoint type being Debug Adapter Protocol? These are the only breakpoint types that I am offered when I click the + button:
angelozerr commentedon Sep 24, 2025
Have yiu tried to recreate the run config?
angelozerr commentedon Sep 24, 2025
I remember that I have renamed the dap configuration type, so you will not have the capability to add dap breakpoint like you are noticing.
So please remove the run config and create it again
scweber-cisco commentedon Sep 24, 2025
I re-created following the instructions at https://github.com/redhat-developer/lsp4ij/tree/main/docs/dap/user-defined-dap/python-debugpy.md and still have the same problem. Here's what my config looks like:
angelozerr commentedon Sep 24, 2025
It looks good.
You need to use DAP breakpoint:
scweber-cisco commentedon Sep 24, 2025
Hmm, how do I get that Breakpoint type to be available in PyCharm?
angelozerr commentedon Sep 24, 2025
I have tried with Java file which have Java Breakpoint and I have defined a fake DAP server with Java mapping.
When I set a breakpoint to a line, IJ ask me which breakpoint type I need to create:
I need to create on DAP to create this type.
Otherwise breakpoints are stored (with my case) in MY_PROJECT/.idea/workspace.xml, try to take an existing breakpoint and change the attribute type to type="dap-breakpoint" (just to test)
Restart your IJ.
scweber-cisco commentedon Sep 24, 2025
Got it. So, if I manually change that in the workspace.xml and then restart PyCharm, it does recognize it as a DAP Breakpoint. I do also see now how I can set the DAP Breakpoint in the UI by first clicking in the gutter to enable a Python breakpoint, and then clicking on the line to enable a DAP breakpoint in the same spot.
That breakpoint then does get sent over when I attach, and it does get hit as well! I can see the DAP collecting stackTrace, scopes, variables. I am able to inspect values of variables in the editor pane. I'm even able to continue. However, the Threads & variables section of the debugger locks up, I believe when it is attempting to render the stack frame into the PyCharm UI:
angelozerr commentedon Sep 24, 2025
I am happy that you have fixed your issue.
Could you please create a new issue with your new problem please.
Could you share your dap traces in the new issue as verbose when you have this problem please.
angelozerr commentedon Sep 25, 2025
@scweber-cisco could you add a note in https://github.com/redhat-developer/lsp4ij/blob/main/docs/dap/user-defined-dap/python-debugpy.md#set-breakpoint which explains that if user uses PyCharm it need to create the proper DAP breakpoint by adding a screenshot like I did with the Java sample. Thanks!
angelozerr commentedon Oct 2, 2025
@scweber-cisco I close the issue since it was the wrong breakpoint which was used.
@scweber-cisco I am pretty sure that some other people will have the same problem than you, please contribute to the doc with a screenshot to explain that DAP breakpoint must be used. Thanks!
scweber-cisco commentedon Oct 2, 2025
Sure thing, please see #1310