Unable to attach to the selected process

AlexBrunnerAlexBrunner Posts: 5 Bronze 2
edited May 5, 2011 10:22AM in Memory tracker
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

Comments

  • Alex,

    Have you installed the debugging tools ( http://www.microsoft.com/whdc/devtools/ ... fault.mspx)?
    - Neil Davidson
    Red Gate Software Ltd
  • AlexBrunnerAlexBrunner Posts: 5 Bronze 2
    Hi Neil

    I just installed the mentioned debugging tools. All works fine now.

    Thanks for your support.

    Regards,
    Alex
  • I'm also getting this error and I did install all the required Windows Debugging tools. I have WinXP SP2 and installed the Windows Symbols for XP SP2 as well as the debugging tools version 6.9.3.113.

    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
  • I've got Debugging Tools for Windows installed. I tried attaching to the w3wp.exe process, and it couldn't.
  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    It's not because of the "illegal characters in path" issue, is it?
  • Hi,

    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
  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Hi 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?
  • Hi,

    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
  • Hi,

    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
  • Brilliant Pete - that certainly helped me!
  • I'm running Windows 7 and I've just installed the Debugging Tools for Windows and searched for the Registry Keys Pete mentions and I can't find them anywhere.

    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 also getting this error and I did install all the required Windows Debugging tools. I have WinXP SP2 and installed the Windows Symbols for XP SP2 as well as the debugging tools version 6.9.3.113.

    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?
  • I'm also getting this error and I did install all the required Windows Debugging tools. I have WinXP SP2 and installed the Windows Symbols for XP SP2 as well as the debugging tools version 6.9.3.113.

    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?
    Update your Windows Installer to version 1.1 before installing the debugging tools, maybe you have luck with this. If you are running Windows 2000 or a later version of Windows, then you already have Windows Installer 1.1 or a later version, and there is no need to reinstall it.
  • ashvagandaashvaganda Posts: 4 New member

    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!

Sign In or Register to comment.