how to debug addin?

M

mr

how does one use the VS 2003 IDE debugger to debug an add-in for outlook 2002?
i can't seem to attach the debugger to the OutlookAddin.dll
thanks
m
 
S

Sigurd Stenersen

mr said:
how does one use the VS 2003 IDE debugger to debug an add-in for
outlook 2002? i can't seem to attach the debugger to the
OutlookAddin.dll

You should specify the host .exe as the "executable for debug session" or
something like that, in the project settings.


Sigurd
 
T

Thaddaeus Parker

You will need to attach to the Outlook.EXE process. If you your add-in has
loaded correctly you will be able to see in the Debug Output the assemblies
that are being loaded. If you have break points set in your code, you
should be able to, once you have attached to the process, step through your
code like normal.

Regards,

Thaddaeus.
 
M

mr

of course i already tried that, but outlook fails to startup. it starts up,
request my login and password and then goes away without displaying an error
message.

i wonder if it is because i need to install the dlls and they get registered
in another place
 
M

mr

i had tried that. but when i try to attach to outlook.exe and select the CLR
i get an error "Unable to attach to the process", and if i select the native
option, the program does not break at the breakpoints. i assume that the
assemblies load correctly becasue the addin works.

plus, even if this does attach correctly, you cannot catch a breakpoint in
the onconnct ,etc methods

i have to install the addin after each new compilation rather tha just allow
it to auto-register. could this have something to do with it?
thanks for your help
m
 
T

Thaddaeus Parker

mr:

I come across that frequently myself when debugging. What you need to do is
once you install your addin, go to the project properties page of the addin
and set the location of your output files (pdb,etc) to the installation
location. It can be set at Properties|Configuration Properties|Build Output
Path.

Once you have done that you can then debug your code like normal. I know
that it works for me. It may or may not for you. You will have to ensure
that once you install your addin you don't uninstall for each build that you
attempt to make. Otherwise the pdb files that hold the debugging
information can get corrupted and you will be where you are right now.

Regards,
Thaddaeus.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top