I use an old but still very useful free program for Windows called MIDI OX, which monitors and displays all sorts of MIDI messages going on between PC and controllers. http://www.midiox.com/
This software is extremely useful for figuring out what is going on. It'll show you if a device is connected or not, it'll show you events when pressing the keys or other buttons, and so on. Various filters allow to only see certain messages and not others, etc.
I'm sure there are other similar programs for Mac and Windows if you look. Google "MIDI monitor software" or something like that to find them.