How can I debug event handler code in the IDE?

D

Dave Jenkins

Pretty much says it all ...

I'm using PPT 2007, and have devloped an extensive set of add-ins using
VBA. I would like to debug that code to isolate some differences between the
2003 and 2007 implementations, and I'm tired of inserting MsgBoxes all over
the place, recompiling, saving the .ppam, rebuilding the ribbon xml, etc.
Surely there's an easier way? I just want to put a break in the code and
then Run a macro that ultimately causes one of the events to fire and then
break at the point of interest. Is that posssible? How?

Thanks.
 
D

Dave Jenkins

Thanks, Steve.

Do I need to reboot after the reg edit? I added the DebugAddins parameter,
but nothing seemed to change. Maybe I'm suffering from a terminal case of
user error. Here's what I attempted to do:

1. Brought up the .ppt containng the code I wanted to debug
2. Placed a breakpoint on the first line of code I KNOW gets executed on a
certain event.
3. Went back to the Slide view and triggered the event (which fired), but I
didn't enter the debugger.

Well, that's not too much of a surprise, so I figured I have to invoke the
event code from within the IDE itself. If it was just a normal macro, I
could do an IDE Run->Run Sub. But that won't work - I don't have a macro
defined that I can run - the blooming code is an event handler.

And there I'm stuck. Any suggestions?
 
D

Dave Jenkins

It's definitely a .ppam (add-in) and I know the event fires.

Thinking back, I think I asked you about this maybe a year ago, when I was
on 2003, and I couldn't get it to work then, either. Any diagnositc
procedures you can suggest to help me figure out what's usurping my
breakpoint? Are there some secret debugger parameters that govern whether
the debugger works in event handlers?
 
D

Dave Jenkins

Ok - head-slap time.

First of all, the event debugging works just as you said it does.

Second of all, I was trying to debug Windows events that were not triggered
from within the rest of my VBA code -- PresentationBeforeSave, e.g. I
inserted a Save in one of the macros, and when I executed that - voila!

But what I *really* want to do is debug some code that fires when a shape is
double-clicked. Is it possible to simulate a single- or double-click in
code? I think I have seen that question asked many, many times and don't
recall ever having heard or seen a good, crisp answer.

As always, thanks, Steve.
 
C

Chirag

Steve Rindsberg said:
Jenkins
wrote:

Better you than me, sir. My ears are ringing hard enough already from
past
transgressions. ;-)


You can trap the selection event to run code when something is
singleclicked
but I don't know of any way to deal with doubleclicks.

Hello Chirag???

Is this in Slide design views or during Slide Shows?

- Chirag

Shortcut Manager - Assign keyboard shortcuts to menu items and macros
http://officeone.mvps.org/ppsctmgr/ppsctmgr.html
 

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