How do I troubleshoot a cycle computer? I have a cheap velo cycle computer made by cateye.  It is a simple read out of velocity and clock and has no fancy functions at all.

It worked fine for months, and then started "blipping" to double my speed.
That is, if I was doing about 20 km/h it would blip to 30 or 40 or 60 and then drop back to my real speed.  I disregarded this and keep riding.

A month later it starts cutting out, reading 0 km/h or numbers like 6 or 9, where I am riding at about 20 km/h on the flat road.

I check closely - battery is okay but I change it anyway.   No water anywhere, no rust, no damage, nothing wrong.

Now it stops completely - only shows a speed for a few seconds then back to 0.

The clock works fine, shows the correct time all the time.  Head unit has not been dropped.   Yes it has been ridden in the rain but that is what these are designed for and there is not water mist inside the screen.

How do I troubleshoot my bike computer?   I know is not a Garmin or wahoo or any flash thing, but is only a year old.  Probably out of warranty and I want to learn how tofix it.  Or to stop from breaking the next one.

Computer is like this one   https://www.chainreactioncycles.com/nz/en/cateye-velo-5-function-computer/rp-prod26194   with wires, not cellphone or GPS.
First of all, try changing the distance and vertical alignment between the sensor and the wheel-mounted magnet.

If that doesn’t help, the sensor (or its cable) mounted to the fork is probably broken. Check the cable for any visible damage. I think the sensors are usually cheap&amp;simple reed switches to detect the magnet. If you have a multimeter you could try measuring the resistance between the two contacts of the cycle computer’s mount. It should toggle between zero and infinity when you pass the magnet in front of the sensor. If it doesn’t do that it confirms a sensor or cable defect.

Your best choice is a replacement part, but if you are handy you could try replacing the cable and/or the reed contact.