19. Debugging Debugging is a methodical process of nding and
reducing the number of bugs, or defects, in a computer program or a
piece of electronic hardware, thus making it behave as
expected.wikipedia
20. Debugging Debugging is a methodical process!
21. KISS Dont assume anything Attack the obvious Ask for help
Start broad
22. When you assumeDont assume its an extension Dont assume its
the database Dont assume its your host Dont assume Its much faster
to determine what the problem isthan what the problem isnt.
23. Is it plugged in? Can you SSH/FTP? Can you access a static
HTML le? Can you access your database? Can you access PHP
info?
25. Broad strokesCheck the application, can you log into the
CP? Check the templates, can you access other pages? Remove half
the template, does it show up? Remove a fourth the template, does
it show up? Rinse, repeat
26. KISS Huot Style1. Test a static le 2. Test the control
panel 3. Test other templates 4. Remove the entire trouble
template, replace itwith test 5. Fill back in the template until it
breaks
27. KISS Huot Style6. Is the trouble spot xable in the
template? 7. If not open the add-on and place debugginglines
throughout 8. Is the trouble spot in the add-on? 9. If not open the
core EE les and placedebugging lines throughout
28. Three Examples
29. 1. Datas Gone Missing
30. The Problem4:30 pm on a Friday
31. AssumptionsLets do it all wrong.
32. Its EEs FaultAn entry was overwritten? An entry was
accidentally deleted? An entry was set to closed?
33. Its MySQLs FaultThe database is corrupt? Primary keys are
out of order because of a backup or import?
34. Now, I feel like an ass.
35. KISS Dont assume anything Attack the obvious Start broad
Ask for help
36. Is it plugged in?Check with the client, what is really
missing? Can they tell you anything about the data? What channel it
was in? What status they set it to?5:58 pmon a Friday
37. The SolutionDon't worry Mark, they never existed in the DB.
We got to the bottom of it. I'm adding them by hand tomorrow. Sorry
for all the confusion.6:23 pm on a Friday
38. 2. Finicky URLs
39. The Problem Every listing page just stopped working.
40. Yesterday
41. Today
42. BackgroundProject rolled seven sites into one. Each
sub-site was different and contained separate IA (navigation).
43. Under the Hood Standard EE 1.x install No custom add-ons
Not using Pages module Templates as controllers
44. Yesterday
45. AssumptionsLets do it all wrong.
46. Its EEs FaultHave the templates changed? Was something new
installed/enabled? Is it daylight savings time?
47. Now, I feel like an ass.
48. KISS Dont assume anything Attack the obvious Start broad
Ask for help
49. Ask For Help
50. Ask For Help
51. Ask For Help
52. The SolutionFor now, Ive renamed entry. Im open to
suggestions, please feel free to educate me after this session with
your ideas.
53. 3. EE Cant Count
54. The Problem Contestants arent sorting properly.
55. Under the Hood Standard EE 2.x install EE Members EE Member
Custom Prole Fields Mark Huot Vote Module Solspace User Module
56. All together now The Vote module records votes in a
separate database table. The Vote module summarizes total votes
into a standard EE member prole eld. The User module displays users
ordered by the EE member prole eld.
57. AssumptionsLets do it all wrong.
58. Its EEs Fault Values are correct in control panel.
59. Its Votes Fault Module code looks correct.Correctly using
exp_member_data table.Pulling correct custom eld, I think
60. Its Users FaultNope, template appears correct.Sorting by
other elds works as expected (username, other custom elds).Sort
attribute correctly ips the results, but keeps them out of
order.
61. Its My FaultTemplate looks right.Not a CSS issue,
underlying XHTML is wrong too.
62. Now, I feel like an ass.
63. KISS Dont assume anything Attack the obvious Start broad
Ask for help