Breakpoints not being hit when running in debug mode

Add-in Express™ Support Service
That's what is more important than anything else

Breakpoints not being hit when running in debug mode
Debugging issue 
dexterb




Posts: 19
Joined: 2007-04-16
I am using add-in express vcl 2010 with Delphi 5. Even if I have a few breakpoints setup, they dont seem to be hit at all. I have already tried :

1) the suggestion from http://www.microsystools.com/developer/articles/delphi-dll-debug.php and 2) I also tried setting the output dir to c:\ and also made the output dll filename to 8.3 format.

Any other ideas on how to get debugging to work with an outlook add-in? The add-in that I have is very simple: I have a context menu and when clicked, I do

procedure TAddInModule.ctxMenuControls0Controls0Click(Sender: TObject);
var
strfolder:string;
begin
strfolder:='';
strfolder:= strfolder + OutlookApp.ActiveExplorer.CurrentFolder.Get_Name ;
strfolder:=strfolder + #13#10 + outlookapp.ActiveExplorer.Get_CurrentFolder.Get_Name;
showmessage(strfolder);
end;

Any other ideas on how to get this to work?

-
dexterb
Posted 06 Aug, 2010 01:00:25 Top
Andrei Smolin


Add-in Express team


Posts: 18830
Joined: 2006-05-11
Hi dexterb,

Whenver I have that problem, I unregister the DLL, put the resulting DLL to d: and register the DLL once again.


Andrei Smolin
Add-in Express Team Leader
Posted 09 Aug, 2010 04:03:32 Top
dexterb




Posts: 19
Joined: 2007-04-16
andrei,

I tried what you recommended but it didn't seem to fix the issue that I was having.

I actually created a test project, saved it to c:\ol and named the project oltest (oltest.dll). I had a contect menu and had a line in the onclick event as simple as assigning a value to a variable. I had set my breakpoint against that line, set my run parameter to the outlook 2007 exe (long path) and hit Run. Outlook runs and the context menu appears. However, when I click on the menu my breakpoint is not hit.

any other ideas?

Thanks.

-
dexterb
Posted 15 Aug, 2010 10:58:28 Top
solomenko




Posts: 140
Joined: 2009-02-27
Hi dexterb,

Try to set a breakpoint into the AddinInitialize event. If it does not work, then your Dll is not being debugged. Make Unregister and Register your addin and try again. Dll path must be short - for example "c:\temp".
Regards,
Aleksandr Solomenko
Posted 16 Aug, 2010 06:27:28 Top
dexterb




Posts: 19
Joined: 2007-04-16
Aleksandr,

I tried your suggestion, I created a new outlook addin to c:\temp ("c:\temp\test.dll"), registered it and set the breakpoint to the initialize event.

the breakpoint was not hit at all.

using :
Add-in Express 2010 VCL 6.1.754
Delphi 5 with Update Pack 1
Windows XP Pro with SP2

I'll try creating an add-in for Excel/Word and see if I can debug them.

Thanks again.

-
dexterb
Posted 30 Aug, 2010 00:13:48 Top
dexterb




Posts: 19
Joined: 2007-04-16
I just tried creating a word add-in and I had a breakpoint setup in the initialize code but it wasn't hit at all.

Using Office 2007 with all updates installed.

-
dexterb
Posted 31 Aug, 2010 00:23:07 Top
Alexander Solomenko




Posts: 140
Joined: 2009-02-27
Hi dexterb,

I think something may be wrong with your Debugger.
Could we have a remote session to investigate this problem?
Regards,
Aleksandr Solomenko
Posted 31 Aug, 2010 09:52:27 Top
dexterb




Posts: 19
Joined: 2007-04-16
Alexander,

I'll try to setup the machine for remote access. In the meantime, I tried uninstalling Delphi 5 and reinstalling Delphi 5 and update pack 1. I then installed the add-in express 2010 vcl. Still can't hit breakpoints. Regular windows app project allows me to stop on breakpoints.

what would be the best time for you to connect?

-
dexterb
Posted 03 Sep, 2010 00:02:38 Top
Jason Coley




Posts: 272
Joined: 2005-05-26
Have you tried compiling the dll to the System32 or SysWow64 folder, then registering it in this location, then tried to debug using delphi?
Posted 03 Sep, 2010 00:13:41 Top
dexterb




Posts: 19
Joined: 2007-04-16
Well, good news! I finally managed to have Delphi stop on my breakpoints. In the Project Options | Compiler settings, I selected "Use Debug DCUs".

amazingly this one setting made it all work.


Thanks Alexander for pointing out that it could be the debugger. I just wish that I didn't have to reinstall Delphi - but hey, got it to work and thats all that matters :)
-
dexterb
Posted 03 Sep, 2010 01:00:11 Top