Unable to debug: The binding handle is invalid

When i try to debug a C# application I get this error:

Error while trying to run project: unable to start debugging
the binding handle is invalid

What can i do?

Thanks for your answers

[195 byte] By [luca82] at [2008-2-4]
# 1
i tried with "Attach to process" but i get the following error:

Unable to connect to the Microsoft Visual Studio Remote Debugging Monitor named <my pc name>. The binding handle is invlaid

But i am debugging a local application, not a remote one

luca82 at 2007-9-9 > top of Msdn Tech,Visual Studio,Visual Studio Debugger...
# 2

I have the same problem and no solution for now. :(

July Beta 2 VS 2005 Profesional.

JulyBetaDoesntWork at 2007-9-9 > top of Msdn Tech,Visual Studio,Visual Studio Debugger...
# 3
i tried with august C# express beta (8.0.50727.7) but i'm still unable to debug :(
luca82 at 2007-9-9 > top of Msdn Tech,Visual Studio,Visual Studio Debugger...
# 4
Maybe I found the problem.... The solution configuration is on "Release". the problem is that i cannot change it to debug, cause the combobox in the toolbar is gray. and even from the project properties from the menu i am unable to change to Debug.

I don't know if it is an express problem or express restriction.

Anyone can help?

luca82 at 2007-9-9 > top of Msdn Tech,Visual Studio,Visual Studio Debugger...
# 5
I had the same problem, solved it by disabling the "Visual Studio hosting process"
("Project" -> "[ProjectName] Properties..". -> "Debug" -> Disable "Enable the Visual Studio hosting process")
Whats the purpose of this "Visual Studio hosting process" ?
b.hesse at 2007-9-9 > top of Msdn Tech,Visual Studio,Visual Studio Debugger...
# 6
thank you very much!! It works!!
luca82 at 2007-9-9 > top of Msdn Tech,Visual Studio,Visual Studio Debugger...
# 7
But the projects seem to run much slower than usual.
b.hesse at 2007-9-9 > top of Msdn Tech,Visual Studio,Visual Studio Debugger...
# 8
i don't know if it can help but there's a service called .NET Optimization Runtime Service.... i don't know what it stands for, but maybe it will help :)
luca82 at 2007-9-9 > top of Msdn Tech,Visual Studio,Visual Studio Debugger...
# 9
did anyone find the source of this error or a proper fix?
here's some more info:

http://lab.msdn.microsoft.com/productfeedback/viewfeedback.aspx?feedbackid=1c26f151-6455-4117-998a-41f4675fe7e7

ZAiNT at 2007-9-9 > top of Msdn Tech,Visual Studio,Visual Studio Debugger...
# 10
This is sounding like some sort of DCOM/RPC configuration issue, but it is hard to know for sure. Luca, you said that you tried with attach, do you mean you tried with 'Tools->Attach To Process'? Which part fails -- listing processes or attaching?

It sounds like everything is experiencing this problem for managed projects. Do you still have this problem for native projects? How about attaching to a native project (example: notepad.exe)

Thanks,
Gregg

GreggMiskelly at 2007-9-9 > top of Msdn Tech,Visual Studio,Visual Studio Debugger...
# 11

My own bug report with an alternative workaround(?).. I've gathered some (I think all?) of the posts regarding this binding handle error. Take a look here:

http://lab.msdn.microsoft.com/productfeedback/viewfeedback.aspx?feedbackId=fa98bc3d-609d-4d88-81d6-e737e4e7700e

Thx,

ZAiNT

ZAiNT at 2007-9-9 > top of Msdn Tech,Visual Studio,Visual Studio Debugger...
# 12
Thanks for your efforts ZAiNT. Both your work around, and the work around of disabling the Visual Studio hosting process actually have a fairly similar effect on how the debugger works internally.

Since it sounds like several people have run into this, if possible we would like to know what the real problem is. So if you have the time, could you let us know:

If you start a managed process outside the debugger (Ctrl-F5), are you able to attach to it (Debug->Attach To Process)?

If not: At which point does it fail? If you have a SKU that also supports native debugging, are you able to debug the native code in the process?

Thanks,
Gregg

GreggMiskelly at 2007-9-9 > top of Msdn Tech,Visual Studio,Visual Studio Debugger...
# 13
If you start a managed process outside the debugger (Ctrl-F5), are you able to attach to it (Debug->Attach To Process)?

No, I start the process (Ctrl-F5) and as soon as I click, Debug->Attach To Process, i get the 'Unable to connect to the Microsoft Visual Studio Remote Debugging Monitor named 'COMPUTERNAME'. The binding handle is invalid.'
messagebox.

'If you have a SKU that also supports native debugging, are you able to debug the native code in the process?'

I'm not really sure what you mean by this so I think you will have to guide me a bit.
I can see two checkboxes, 'Load DLL exports' and 'Enable RPC debugging' in Options->Debugger->Native. What kind of project do I need to make? And what do I have to do next?

Thx,

ZAiNT

ZAiNT at 2007-9-9 > top of Msdn Tech,Visual Studio,Visual Studio Debugger...
# 14
ZAiNT,

Thank you so much for your help. To test native debugging:

1) File->New->Project...
2) Visual C++->Win32 Console Application
3) F10

Thanks,
Gregg

GreggMiskelly at 2007-9-9 > top of Msdn Tech,Visual Studio,Visual Studio Debugger...

Visual Studio

Site Classified