Using simavr to debug mega2560 code

Hi is there a tutorial available for basic use if simavr in PIO? i’d like to debug code which will eventually be loaded to a mega2560.
thanks
Paul