Logic Analysis of a 8 bit mcu
There is an equipment intended to use in this case. It is named logic analyser. There are plenty on the market. Stand alone ones, or PC-based. You may check the logic states of multiple pins (8, 16, 32 channels or more).
If you have only 2-channel oscilloscope you are still in a good situation. Tweak your code: select 'debug' pin and make it toggle when a particular thing should happen. Then, connect your probe to this pin and you can check for example: is microprocessor going into interrupt, into a loop, you can check some of execution time, etc. There is a lot of possibilities with it, all you need is to use your imagination and thinking.