using debug mode in sample