Debugging doesn't start [closed]

2019-01-21 07:11发布

When I hit F5 (debugging mode) nothing happens. Building works correctly, exe file I can launch properly, but can't start debug. Why?

30条回答
小情绪 Triste *
2楼-- · 2019-01-21 07:59

I faced this problem. In my case, somehow the startup project entry got cleared. So, make sure atleast one among the projects in your solution explorer is set as the startup project. To set up a startup project, right click on the desired project in the solution explorer --> click "Set as Startup Project"

查看更多
甜甜的少女心
3楼-- · 2019-01-21 08:02

Sorry to bring up an old question but I had the same problem today, but the reason was actually because of the build order of the solution. If you go into the Solution Property Pages -> Common Properties -> Startup Project.
The ensuring Multiple startup projects is selected, move the web project to the top of the list.

In my web application solution I have 2 web projects and 5 code projects, one of my code projects was at the top, and as such debug would not start.

Hope others find this helpful

查看更多
乱世女痞
4楼-- · 2019-01-21 08:05

I had the same problem and all the tricks didnt do it until I unchecked the "Enable the Visual Studio hosting process" under the debug tab in the project properties

查看更多
Deceive 欺骗
5楼-- · 2019-01-21 08:05

I have found a solution:

  1. Close your Visual studio solution
  2. Open your .csproj project header with notepad ++ for example.
  3. Search for <UseIISExpress>false</UseIISExpress> in the <PropertyGroup> section
  4. Change the value to true : <UseIISExpress>true</UseIISExpress>
  5. Save
  6. Open your solution and for me now debug works on my project
查看更多
劫难
6楼-- · 2019-01-21 08:06

This process generally works for me:

  • Close IE
  • Use Task Manager to check that all instances of iexplore.exe have gone -- kill any remaining 'orphan' instances.
  • Start IE from the start menu and make sure it starts up correctly.
  • Clear Internet Explorer's cache & cookies and restart.
  • Close Visual Studio to ensure all locks are released.
  • IISReset
  • Restart VS
  • Clean the project/solution
  • Recompile and it should work
查看更多
\"骚年 ilove
7楼-- · 2019-01-21 08:06

I had the same issue and while looking at bresleveloper's answer, I found the following issue which seemed to work for me. Posting this in case anyone else has the same issue, then they can check this as well.

Went to Debug Tab < Project Properties. Found that Debugging options were totally disabled. Checked the "Enable Debugging" check box. That did if for me..

查看更多
登录 后发表回答