Re: Disable breakpoints inside dll

Tech-Archive recommends: Fix windows errors by optimizing your registry



Mandi wrote:
This dll is loaded and ran by the new exe (by using LoadLibrary) but with
problems.
Trying to debug it with the debugger, the exe dose run but breakpoints
inside the dll become automatically disable (recompiling doesn't help).


We have a couple .exe's, one launching the other and the way we handle debugging the invoked .exe is to put a MessageBox in so the code halts at that point. We then attach to that process with the debugger, verify break points (usually having one set just after the MessageBox invocation, and click OK on the MessageBox. We don't start the calling ..exe with the IDE/Debugger, so it's not being traced. If we needed to do both, I would probably use two instances of the IDE.


I would imagine the same thing works out for your .dll, and that unless you needed to debug something that happens as soon as you attach to the DLL, you may not even need to stop the program with a MessageBox. We use it because we were debugging things that happen as the frameworks initialize.

I'm interested in learning "the right way" to handle this.

--
Jacob
.



Relevant Pages

  • Re: Dll problems after suspend
    ... EXE becomes invalid, so after wake when it tries to page it pukes. ... But when I switch the device on and off while the MessageBox ... takes place during resume that could influence Dll positions/registers? ...
    (microsoft.public.windowsce.app.development)
  • Re: Dll problems after suspend
    ... So are you saying I should copy the exe and all statically loaded Dlls ... I guess the best time to do this is in the setup dll. ... and then MessageBox() again. ... address and then jumps to it. ...
    (microsoft.public.windowsce.app.development)
  • Re: Cant debug Forms DLL (Managed C++)
    ... In the module window the symbols are loaded for the exe and for the dll, ... when I put the debugger to managed only. ...
    (microsoft.public.vsnet.debugging)
  • Re: Dll problems after suspend
    ... So are you saying I should copy the exe and all statically loaded Dlls ... I guess the best time to do this is in the setup dll. ... But when I switch the device on and off while the MessageBox ... address and then jumps to it. ...
    (microsoft.public.windowsce.app.development)
  • Re: Remote debugging of the COM process
    ... breaks into debugger, ... > an error being raised in the DLL. ... > and after one or two failures, the EXE would DrWatson with an invalid ... > accounts then there problem doesnot occor; if they are domain accounts ...
    (microsoft.public.vc.debugger)