Not sure exactly what you mean by 'debug infrain2' the value returned by that command is put into 'b13' on an 08M and in 'infra' on the 18X etc. That value is displayed in the debug window along with the rest, so just put a DEBUG command after INFRAIN2.
If you mean, how to find what protocol or thepulse train the remote is putting out then - if the remote has an identifiable chip in it the datasheet will likely provide details, otherwise you'll need an IR LED protocol analyser ( Google may help there, LIRC etc may include such things ), a scope or a lot of bit-banged experimenting.
INFRAIN/2 only accept Sony IR Commands and not all remotes send that. Take a look at ...
http://www.hippy.freeserve.co.uk/picaxeir.htm
and especially the IR Remote Tester. That will let you test if the remote is even working or not.