atxtechbro / atxtechbro/dotfiles
Fix declarative breakpoints in launch.json not being recognized by DAP
- Dominant language
- Shell
- Stars
- 27
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
## Bug Report: Declarative Breakpoints in launch.json Not Working
### Description
When using the Debug Adapter Protocol (DAP) with our Neovim configuration, breakpoints defined declaratively in `launch.json` are not being recognized or honored when starting a debug session with F5. This defeats the purpose of having a declarative debugging configuration.
### Current Behavior
1. We create a `launch.json` file with clearly defined breakpoints at key locations in the code
2. When pressing F5, the debugger starts but doesn't recognize or stop at these breakpoints
3. The only workaround is to manually insert `breakpoint()` calls directly in the code
### Expected Behavior
1. Define breakpoints in `launch.json` without modifying source code
2. Press F5 to start debugging
3. Debugger automatically stops at the specified breakpoints
4. Easily update breakpoint locations as needed through the configuration file
5. Share debugging configurations with team members
### Possible Causes
1. Path resolution issues between the debugger and the source files
2. Configuration mismatches between the Python debugger and Neovim
3. Issues with how pytest is being invoked in debug mode
4. Missing or incomplete DAP adapter setup
### Reproduction Steps
1. Create a Python project with a `launch.json` file containing breakpoint definitions
2. Start a debug session with F5
3. Observe that the debugger runs but doesn't stop at the defined breakpoints
### Environment
- Neovim configuration from our dotfiles repository
- nvim-dap for Debug Adapter Protocol support
- Python debugging with debugpy
### Relevant Configuration
Our current `launch.json.example` template:
```json
{
"version": "0.2.0",
"configurations": [
{
"type": "python",
"request": "launch",
"name": "Launch Current File",
"program": "${file}",
"console": "integratedTerminal"
},
{
"name": "Launch C/C++ Program",
"type": "lldb",
"request": "launch",
"program": "${workspaceFolder}/build/",
"args": [],
"cwd": "${workspaceFolder}"
}
]
}
```
### Impact
This issue significantly hampers the debugging workflow, forcing developers to:
1. Modify source code to insert breakpoints
2. Remember to remove these breakpoints before committing
3. Lose the benefits of a declarative debugging approach
4. Have an inconsistent debugging experience
### Proposed Solution
Investigate and fix the underlying configuration issues to ensure that:
1. The DAP implementation correctly reads and registers breakpoints from `launch.json`
2. Path resolution works correctly between the debugger and source files
3. The debugger properly stops at the specified breakpoints
4. The solution follows our "spilled coffee" principle for consistent environments across machines
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.