How can I put a breakpoint in DLL?
-
You need to set the DLL as the active project. Then use the appropriate executable when you run the DLL. Breakpoints in the DLL code will then work. Ant. I'm hard, yet soft.
I'm coloured, yet clear.
I'm fruity and sweet.
I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain) -
the best way is as posted by Antony M Kancidrowski, but if you have a project with 5 dlls and you want to debug all of them :wtf: you can put this in the dll code
_asm int 3;
and the debuger will stop at that line. but now you MUST start the app with a debuger attached, or you will get an exception!
-
You need to set the DLL as the active project. Then use the appropriate executable when you run the DLL. Breakpoints in the DLL code will then work. Ant. I'm hard, yet soft.
I'm coloured, yet clear.
I'm fruity and sweet.
I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain) -
Is it your DLL (you have the code)? A system DLL? Papa while (TRUE) Papa.WillLove ( Bebe ) ;
-
the best way is as posted by Antony M Kancidrowski, but if you have a project with 5 dlls and you want to debug all of them :wtf: you can put this in the dll code
_asm int 3;
and the debuger will stop at that line. but now you MUST start the app with a debuger attached, or you will get an exception!
-
If its my dll i would go for a hardcoded breakpoint like pointed by wb For System DLLs you need the function name and the dll name of course. you can Determine the exact, unmangled name of the function then Set BP on {,,dllname}Function <=- special syntax To Find the true function name u can use dumpbin. Papa while (TRUE) Papa.WillLove ( Bebe ) ;
-
Use Edit|Breakpoints (Alt+F9) and put in the name of the function. Or load the file into VC++, go to the line where you want the BP, right click and use Insert/Remove Breakpoint. Neville Franks, Author of ED for Windows www.getsoft.com and coming soon: Surfulater www.surfulater.com
-
If its my dll i would go for a hardcoded breakpoint like pointed by wb For System DLLs you need the function name and the dll name of course. you can Determine the exact, unmangled name of the function then Set BP on {,,dllname}Function <=- special syntax To Find the true function name u can use dumpbin. Papa while (TRUE) Papa.WillLove ( Bebe ) ;
-
How can I set DLL as the active project? Well I don't get what you mean. Can you explain more detailed please?
I normally have a workspace with the executable and all DLL projects loaded into the IDE. With such a workspace you need to choose the Active Project (right click on workspace project and Set Active Project or Set as Startup Project depending on IDE). You could just generate a workspace for that DLL. NOTE: If there is only one project in a workspace it is always the active project. It is necessary to point the DLL at an executable that uses it in order to debug the DLL. The IDE will ask you for this when you run the DLL. Ant. I'm hard, yet soft.
I'm coloured, yet clear.
I'm fruity and sweet.
I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain) -
I normally have a workspace with the executable and all DLL projects loaded into the IDE. With such a workspace you need to choose the Active Project (right click on workspace project and Set Active Project or Set as Startup Project depending on IDE). You could just generate a workspace for that DLL. NOTE: If there is only one project in a workspace it is always the active project. It is necessary to point the DLL at an executable that uses it in order to debug the DLL. The IDE will ask you for this when you run the DLL. Ant. I'm hard, yet soft.
I'm coloured, yet clear.
I'm fruity and sweet.
I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)