since a few weeks now I have run into this situation and it very upsetting,
my program debugs very well, no errors, when I run the program it does the initial part
This started happening to me for no apparent reason. After looking at the project properties I noticed the Working Directory was somehow deleted (it was just blank), after setting it back to the correct directory everything started working again.
Obviously my simple fix might not work for you, I got lucky.