Trace flag 8759 will detect and write part of the query to the error log when it has been autoparameterized.