Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
23 Views

Debugger Does not Stop at Breakpoint

Hello developers,

I'm using visual studio 2015 and Intel Parallel Studio XE 2016 Update 3 Cluster Edition. My project includes two linked projects; an exe and a dll. The startup project is the dll. The debugger only stops at the breakpoints that are in the exe code but not in the dll code. I'm trying to figure out where the problem is. This problem just recently occurred. I was able before to debug the whole project. In fact, I'm working on a similar project using the same set of settings without problems. Can you please help with that?

0 Kudos
3 Replies
Highlighted
23 Views

A dll cannot be a startup project. Set the main (exe) as startup.

If you are having issues setting a break in a DLL from the IDE prior to run, then you may have a PATH issue where the DLL in your project is not the DLL that will be run during execution.

To get around this, if you have an innocuous function in the DLL, then near the start of your exe place a call to this near the start of the DLL (or add a dummy function that does nothing and call that). Set the break point in the exe at the call to the dummy function. Use Step Into to enter the DLL. Once there set the break points as needed.

*** if you are loading the wrong DLL, then the source and the binary will not line up. VS may complain about this or may not.

*** if the Step Into performs a Step Over then it may be due to a) wrong DLL, or b) no debug symbols in DLL or c) ???
To get around this, restart the exe, when at break at call, then open the Dissassembly window, set focus there, perform Step Overs until you reach the call to the DLL function, then perform Step Into. Once there you can close the Dissassembly window, then look around to assure the DLL loaded is the DLL in your project.

Jim Dempsey

0 Kudos
Highlighted
23 Views

A DLL can be the startup project if you have defined the command to run on the Debugging property page. This is often done when the executable that loads your DLL is not something you developed (VB or Excel, for example).

0 Kudos
Highlighted
23 Views

Thanks for correcting me.

Jim Dempsey

0 Kudos