Sesse wrote: ↑Wed Dec 30, 2020 12:10 pm
Did you ever try VSCode? (I know it's the same only in name, but it seems to be popular on both Windows and Linux alike.)
nope, but I'm aware it exists. I thought it was a code editor more than a full-blown IDE.
I find it interesting how much Visual Studio users depend on online debugging; perhaps because actually outputting and grepping through a log is so painful in that environment. It's a circle (I won't say whether it's vicious or virtuous); VS users tend to use the debugger a lot, which makes them more dependent on the VS debugger. (Even back when I used Visual Studio, I didn't use single-stepping and the likes too much, so this wasn't hard for me to give up.)
because it saves a ton of time and pain, of course
I'm not a fan of invasive log/printf spamming => you have to modify the code, build and clean it up afterwards (ok, trivial with git, but still completely unnecessary).
I don't see how it's superior to non-invasive debugging. it's not just about stepping, like I said - data access breakpoints/conditional breakpoints or even break into the debugger in the case of a crash/assert, where you can immediately examine the context (threads,callstacks, variables,...), this is powerful, fast and very useful, actually.
also - how do you log a certain container, for example? let's say something happens 60 times per second under some specific conditions and you want to examine say a hashmap somewhere, "printf debugging" implies adding extra code to look something up (if you know the value of the key), if you want the whole hashmap you printf the whole thing? well good luck digging through that
and I haven't even mentioned cases where you want to debug heavily multithreaded code.
I still use printf debugging sometimes (like scripts), but my scripting language has a full RTTI support so I can print the whole type (say a 4d vector) in one go, this is one of the many reasons why we need a proper RTTI in C++ - have high hopes for metaclasses
If you don't want to sort your dependencies topologically, you can use linker groups. Or the hackish way of specifying everything twice
Thanks for the tips (specifying everything twice looks like a very nice hack to me - didn't know that
on the other hand manually specifying 10 libraries is not much of a problem if the order is sort of obvious
oh and as for lld - in my experience microsoft linker does a much better job at removing unused code and doesn't actually require any specific order (assuming static linking)