dap-mode icon indicating copy to clipboard operation
dap-mode copied to clipboard

Wrong type argument stringp nil with dap-lldb on Mac M1

Open lanceberge opened this issue 5 months ago • 0 comments

My configuration:

(use-package cc-mode
  :ensure nil
  :init
  (require 'dap-lldb)
  :hook
  (c++-mode . +cpp-mode)
  (c++-ts-mode . +cpp-mode)
  :custom
  (dap-lldb-debug-program "/opt/homebrew/opt/llvm/bin/lldb-dap") ; this executable does exist
  :config
  (defun +cpp-mode ()
    (setq-local tab-width 4)

    (dap-register-debug-template
     "lldb"
     (list :type "lldb-vscode"
           :request "launch"
           :name "lldb"
           :MIMode "lldb-dap"
           :program "${workspaceFolder}/average_contiguous_subarray" ; the file I'm trying to debug
           :cwd "${workspaceFolder}"))))

I do dap-debug on the cpp file with debug-on-error, then I get:

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  #<subr make-process>(:name "lldb" :connection-type pipe :coding no-conversion :command "/opt/homebrew/opt/llvm/bin/lldb-dap" :stderr "*lldb stderr*" :noquery t)
  make-process@with-editor-process-filter(#<subr make-process> :name "lldb" :connection-type pipe :coding no-conversion :command "/opt/homebrew/opt/llvm/bin/lldb-dap" :stderr "*lldb stderr*" :noquery t)
  apply(make-process@with-editor-process-filter #<subr make-process> (:name "lldb" :connection-type pipe :coding no-conversion :command "/opt/homebrew/opt/llvm/bin/lldb-dap" :stderr "*lldb stderr*" :noquery t))
  make-process(:name "lldb" :connection-type pipe :coding no-conversion :command "/opt/homebrew/opt/llvm/bin/lldb-dap" :stderr "*lldb stderr*" :noquery t)
  apply(make-process (:name "lldb" :connection-type pipe :coding no-conversion :command "/opt/homebrew/opt/llvm/bin/lldb-dap" :stderr "*lldb stderr*" :noquery t))
  dap--create-session((:type "lldb-vscode" :request "launch" :name "lldb" :MIMode "lldb-dap" :program "/Users/lance/code/leetcode/sliding_window/average_..." :cwd "/Users/lance/code/leetcode/sliding_window" :dap-server-path "/opt/homebrew/opt/llvm/bin/lldb-dap"))
  dap-start-debugging-noexpand((:type "lldb-vscode" :request "launch" :name "lldb" :MIMode "lldb-dap" :program "/Users/lance/code/leetcode/sliding_window/average_..." :cwd "/Users/lance/code/leetcode/sliding_window" :dap-server-path "/opt/homebrew/opt/llvm/bin/lldb-dap"))
  #f(compiled-function () #<bytecode 0xe5b690e8b7ed623>)()
  dap-debug((:type "lldb-vscode" :request "launch" :name "lldb" :MIMode "lldb-dap" :program "${workspaceFolder}/average_contiguous_subarray" :cwd "${workspaceFolder}"))
  funcall-interactively(dap-debug (:type "lldb-vscode" :request "launch" :name "lldb" :MIMode "lldb-dap" :program "${workspaceFolder}/average_contiguous_subarray" :cwd "${workspaceFolder}"))
  call-interactively(dap-debug)
  +dap-debug()
  funcall-interactively(+dap-debug)
  command-execute(+dap-debug)

lanceberge avatar Sep 07 '24 23:09 lanceberge