开发者

C# console application won't debug, very strange [closed]

开发者 https://www.devze.com 2023-02-17 05:24 出处:网络
Closed. This question needs to be more focused. It is not currently accepting answers. 开发者_如何学Go
Closed. This question needs to be more focused. It is not currently accepting answers. 开发者_如何学Go

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 question

I 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();
0

精彩评论

暂无评论...
验证码 换一张
取 消