mfussenegger / nvim-dap-python

An extension for nvim-dap, providing default configurations for python and methods to debug individual test methods or classes.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Breakpoints does not work

gohm44 opened this issue · comments

Steps:

  • set some breakepoint lua require'dap'.toggle_breakpoint()
  • start debugging lua require'dap'.continue()

Observed behaviors:
Breaking points are ignored the program goes to the end without interrupting

My dap configuration:

local dap_python = require('dap-python')
dap_python.setup('/home/gohm/.pyenv/versions/debugpy/bin/python')

local dap = require 'dap'

dap.adapters.c = {
    type = 'executable',
    attach = {pidProperty = "pid", pidSelect = "ask"},
    command = 'lldb-vscode', -- my binary was called 'lldb-vscode-11'
    env = {LLDB_LAUNCH_FLAG_LAUNCH_IN_TTY = "YES"},
    name = "lldb"
}

dap.configurations.c = {
    {
        name = "moje",
        type = 'c',
        request = 'launch',
        program = 'main',
        --[[ args = {
     '--headless',
     '-c', 'echo getcompletion("vim.api.nvim_buf_", "lua")',
     '-c', 'qa!'
   }, ]]
        cwd = nil,
        environment = nil,
        externalConsole = false,
        MIMode = 'lldb'
    }
}

-- show virtual text for current frame (recommended)
-- vim.g.dap_virtual_text = true
-- request variable values for all frames (experimental)
vim.g.dap_virtual_text = 'all frames'

require('telescope').load_extension('dap')
require("dapui").setup()

C adapter working fine. And also I did try minimal configuration only with python but the effect is still the same.

Are you using python 3.9.3? That release broke ABI compatibility, see microsoft/debugpy#587

Yes. You are right I am using 3.9.3. So the solution is very simple. To use another version. Thanks!