A fairly cheap way is to use
IRToy ($20) in conjunction with
IrScrutinizer (free), The hardware captures the IR signal as a series of on and off durations. Decoding the signal and/or converting it to Pronto Hex (or other IR formats) is done in the software. This approach will work with any IR signal. If it isn't a standard IR protocol, the timing information is still available.
By contrast, learning remotes will attempt to group the various on/off durations into groups, and more complicated IR protocols tend to be not recorded correctly.
The software for a Pronto will be difficult to install on newer computer operating systems, and also needs a RS-232 interface, which is pretty rare in newer computers. By contrast, IrScrutinizer is written in Java and will run of Windows, Mac and Linux.
Another way is to use a JP1 capable learning remote (e.g.
RCA RCRP05B--$10), and a
FTDI based interface cable - $8, with the free
RMIR software. Also compatible with nearly any computer.