Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LLDB debugger isseue, Debugger: start (no-debug) even when stated in configuration #271

Open
uuc110 opened this issue Oct 3, 2024 · 9 comments

Comments

@uuc110
Copy link

uuc110 commented Oct 3, 2024

So the thing is I wanna do Competitive programming in C++ on Sublime-text. I use 2 column Editor layout and use Input1.in and output1.out for my input and output. for compiling it works fine, but debuggign is something I'm having issue with. I using this Debugger, since this well known and suggested by Everyone

this is my debugger_configuration and LSP-ClangD for clang and build

Gist link -> https://gist.github.com/uuc110/72c8b29df9450fdf3636df2beb427488

I wanna do with LLDB, but i tried GDB and reached some progress and got this error

Warning: 'set target-async', an alias for the command 'set mi-async', is deprecated.

Use 'set mi-async'.

‌​​​No source file named C:\Users\USERID\AppData\Roaming\Sublime Text\Packages\User\file.cpp.

‌​​​​​​Running executable

[New Thread 7608.0x58fc]

[New Thread 7608.0x2680]

[New Thread 7608.0x3964]

and this callback keepgoing and no varible shown or anything.
https://i.imgur.com/BAZa9WE.png and https://i.imgur.com/a/IyyIAPK

image

image

let me know if you need other info to need more context

NOTE: I have done in Clion, VSCode, but wanna try sublime this time. so its not I don't like. I just wanna try and work with this.

@daveleroy
Copy link
Owner

I have never personally used gdb so I can't help that much here but you might want to look at the issues for the adapter.

https://github.com/WebFreak001/code-debug/issues/

If its not stopping at breakpoints I would guess that ‌​​​No source file named C:\Users\USERID\AppData\Roaming\Sublime Text\Packages\User\file.cpp is probably related

I would try using -ggdb instead of -g when compiling (https://gcc.gnu.org/onlinedocs/gcc/Debugging-Options.html) to force gdb debug info

@daveleroy
Copy link
Owner

What issue were you running into with lldb?

@uuc110
Copy link
Author

uuc110 commented Oct 8, 2024

What issue were you running into with lldb?

it's shows nothing I just run, and all the tab are empty, Console, terminal dn debug all three are empty when I run LLDB and debug

@captain0xff
Copy link

captain0xff commented Oct 9, 2024

I was also trying out the lldb adapter yesterday because the gdb adapter doesn't support logpoints and faced the same issue. The issue is that the adapter just launches the debugger but doesn't run the program. If you go to the console tab and type the run command then the program will launch in the debugger and you can debug normally.
Though this workaround works, I think it's still a bug. I am on debian sid, the code is compiled in cmake debug mode with gcc 14 and the debugger is lldb v19.

@uuc110
Copy link
Author

uuc110 commented Oct 9, 2024

I was also trying out the lldb adapter yesterday because the gdb adapter doesn't support logpoints and faced the same issue. The issue is that the adapter just launches the debugger but doesn't run the program. If you go to the console tab and type the run command then the program will launch in the debugger and you can debug normally. Though this workaround works, I think it's still a bug. I am on debian sid, the code is compiled in cmake debug mode with gcc 14 and the debugger is lldb v19.

can you share me your build, and debugger sublime configs.

@uuc110
Copy link
Author

uuc110 commented Oct 9, 2024

@captain0xff can you send me a video of you did that? would be great man! since I didn't any video on YT regrarding this

@captain0xff
Copy link

captain0xff commented Oct 9, 2024

I am on linux so my configs won't work for you. If you still want them then I can share them later when I am on pc.

@uuc110
Copy link
Author

uuc110 commented Oct 9, 2024

@captain0xff sure that work. I just want rough idea of work around

@captain0xff
Copy link

	"debugger_configurations":
	[
		{
			"type": "lldb",
			"request": "launch",
			"name": "Launch",
			"program": "${folder}/build/main",
			"args": [],
			"cwd": "${folder}/build"
		},
		{
			"type": "gdb",
			"request": "launch",
			"name": "Launch Program",
			"target": "${project_path}/build/main",
			"cwd": "${project_path}/build",
			"valuesFormatting": "parseText"
		},
	],

Here is my config. I use cmake and executable stays in the build directory and for this particular project it's named main. The gdb config works perfectly and for the lldb one you need to manually type the command run in the console tab (which should work out of the box imo).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants