I have a Macbook 2007. It has worked very well until now, the trackpad does not respond at all, it simply stopped working. How can I debug this?
Here is what I would do to troubleshoot it (with the help of an external mouse):
Go to System Preferences, then select Trackpad, and make some change on that screen. Try your trackpad again.
If that doesn't work, reboot.
If that doesn't work, and if you're using BootCamp (or VMware Fusion, or Parallels), try booting into the other operating system that you have installed on your Mac and see if your trackpad is recognized there.
If that doesn't work, try cleaning off your trackpad. Give it a good vacuuming, get any dust out from around the edges.
If that doesn't work, then (if you're comfortable) it's time to dig into the innards of your Macbook. One option is that your battery could be impacting this. If your battery life on your Macbook has also gone down, the battery itself could be physically bulging out, and it could move your trackpad enough out of alignment that it won't work any longer. If that's the case, then you need a new battery.
If your battery is fine, then it could be that you need a new trackpad. I bought a replacement trackpad from eBay for my old Macbook, and that got me an extra year's worth of life out of that Macbook. It was a bit fiddly to replace, but it worked.
I noticed apple did make some changes to the software for trackpads that were not all that great for those of us who don't have the latest model. You could try to see if you can roll back the software for the trackpad and see if that helps. I am not sure how to do it with apple macs but I am sure there will be a way to do it.
If you are comfortable with Nadyne's suggestion to open your mac up then I would give it a wipe when inside before paying out for a new battery. It could have got dirty or sticky over time and there are lots of how-to videos on this on youtube so you know how to do it without damaging anything. Mind not to lose the screws because it is daylight robbery to replace them.
It is quite easy to wipe the trackpad without damaging it but watch out if you have insurance because I felt that apple had put little 'traps' up so their technicians know that you opened your mac if you take it for a repair even if you didn't do anything to it and the repair is not connected with your meddling.
I just repaired my MacBook Pro (the cursor would move erratically, or not at all, to touchpad input.) I removed the back of the computer, removed the battery, removed the touchpad and cleaned the edges of it, and the edges of the opening it came out of, with a toothbrush sprayed with WD-40. The small gap between the touchpad and computer body collects crud (oils,food,dust.) When this happens it interferes with the small conductive contacts on the touch pad (between the touchpad and the computer body.) All you need is a 00-size Philips head screwdriver, a tri-wing screw driver(looks like a Philips head but with three blades instead of 4,) commonly used on Nintendo games, a toothbrush, paper towels, and a can of WD-40.