Unable to attach to the selected process
AlexBrunner
Posts: 5 Bronze 2
I just installed the Memory Tracker on my machine.
When I now run the application and select a process to track, I get the error message : Unable to attach to the selected process.
I have local administrator rights.
Could you please tell me what I should do to get it running?
Regards,
Alex
When I now run the application and select a process to track, I get the error message : Unable to attach to the selected process.
I have local administrator rights.
Could you please tell me what I should do to get it running?
Regards,
Alex
Comments
Have you installed the debugging tools ( http://www.microsoft.com/whdc/devtools/ ... fault.mspx)?
Red Gate Software Ltd
I just installed the mentioned debugging tools. All works fine now.
Thanks for your support.
Regards,
Alex
I'm trying to track the memory of a .NET 2005 application. I've tried to attach to the debug as well as the release version and I've also run the app from within VS.NET 2005 and attach to the exe that way. No luck.
Any ideas what else could be missing or wrong?
Thanks.
Andi
The memory tracker tool seemed like just what I needed to analyze the memory usage of a process, but I am getting the "unable to connect to the selected process" error while connecting to any process.
I have installed version 6.11.1.404 of the Debugging Tools for Windows. Windbg fires up fine, but I just don't seem to be able to connect to any process running with the memory tracker.
This is on a Windows Server 2003 machine.
Any ideas? Anything I can do to provide some diagnostics?
Thanks
Pete
I'm not sure where to look for diagnostics. Just about any process should allow you to attach a debugger. Maybe memory tracker doesn't allow you to connect to unmanaged processes as it's primarily meant for .NET?
No, I don't think that's it. The screenshot on the download page has it showing the memory of explorer.exe which I'm pretty sure is unmanaged. Plus the application I'm trying to connect to is partially managed and I've tried it with unmanaged code (reflector) and it doesn't work either.
The thing is I can connect to processes fine using windbg, so I don't think its the debugger.
Maybe the version of the debugging tools for windows is important? I tried to reflect the assemblies but they've been obfuscated (rather obviously) so I can't even help myself to diagnose.
I suspect that the "unable to attach" error is a generic catch all. If there was a bit more information about why it was unable to connect, that would be helpful!
Thanks
Pete
I have done some more investigation and it looks like the tool requires the following registry key/values:
HKCU\Software\Microsoft\DebuggingTools
. Debugging Help - REG_EXPAND_SZ
. Global Flags - REG_EXPAND_SZ
. Release notes - REG_SZ
. WinDbg - REG_EXPAND_SZ
Set the Debugging Help, Global Flags and WinDbg values to the install folder of debugging tools for windows, "c:\Program Files\Debugging Tools for Windows (x86)\" on my system, and leave the Release notes one empty.
Then on my system the memory tracker could actually connect.
It looks like those keys were removed from the Debugging Tools for Windows in later versions.
Hope that helps anyone who wants to use this tool!
Cheers
Pete
More info - I downloaded the Microsoft Windows Driver Kit 7.1.0.7600 and *only* checkmarked 'Debugging Tools for Windows'.
Should I have perhaps installed everything?
Like previous posters, I'm currently unable to attach to any process running on this PC with Memory Tracker, although I can attach using windbg.exe
I'm trying to track the memory of a .NET 2005 application. I've tried to attach to the debug as well as the release version and I've also run the app from within VS.NET 2005 and attach to the exe that way. No luck.
Any ideas what else could be missing or wrong?
Wow, you're like a detective with this stuff! 🕵️♂️ I followed your steps, and guess what? It worked like a charm on my system too. Who knew that a few registry tweaks could make such a difference? Quick question though - did you stumble upon this solution by chance, or was it more of a Sherlock-Holmes-level investigation? Also, for anyone else reading this, remember to back up your registry before making changes. We don't want to turn a small hiccup into a full-blown system meltdown, right? Thanks a ton for sharing this. You've saved my day, and probably a few others' as well!