Using a Raspberry Pi Pico as a Logic Analyzer with PulseView
The open source Sigrok logic analyzer software runs on a number of platforms, it works with a variety of ‘smart instruments’ including an $8 Chinese Logic analyzer dongles running an old FPLA, connected to your PC.
The Hackster How To article shows how to capture data to a CSV file for Sigrok Pulseview to examine. They have a MIDI protocol decoder among many others. (The Pico appears fast enough for I2C signals)
The single C file is intended for the Pi foundation tool chain but may be a adaptable to the Arduino IDE plugin (or PlatformIO? let me know)