Comments
5 comments
-
Hi.
We've not seen that message before when setting a breakpoint.
Do you have a small self contained example that you could send me that reproduces the problem? If not, what method are you trying to breakpoint?
Thanks -
I'm experiencing this also, in my case I'm debugging a Windows Service, so I have to run the service, than attach the debugger to it. Visual Studio 2010. Maybe that's the problem? It's really annoying because I have to step through a LOT of code to get to the place I want to debug. OTOH, it's better than nothing!
-
Can you give us any more details about the service so I can try to reproduce?
Thanks -
I don't think I'll be able to spend the time required to create a simplified example, but I'll tell you what I can. We're hosting our Wcf Service in a Windows Service and using the Net.Tcp protocol with sessions enabled. Another thing we found was a dialog when trying to set a breakpoint saying that the dll we were debugging had been optimized. In the debugging session, I'm installing the Windows Service on my development box and running it under the Local System account (lots of rights). Then I start VS2010 and attach to the process with the debugger and set a breakpoint in my code. Once I step into the DLLs where the error occurs (Microsoft.Synchronization.Data and Microsoft.Synchronization.Data.SqlServer) I find that Step Over sometimes skips over several lines of code at once, so I always use Step Into instead. In a couple of instances, it seems to return from the middle of a method, several levels higher in the call stack for no apparent reason. Hope this helps...
-
Thank you for the information. I'll have a go at reproducing the problem.
Add comment
Please sign in to leave a comment.
However, when I set a breakpoint I get an error message "Unable to set breakpoint" with a bunch of error details, and finishes by saying "the common language runtime was unable to set the breakpoint"
The breakpoint then shows up as disabled. Continuing to debug, the program will break at the breakpoint, but no information for any local variables will be available as the code is "optimized".