Live data from Hacker News

Speeding up the Rust edit-build-run cycle

davidlattimore.github.io

1–10 of 125 posts

Re: Speeding up the Rust edit-build-run cycle

#5
>Debug information tends to be large and linking it slows down linking quite considerably. If you’re like many developers and you generally use println for debugging and rarely or never use an actual debugger, then this is wasted time.

Interesting. Is this true? In my work (java/kotlin, primarily in app code on a server, occasional postgres or frontend js/react stuff), I'm almost always reaching for a debugger as an enormously more powerful tool than println debugging. My tests are essentially the println, and if they fail for any interesting reason I'll want the debugger.

Re: Speeding up the Rust edit-build-run cycle

#7
> If you’re like many developers and you generally use println for debugging and rarely or never use an actual debugger

You lost me here.

Using a debugger to step through the code is a huge timesaver.

Inserting println statements, compiling, running, inserting more println, and repeating is very inefficient.

If you learn to use a debugger, set breakpoints, and step through code examining values while you go then the 8 seconds spent compiling isn’t an issue.

Re: Speeding up the Rust edit-build-run cycle

#10
post #5

>Debug information tends to be large and linking it slows down linking quite considerably. If you’re like many developers and you generally use println for debugging and rarely or never use an actual debugger, then this is wasted time. Interesting. Is this true? In my work (java/kotlin, primarily in app code on a server, occasional postgres or frontend js/react stuff), I'm almost always reaching for a debugger as an…

println debugging is where everyone starts. Some people never graduate to knowing how to use a debugger.

Debugging through log data still has a place, of course. However, trying to do all of your debugging through println is so much harder, even though it feels easier than learning to use a debugger.

Post reply on HN