Introduction: It has come to my attention, recently, that a lot of new developers do not understand the true reason of a stack-trace: Trouble-shooting and bug testing. Far too often, I see posts inside of Plugin Development of developers who want other devs to check their stack-trace, and then allocate the problem for them. Usually, this takes about 3 steps more than it should, as the helper typically needs to ask for the code, the line-number, and then one last follow-up question. So, to help prevent this, I've written a short guide on reading a stack-trace, and finding out what's wrong based on the results (on your own). Something rather important to note, before going into this, is that this guide is helpful to both developers AND server administrators alike. Yes, you heard me, this is useful knowledge to plugin-users as well. If you know how to read the errors of another plugin, you can post a much more in-depth bug report. Not only will this help fix the issue sooner, but you might gain a little appreciation from the developer (which is always good for feature requests) Anyways, let's begin: What is a stack-trace? Well, essentially, this is a stack-trace: Stack-Trace (Move your mouse to reveal the content) Stack-Trace (open) Stack-Trace (close) As you can see, its what several people refer to as the server log, console log, error log, what have you. It's where everything is going to be broadcasted whenever something goes wrong with a plugin. As you can see, I do have an error with my ComPassionate plugin. Let's talk about how to fix it: How do I decipher a stack-trace? Standard Response: "Oh my gosh! An error! Dear lord, look at all the lines, I can't translate that gibberish! Time to go to the Plugin Development section and ask for help!" Don't panic! Stack-traces are actually really easy to read! Let's take the last example, and focus in on the error itself. I will then talk about how to 'read' it. Stack-Trace of the Error (Move your mouse to reveal the content) Stack-Trace of the Error (open) Stack-Trace of the Error (close) Ok, when troubleshooting any error, there are a few simple steps you must follow: Make sure that it's actually a problem with your plugin! Look for any class-name or variable that pertains to your plugin, and if you find a match, continue on! Look for the actual error. These are typically found at the start of the stack-trace, but will sometimes be located towards the middle. In either situation, its not hard to find it!. As you can see, I have a Null Pointer Exception. This means that something, somewhere, is null (and I've tried to invoke a change upon it). For a list of all exception types, and what they mean, you can poke around here Find the file that the error occurs in. These generally appear in (parentheses) NOTE: (They might look like "<, >" on Windows), and will always be named one of your plugin files! For instance, my error occurs in LocationUpdater.java The last, and probably the most important step in trouble-shooting, is to note the line number! This will tell you EXACTLY where the error occurs at, and will help with a speedy bug-fix. These will always appear after the file (mentioned above). I have indicated that my error occurs on line 29. If this happens to be you: "OMG, I don't have line numbers! PANIC MODE ENGAGE!" Showing line numbers in Eclipse (Move your mouse to reveal the content) Showing line numbers in Eclipse (open) Showing line numbers in Eclipse (close) Windows-->Preferences-->General-->Editors-->Text-Editors | Then check the 'Show line numbers' box. Showing line numbers in Netbeans (Move your mouse to reveal the content) Showing line numbers in Netbeans (open) Showing line numbers in Netbeans (close) View-->Show Line Numbers Additional Note: Once you've followed all of these steps, anything after that exception will likely be useless, as it generally involves internal things that you can't change. I've crossed out all of this useless info with a red X. Now that I know exactly where to look, what do I do? This is the easy part! You do what you do best : code I'll go ahead and post a picture of the actual error in my code, to show you that I knew exactly where to look (and found the error immediately) Error in Code (Move your mouse to reveal the content) Error in Code (open) Error in Code (close) As you can see, I went straight to LocationUpdater.java, scrolled down to line 29, and immediately saw that I was calling isDead() on an entity, without ever directly checking to see if it was null. I fixed this in 30 seconds, and moved on with my life! Hooray! Additional Examples: A stack-trace involving onCommand() - (This is the type of stack-trace that gives you the useful info half-way through. I mentioned it briefly, above) onCommand Stack-Trace (Move your mouse to reveal the content) onCommand Stack-Trace (open) onCommand Stack-Trace (close) Note: Not my own stack-trace In any error that involves onCommand, the useful stuff is going to be after a bunch of gibberish. The key is to look for the 'Caused by:' , because that is where the info actually starts.If you look in the picture, you can see that there's a Null Pointer Exception. It's located in theboot.java, on line 67. Conclusion: Stack-traces can be a pretty scary thing, I get that! But once you learn how to properly decipher them, you'll find that fixing bugs by yourself becomes monumentally easier! If you didn't know how to read a stack-trace before, hopefully you do now! If you did, and just decided to read, hopefully you think its a good guide for starters! Now get out there and trouble-shoot! And stop spamming Plugin Development with stack-traces because you aren't quite sure how to read them! Disclaimer: Some of the errors/stack-traces/snippets of code in this post were real products of my own stupidity. They did actually occur, and I did actually wait for them to occur (for use of this post). No servers were crashed in the making of this guide--okay, maybe one.