task violation

I am debugging a program using wd,when I choose go command,the program soon
break
with “task violation” .But when I run the program directly,it runs
porperly?how to handle this problem?