←back to thread

376 points turrini | 5 comments | | HN request time: 0s | source
Show context
hexomancer ◴[] No.42146531[source]
Slightly off topic but I think it is a good place to ask: One of the few things from windows that I miss when using linux is the debugging experience with visual studio (not code). When debugging a medium-sized C++ project on windows, the launch of the debug build is pretty fast and stepping over lines is almost instantaneous. On linux launching the executable using gdb takes like 10 seconds loading modules and stepping over each line takes like half a second which I think is intolerable (lldb is even worse). Yet I don't see people complaining about this online very much. Am I missing something? E.g. is there a compiler flag that speeds up debug launch time and step speed that I am not using?
replies(7): >>42146574 #>>42146643 #>>42146716 #>>42146817 #>>42146847 #>>42147042 #>>42148108 #
1. PhilipRoman ◴[] No.42146574[source]
Haven't observed anything like that. Even with remote gdbserver on a low power embeddeded device, stepping has always been instant for me. Could be a C++ vs C thing.

The only thing which takes time is debuginfod downloads.

replies(1): >>42146585 #
2. hexomancer ◴[] No.42146585[source]
How large is your code base? I am talking about 100K+ LOC with many complex dependencies (mainly Qt modules).
replies(1): >>42146826 #
3. f1shy ◴[] No.42146826[source]
2 Mio LOC, no problem here.

Sounds like maybe you have reverse-debugging enabled? I mean target record or target record-full?

Anyway, I seldom do step-by-step. I typically work with dprintf.

replies(2): >>42146854 #>>42146888 #
4. hexomancer ◴[] No.42146854{3}[source]
Nope, with reverse-debugging enabled it will be insanely slow, not something that you can miss.

I am curious does your project have large external dependencies or is it self-contained.

5. wizzledonker ◴[] No.42146888{3}[source]
Are you talking heavily templated C++ code as well? I’ve got my suspicions about how much this affects things…