Question

I have an unmanaged application, "A", which exhibits strange behavior during runtime. "A" is an MSVC++ project (with no CLR support) which makes calls to a DLL project, "B". "B" is another MSVC++ project that has CLR support in it:

void LoggerPost(DWORD dwSeverity, LPTSTR szAppID, LPTSTR szMsgString)
{
    UnmanagedLoggerClient::LogMessage(dwSeverity, szAppID, "", szMsgString);
}

The above method, called from "A", calls the LogMessage function in "B". This call works at first, but as time goes on and the method gets called more frequently on this DLL, and eventually, calls to this method stop returning. As a result, I was trying to find out if there was a deadlock in the LogMessage method. I tried debugging into project "A" by attaching the debugger to it. To my surprise, I found out that stepping into the LogMessage function does not work! I can't seem to step into it. I have the PDB's for both projects in the same directory, and I made sure that the debugging option for "Just My Code" was off, but to no avail. Now I am trying to figure out what to do to break into this method call on runtime...any ideas?

Was it helpful?

Solution

When attaching the debugger (Debug -> Attach to Process), where it says "Attach to:" I had to hit the "Select..." button -> check off "Debug these code types:" -> select Managed (v4.5, v4.0), Native, and Managed Compatability Mode, and then attach to the process in order to be able to debug through its calls.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top