Explain how to debug an issue.
For this coding exercise, implement a trace checker that helps isolate the first incorrect execution step. Given operations and their reported states, simulate the state from zero and return the first index where the report differs from the simulation, or -1 if the trace is consistent.
Input: a list of dictionaries with op, amount, and reported; op is inc, dec, or set. Output: an integer index.
inc, dec, or setdef debug_issue(trace):