debug patch with query