3 ms·
I agree, recently I was working with a large Java program and after spending about 90 minutes (far too long, I was getting obsessed), I just gave up trying to g
by CJefferson 1y ago
I agree, recently I was working with a large Java program and after spending about 90 minutes (far too long, I was getting obsessed), I just gave up trying to get it into a debugger.
This is one area where rust disappoints me, there isn’t a “cargo debug” built in (there is an external program but it doesn’t work well), and when I just manually attach gdb most of the symbols are usually missing.
I would seriously consider a language billed as “debugger-first”, just to see what the experience was like.
- dmitrygr 1y ago> I would seriously consider a language billed as “debugger-first”, just to see what the experience was like. Use C, tell gdb "-O0 -g -ggdb3"
- CJefferson 1y agoYou are probably fairly accurate there, but that would require me going back and writing more C, which I've try to avoid nowadays :) I still sometimes get caught out getting debug information all in the right place, particularly when someone is using ninja or some such, I've even ended up wrapping gcc just to strip optimisation options and add -g, rather than figure out how to fight some very complex build system mess.
- gavinray 1y agoFor Java programs, you run the JAR with a flag telling it to launch a remote-debug server listening on some port (traditionally 5005): java -jar -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005 If your app is a gradle app, the flag is "--debug-jvm" Then you connect to it with "jdb"
- CJefferson 1y agoThanks, I'll try that if I'm ever Java debugging again! I don't think I want to do it myself, but I'd love a "101 ways to get into a debugger" webpage.