windbg - Cannot attach to process in .net 4.0 -


** The post was edited, more information below

I just got two great about advanced Watch the video Dotnet debugging (by Brian Resmusen) and I'm trying to repeat some steps, but there is no information to proceed with TIS error:

  Effort DebugPort or ExceptionPort was created, but a port already in this process is present.   

I have received some answers on Google and I generally understand what the error says, but I do not understand a strange fact: when I compile my simple app ; .NET 4.0, I can attach as a movie show, I am trying to do this even after the target collection. NET 4.0 disables the attachment to me.

One of Google's replies says "non-explosive mode" but .. Brian does not use any of these checkboxes, it just works on his video.

What's the difference? Where's the catch? Is it Windows 7 vs Vista? Maybe there are some different compile settings in case?

I am experimenting with MSDN with 10 MS SDK of MS VS2 with Windbug x86 and correctly configured icons for HTTP server. The system is MS Vista x86.

Resources (exact time> = 8:15):

Edit: VS In an attempt to attach the process that runs outside / outside the VS, the windbg does not show any content.

Edit2: There was some fresh problem with my system, using some time "Window \ [Undock | Dock Sur]" menu option, I can see the contents of the attached process That was what was missing.

So the only question is: What is the difference between joining the process when starting with VS, when it has been compiled using the target & lt; 4.0 and then = 4.0? Why 4.0 can not engage the windbg targeting process in "noninvasive" mode. What has changed in VS2 10?

I think you are debugging with Visual Studio (F5) and then attached You may only have one active debugger at a time while trying, so you get this error if you want to start the process with VS, then run it without debugging (Ctrl-F5). If you do this, then you should be attached to WinDbg.

Edit : I am sorry, I am concerned about the different versions of NAT while behaving differently in this regard. I did not talk about it, then I try to repeat my questions again. Due to this "just works" in the video, because I VS Every time I start using debugging, I use the run. So if you just want to follow the examples given in the video, you can run without debugging.

I started using WinDbg / SOS on CLR2 and x86. V.S. Starting X86 NET process will trigger the error, so I used to launch without debugging.

However, as you have found, there are scenarios where you can actually engage with any process being debugged by VS. I can reproduce the scenarios you describe, but I can attach it to an x64 as well. With debugging from VS2008, the .NET 2 process began, but if I set the platform to x86 then I can not attach to the same process

There is apparently a subtle difference that I do not know, and Especially this Not related to NET version, as I can attach to an x64 .NET2 process, even if it is under the control of VS debugger

If I get additional details then I will update my answer .

Comments