Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 9 additions & 3 deletions docs/dap/user-defined-dap/python-debugpy.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ if __name__ == "__main__":
main()
```

![Set Breakpoint](../images/python-debugpy/set_breakpoint.png)
![Breakpoint hit](../images/python-debugpy/breakpoint_hit.png)

## Configure DAP server

Expand Down Expand Up @@ -105,9 +105,15 @@ in the IntelliJ console. Read [Python debugging in VS Code](https://code.visuals
## Set Breakpoint

After applying the run configuration, you should set a breakpoint to files which matches file mappings.
Set a breakpoint in the `test.py` file:
Setting a breakpoint requires two steps due to the default Python Line Breakpoint type provided by PyCharm:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am sorry to be not clear. When you are not using PyCharm like IJ community you have not this issue.

Please separate your content in 2 sections : with and without PyCharm.

I say if you are using PyCharm you need 2 steps otherwise you can just set the breakpoint in one step with community

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure I follow. I just tried using Intellij IDEA CE, created a python project, installed LSP4IJ, and configured a python-debugpy DAP. I still have take both steps to get a DAP Breakpoint. Can you show me how you are avoiding the second step?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem comes from when a file can accept several breakpoint type.

If the file accept just one breakpoint type, you add te breakpoint just by clickong on the editor gutter. With IC you should not having python breakpoint type, just dap breakpoint type.

With PyCharm it provides python line breakpoint type so you need to do te 2 steps to create dap breakpoint type and not python line breakpoint type

Copy link
Author

@scweber-cisco scweber-cisco Oct 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you seeing this behavior in Python files, or in other source code types? I am not able to see DAP Breakpoint as the one and only breakpoint type in Python files either in PyCharm, or in IDEA CE. This particular file that I'm modifying in this PR is specific to Python, correct? I'm happy to adjust the text here to be less specific, if that would be better? Something like "Setting a breakpoint may require two steps in some files due to multiple breakpoint types being defined" 🤷


![Set Breakpoint](../images/python-debugpy/set_breakpoint.png)
Step 1: Click on the line number in the gutter where you want the breakpoint to set a Python Breakpoint
![Set Breakpoint Step 1](../images/python-debugpy/set_breakpoint_step_1.png)

Step 2: Click on the faded red dot next to the code on the same line to create a **DAP Breakpoint**
![Set Breakpoint Step 2](../images/python-debugpy/set_breakpoint_step_2.png)

Please note that if you only set the Python Breakpoint (step 1), then the breakpoint will not be hit. You must complete both steps.

## Start Python program in a Terminal

Expand Down
Loading