dape icon indicating copy to clipboard operation
dape copied to clipboard

Cannot set debug configuration (gdb/C++)

Open apalazzi opened this issue 5 months ago • 2 comments

I'm trying to set a debug configuration for my c++ project, but whatever I do it doesn't work, when I run M-x dape I'm prompted with

Run adapter: :type
---
gdb :request
launch :name
run with gdb :program
/path/to/build/app :cwd
/path/to/build :args
nil nil

I've put this in my init.el, but the result is the same if I put it .dir-locals.el

(setq dape-configs
      (list
       (list
        :type "gdb"
        :request "launch"
        :name "Run with gdb"
        :program "/full/path/to/your/build/funilib-test-app"
        :cwd "/full/path/to/your/build"
        :args nil))
      )

I also tried variations like

(
 (c-mode
  . ((dape-configs
      . ((:type "gdb"
                :request "launch"
                :name "Run with gdb"
                :program "${workspaceFolder}/build/funilib-test-app"
                :cwd "${workspaceFolder}"
                :args ())))))
 (c++-mode
  . ((dape-configs
      . ((:type "gdb"
                :request "launch"
                :name "Run with gdb"
                :program "${workspaceFolder}/build/funilib-test-app"
                 :cwd "${workspaceFolder}"
                :args ())))))
)

Still the same issue.

As it is the package is unusable, can someone please tell me what to do to configure dape for debugging?

apalazzi avatar Jul 01 '25 08:07 apalazzi

Hello, you should be fine using the built in configuration for gdb.

Navigate to you project root dape followed Run adapter: gdb - build/funilib-test-app

svaante avatar Sep 09 '25 20:09 svaante

So the debug configuration doesn't work and I have each time to navigate to my project root, set by hand the command line, parameters etc and run the debugger?

apalazzi avatar Sep 10 '25 06:09 apalazzi