Breakpoints not getting hit - "the module did not load at the default load address"
Asked Answered
M

1

6

I'm trying to debug the CPPUnitTests and the breakpoints are set in the files that are a part of the to-be-tested DLL (C++ unmanaged dll).

I attached the CPPunit tester process to the visual studio IDE where the project is open, in the native mode (tried managed + native too) and then ran the tests but the breakpoints are NOT getting hit at all.

The breakpoints appear to be fine (FULL RED DOT). I built all the necessary the DLL in Debug Build.

I went to Debug->Windows->Modules to check if the tester process loaded the DLL that I'm debugging and it did, and the SYmbol File is loaded too, but there is an exclamation mark in the DLL's name and it says "the module did not load at the default load address" when i hover my mouse over it.

How do i fix this? I need to debug the cppunit tests.

Muttonhead answered 6/8, 2014 at 5:57 Comment(4)
Try to debug using windebug!Sixteenmo
Are you sure the code should go throw the breakpoint you picked?Sixteenmo
@Sixteenmo Yes I'm sure. Also, i have limitations on which softwares i can use, so WINDBG is kind of stress.Muttonhead
"the module did not load at the default load address" is normal situation and should not affect the debugging. Check in Output window whether debug information is loaded.Shrive
C
-2

I had a similar problem and after hours can fix it with this:

  1. Go to the Project properties (secondary click on the project -> properties)
  2. Select "Compile" option on right menu
  3. In Configuration select "Debug".
  4. Click on "Advanced Compile Options" button
  5. Make sure that is selected "Full" on Generate debug info combo box.

I hope this help you!

Regards.

Collins answered 20/8, 2014 at 19:7 Comment(1)
I believe that the Compile tab only exists in Visual Basic Projects.Escamilla

© 2022 - 2024 — McMap. All rights reserved.