0

I have an puzzling problem. I have a new ASP.NET web application in VS2005 that runs fairly well, but I am having a problem and would like to set a break point to see what is going on. I have compiled the project in Debug mode. I have debug=true set in the web.config. But it appears that the IDE is not attaching to the process at all. Have I overlooked something? I am using the development server and not IIS. This has never been a problem in the past, but is this time.

Have I overlooked anything? Thanks for any help.

Rob

1
  • After you start debugging, and the application is running, look at the status of your break point. Does it appear as a normal break point, or is it a circle with a little warning triangle over top of it? If it's the latter, then the debugger is not attached to the application.
    – ulty4life
    Commented Oct 29, 2010 at 19:38

3 Answers 3

2

I had this issue a while back with VS2005. I don't remember where I got the following instructions from (copied them to a file which I'm now copying to you) but doing the following steps worked for me. It has something to do with IE8 attaching itself to multiple processes and messing up the debugger. Word of warning, this has you editing the registry, so use at your own risk / take all your normal precautions, etc.

  1. Open RegEdit
  2. Go to HKEY_LOCALMACHINE -> SOFTWARE -> Microsoft -> Internet Explorer -> Main
  3. Add a dword under this key called TabProcGrowth
  4. Set TabProcGrowth to 0

    If you run into the same problem on Vista or newer, you will also need to turn off protected mode.

Please note also that I was/am running XP at the time, so I did not have to use the "Vista or newer" clause there. No idea if that has any adverse effects either.

6
  • @Rob No problem! I remember tearing my hair out over this and having to write annoying forced exception throws to debug for about a week before I found it. Good ol' IE.
    – TheQ
    Commented Oct 29, 2010 at 20:15
  • I have also noticed that once you get VS2005 to attach, then you must detach all processes in VS2005 to use the debugging tools in IE8. It's like watching two kids fighting over candy!
    – Rob
    Commented Nov 3, 2010 at 18:50
  • @Rob Yeah, it was a real hassle honestly. I eventually did a clean install of VS2005 and I never had the issue come up again, for the record.
    – TheQ
    Commented Nov 3, 2010 at 19:02
  • so, now that we have Win7, the Registry Key option will not work because there is already a key by that name located there...except that it is a reg_sz key, and it is set to medium. Is there another workaround? or, should I change it from medium to something else? what?
    – user1512484
    Commented Jul 9, 2012 at 15:53
  • @rhonda I'm honestly not sure about this, sadly. I found the answer from some board a long time ago, and I'm certainly no expert with the registry myself.
    – TheQ
    Commented Jul 10, 2012 at 15:02
0

Sorry if I am stating the obvious, but you need to Start Debugging <F5> rather than just running the executable after compiling. Are you doing this?

1
  • Obvious is good! However, I am starting the debugging. I have used F5 and Debug/Start Debugging both. It won't attach.
    – Rob
    Commented Oct 29, 2010 at 18:43
0

If you don't hit the breakpoint, you are either not debugging (F5) or your code isn't reached at all. If you want to know which of the two is happening you can throw an exception right at the code where your breakpoint is. If your application is failing at the exception, you know you are not running it with the debugger. If it doesn't fail at the exception you are simply not reaching that piece of code and you will have to look harder for which code you are actually running.

throw new Exception("if I see this exception, I am not running the debugger");

Or maybe you are running two instances of the development server. I've had that sometimes. Look in the Windows system tray for the icon. If you see two (or more) you can right click to stop them and restart debugging.

alt text

1
  • The application threw the exception and so is getting to the code. I had earlier stopped all the development servers. It didn't help.
    – Rob
    Commented Oct 29, 2010 at 20:06

Not the answer you're looking for? Browse other questions tagged or ask your own question.