Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this questionI created a new console app in an existing solution. Set a break point, and it won't debug.
It opens up and immediately closes down again. Tested another console app in same solution works fine.
Any ideas?
Try cleaning the solution and then manually clearing out your bin directory.
Sometimes when we have a problem, we avoid the most obvious solutions, but is always helpful to check them.
Have you tried to see if the config of that app is in debug ?
For me, unchecking Optimize code
in the build section of the project's properties solved the issue.
Silly question, but are you sure that the new app is the one that's actually running and not one of the other ones?
Try opening Visual Studio as an Administrator. I had the same issue and my mind was absolutely boggled for about 10 minutes.
I found that when working with a certain sample application, the "Advanced Build Settings, Output, Debugging Information" was set to "Portable". Setting this value to "Full" resolved the issue.
You can try adding the following code at the end of your console program.
Console.ReadKey();
精彩评论