CodeLLDB breakpoints don't work
bertulli opened this issue Β· comments
Thank you for your patience π
Apparently, CodeLLDB seems to ignore my breakpoints. What I mean is that, even after having placed a breakpoint with dape-breakpoint-toggle
, the debug runs over it.
Environment:
- example file
// ~/C++/test/main.cpp
#include <cstdlib>
#include <iostream>
int main(int argc, char *argv[])
{
int a;
a = atoi(argv[1]);
std::cout << a << "\n";
return 0;
}
- dape b9d0579
- jsonrpc
1.0.24
~/C++/test/.dir-locals.el
file:
;;; Directory Local Variables -*- no-byte-compile: t -*-
;;; For more information see (info "(emacs) Directory Variables")
((c++-mode . ((dape-command . (codelldb-cc command-cwd "~/C++/test/" :program "main" :args
["1"]
compile "g++ -o main main.cpp")))))
Steps to reproduce:
- open the
main.cpp
file - go on the
a = atoi(argv[1]);
line C-x C-a b
/dape-breakpoint-toggle
C-x C-a d
/dape
- enter
Output:
- bufffer
*dape-repl*
:
* Welcome to Dape REPL! *
Available Dape commands: debug, next, continue, pause, step, out, restart, kill, disconnect, quit
Empty input will rerun last command.
* Adapter server started with "~/.emacs.d/debug-adapters/codelldb/extension/adapter/codelldb --port 35341" *
* Connection to adapter established at localhost:35341 *
Console is in 'commands' mode, prefix expressions with '?'.
Launching: /home/alessandro/C++/test/main 1
Launched process 8625
Process exited with code 0.
* Exit code: 0 *
* Session terminated *
>
- buffer
*dape-shell*
:
1
Desired output
To have the session stopped at line a = atoi(argv[1]);
I believe it's because you have not compiled it with debug flags -g
try g++ -g -o main main.cpp
You're right, sorry π Thank you!
No problem, extremely nice and clean bug report π