Best option maybe is putting a breakpoint at the start of program and continue line by line. Also make sure you have all necessary debug information set in compilation options. Optimizations may reduce debug ability.