4

When I press F5, my web application starts up and runs, but the Visual Studio debugger is not attached to the process. The play button is always enabled.

I checked the configuration manager and all the libraries and web applications are debug|any-cpu.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Paul Knopf
  • 9,568
  • 23
  • 77
  • 142

10 Answers10

3

You can also run your web application outside of Visual Studio, then select Debug->"Attach to process". In the process list, choose the ASP.NET working process, "asp_wp.exe".

Buggieboy
  • 4,636
  • 4
  • 55
  • 79
3

Have you set

<compilation debug="true"/>

In your web.config file?

Doron Yaacoby
  • 9,412
  • 8
  • 48
  • 59
3

Oh how I hate this answer, but it has just worked for me...

Symptoms: it works fine for weeks, then simply refuses to debug.

Solution: close Visual Studio, delete the contents of the Bin directory, reboot.

Irritatingly it required a full reboot to get it to start debugging; restarting Visual Studio + iisreset wasn't enough.

More info: I sometimes find that IE's cache is the culprit (strange but true). Therefore close all instances of IE, start IE, clear the cache, close IE, then try debugging with Visual Studio again.

GlennG
  • 2,982
  • 2
  • 20
  • 25
  • 1
    what a shame... closed solution, closed VS, deleted bin contents and it worked.. :-/ – hanzolo Jun 04 '14 at 16:08
  • 1
    worked for me - asp.net app stopped debugging suddenly and nothing would make it work again. Closing Visual Studio and deleting the contents of the "bin" and obj" directories for the project magically fixed the issue – Shaun Killingbeck Feb 25 '16 at 09:52
0

Check for this option:

*Property Pages* (right click project) → *Start Options* → *Debuggers* → *ASP.NET*

It must be checked to enable the debugger on your web pages.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
manji
  • 47,442
  • 5
  • 96
  • 103
0

Check if all debugging symbols are set on.

Also see in which folder you have your DLL, lib, or bin files.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Rachel
  • 100,387
  • 116
  • 269
  • 365
0

Try cleaning your solution. You might also blow away everything in the bin directory that your application is compiling to. Then rebuild the whole solution.

RepDetec
  • 741
  • 13
  • 29
0

I get this very often with a standard app - not a web application.

I have noticed that this happens when I change the properties of the startup project.

Anyway my solution is:

  • Open the bin folder

  • Delete the exe, config and pdb for the startup project (my solution has scores of projects so I don't want to delete more than is needed there).

  • build the startup project

  • hit F5

Very frustrating indeed...

pasx
  • 2,718
  • 1
  • 34
  • 26
0
  • In web.config, check you have: <compilation debug="true" />

  • If you have web.config transforms, ensure your environment you are building for in the drop down next to the run button has: <compilation debug="true" /> (i.e. not <compilation xdt:Transform="RemoveAttributes(debug)" />)

  • On the property pages (right click on project -> properties), on the build tab from the left, tick "define debug constant", click the advanced button at the bottom and set output debug info to full. Then on the web tab on the left, at the bottom check that Debuggers ASP .NET is checked.

Richard Pursehouse
  • 1,109
  • 13
  • 21
0

Click on Tools -> Options-> Debugging -> General

Then uncheck the box "Require source file to exactly math the original version".

0

I just had this exact same problem. Deleting bin and rebooting didn't resolve it. What did work, though, was right clicking on the project within Visual Studio, selecting Unload Project, then selecting Reload Project. Had to do the same thing for one of the required libraries that was just saying "skipped" instead of building. insert-shrug-emoji-here. Disclaimer: this was on VS 2008.

JamieB
  • 703
  • 1
  • 6
  • 17