Theoretical ridiculous example 1: I want to debug something that's going wrong with the "!" CLI command.
-> Okay, first I have to find it. Let's say I know nothing about mafia's type hierarchy whatsoever. I can't global search "!", that's ridiculous. But, it's a CLI command, so let's search for a nearby one - ashref will do nicely. I hit ctrl-h, click the file search tab, and (for the purposes of the exercise) tick case sensitive.
Okay, one result. Double-clicking that gets me into KoLmafiaCLI.java.
Looking down a bit ( or doing a ctrl-f on "!" ) quickly finds this line:
Cool, that's what I need. I select BangPotionsCommand and hit F3. Now I'm where I need to be! Time to debug.
new BangPotionsCommand().register( "!" ).register( "bang" ).register( "vials" );
Quickly browsing the code, I might suspect that some indices are being miscalculated. I'd insert this line on line 73:
(then run the formatter with ctrl-F to clean up my ugly formatting, haha)
RequestLogger.printLine( "left chop: " + chopl +"; right chop: " + chopr);
Note that if RequestLogger were not already imported (it is, by chance), Eclipse would tell me about that. Hovering over the red underline would provide possible solutions, the top one being import RequestLogger.
Inserting RequestLogger print statements is perhaps the only tool you need to debug 96% of problems. You can use System.out.print too, but I favor having things displayed in the mafia gCLI rather than console output.
Theoretical contrived example 2: Some jerk broke something with a commit, and I want to fix it and post a .patch
I just updated to r12345 and my favorite widget has stopped widgeting. I know that my widget was working in r12300.
Using the SVN tools, pin down exactly which revision caused the problem. Right click on the kolmafia package > team > update to version. Use a highly-advanced search algorithm! Pick the halfway point of r12322, see if it's broken. Then iterate upwards if it's not broken yet, downwards if it is.
Now that you know the particular revision that caused it, do team > history and look at the files affected by the change. Zero in on the problem.
Fix the problem.
Whew, okay, you fixed the problem. That sure was easy. Time to post your fix on kolmafia.us. For this, you're going to generate a .patch file. Again right click on kolmafia package > team > Create Patch... You'll need to exclude all of the extraneous files other than the ones you've altered/added/deleted specifically for this fix. We probably don't need to commit your personal preferences file.