1) Open the XLL under the compiled debug
2) Project Property->configuration Properties debugging
Set Attach as "Yes"
Set Command as "C:\Program Files\Microsoft Office\office11\excel. EXE "
Finally,i found a solution here.
To enable debugging:
1) Goto Project->helloworld Properties
2) on the left expand "Configuration Properties"
3) Expand "C + +"
4) on the left, select "General"
5) on the right, change ' Debug information Format ' to ' program Database for Edit and Continue (/zi) '
5) on the left, select "Optimization"
6) on the right, change "optimization" to "Disabled (/od)"
7) on the left, expand "Linker"
8) on the left, select "Debugging"
9) on the ' right ', change ' Generate Debug Info ' to ' Yes '
(Ten) Click OK
One) Set your breakpoints
Rebuild your application
Also when running your application use CTRL+F5 to build and run it, this keeps the console window open long enough for you To see your output.
XLL Debugging Methods