DragonPrime - LoGD Resource Community
Welcome Guest
  • Good morning, Guest.
    Please log in, or register.
  • July 20, 2019, 04:56:43 AM
Home Forums News Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
Search

Pages: [1]   Go Down
  Print  
Author Topic: Some notes on finding/fixing bugs.  (Read 6468 times)
0 Members and 1 Guest are viewing this topic.
lonnyl
Guest
« on: April 13, 2005, 05:00:56 AM »

As many reported bugs are getting noted as "Third Party Module Problem", I'd like to make some notes on finding and tracking bugs.  As well as note that this IS a third party module site for the most part.   I also want to note that even if a problem is with a third party module, the actual bug may only be exposed by the module.....  So we need to come up with some methods for swatting these bugs....

So..... notes on finding bugs.....

Everyone should have a test server.... copy the setup that you have on your live server to the test server.. sql and all.... (I run my test server with 2 games, 1 a copy of what I have on the web, 2 a clean setup to test modules 1 by 1).

The code search module I created will help you search for certain things in the modules.... say maxhitpoints are getting messed up....

the list modules module will list active modules installed on your server.... great for comparing with others who are having the same problem......

One will need to try and reproduce the error first on the server it was encountered.... once you have a reproducable error, you will then need to try and reproduce it on your test servers.....  If reproducable on all 3 (live server, copy of live, and clean server) you can be pretty sure the problem is with the core (but not possitive).  If reproducable on live, and copy of live but not clean server, you will need to add modules 1 at a time until you can reproduce the error.  If you can track the bug down to a module, then post the bug report in the module's thread.  

Now.... any other tips/pointers/tools we can use?Huh??

I started this thread so we can hopefully come up with a set of procedures that will help us more effectively and quickly solve issues.....
Logged
Kendaer
Guest
« Reply #1 on: April 13, 2005, 07:25:31 AM »

Once you have narrowed down the bug to a module *or to the core*, it often helps if you can show a more detailed location of where the error occurs.

The *best* way to do this is on one of your test servers, start adding debug statements
such as
Code:
debug('I got to here and all looks well');
or
Code:
debug("The value of foo is: $foo!");

Of course you need to have debug output turned on for whatever char you're using to do the testing.  This is often the best way to find bugs AND giving me a bug report which says 'the variable foo has a value of 'X' at line 58 of bar.php but should have 'Y'" is a LOT more helpful to me quickly fixing the problem.

Of course you should remove those debug statements once you're done as well Smiley  I tend to put "DEBUG (<problem>):" or just "DEBUG:" at the front of those temporary statements so I can find them all to remove them once I know what's what.

BTW, if it is a bug with the core, or a bug with another authors module, giving the most detailed info possible helps.  Take for example the bug Nefarious had with his showforms.   I would never have seen that bug and been able to fix it without knowing that it only occured when he had his form tabs turned off.  *with* that knowledge, it was 5 minutes to find and fix!
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Version 1.1.2 is the current supported version and is available for download.

Support Us
No funds raised yet this year
Your help is greatly appreciated!
Recent Topics
DragonPrime LoGD
Who's Online
110 Guests, 1 User
Gucky2000
Home Forums News Downloads Login Register Advanced Search