Last wood debug mode5/3/2023 ![]() ![]() Now you want to upgrade those frames, one way is to have enough wood for the two wood upgrades then have enough cobblestone to upgrade further then have some concrete to upgrade even further. Here's another example to illustrate: Say you're working on a base and you've made some wooden frames. If you disable it from the game options (as 7d2dMP said) or by editing an xml directly, what exactly does you prevent from reenabling it the same way? There are no bad tools.Because it's to easy and makes the game boring. Like any tool the debugger has appropriate and inappropriate uses. A few people argued that it wasn't important because that isn't what we ship, but I looked into it anyway and found a REALLY bad problem. I have only once seen a bug which only manifested in the debug build. If the first time you fire up the release build is a few weeks before QA gets their hands on it (or, in a crazy shop, before you start shipping), you may be in for a world of serious pain. Memory allocations tend to happen differently, uninitialized data is filled with different values, etc. You already pointed out the worst of the problems with this. I think it's a mistake, not so much to always have a debugger at the ready, or to even run code always under the debugger, but to run a DEBUG BUILD. Fixing the problem is usually the hard part, and the debugger is of little use for that. ![]() Honestly, the time in the debugger is usually just a few minutes, then the problem is found. I'm trying to understand some code I'm not familiar with, and I want to watch it execute.A bug manifested which, after five minutes or so, I cannot immediately guess as to the cause.That said, I only fire up the debugger in two circumstances: You might swear it does X when it actually does Y - seeing it do Y before your very eyes is sometimes a profound moment. On the other hand, actually watching code execute in a debugger can sometimes free you from your mental trap of thinking about the code the wrong way. The debugger has a way of focusing your attention on the immediate area where the bug became apparent - whether it's a crash, incorrect data, or otherwise - at the expense of stealing your attention from other areas that might benefit from some investigation. One problem you might encounter when using a debugger is tunnel vision. I've met people who refused to use a debugger even to get a stack trace of where a piece of code crashed, instead using printf bisection to find the crashing line of code (this would take a day or more. The debugger is only a crutch if you use it like one. These are general, of course-it varies wildly with language, environment and situation-but what are some other considerations? Conversely, there's the odd bug that only crops up in a debug configuration tracking it down may be a waste of effort (though, this is often indicative of a deeper, subtler problem that is worth fixing).It may "help" you by initializing variables or otherwise masking bugs, leading to surprises later on.(Edit) Tunnel Vision: Debugging the symptom can distract you from deducing the cause when the crash occurs long after or far from the defect.Performance overhead can make iterations slower.if your program is responsive while debugging, it will almost definitely be so in the wild Performance overhead can give you extra wiggle room, i.e.Tracing provides a nice alternative to littering your code with commented-out print statements.Starting with the obvious, takes less time to zero in on faults, exceptions and crashes.I'm quite a fan of debuggers myself (in fact, I tend to only run without if strictly necessary), but I got to thinking about the relative merits of each approach. There's certainly something to be said for developing the skill to deduce the cause of bugs without "direct" evidence. I saw a comment on another question (I forget which one) encouraging the asker to avoid testing his/her code in the debug harness unless strictly necessary, citing something to the effect of it acting as a crutch.
0 Comments
Leave a Reply. |