Blueprint Breakpoint Not Hit

Hello,

is an interesting issue. I have a breakpoint on a OnComponentHit event on a box BP. I have a pawn BP object with a sphere collide with it and it generates an OnComponentHit event and hits my breakpoint. Now, if I copy that pawn BP and name it something else like PawnBPTest and have it run into the box, it hits the breakpoint as well. All as expected.

Then, in the editor I select the box object, copy/paste it and move it somewhere else. I have the PawnBPTest object collide with it. No breakpoint is hit.

What’s weirder is that doesn’t appear to be consistent. If I swap these PawnBP’s between the objects and run again, sometimes I hit breakpoints, sometimes I don’t.

Is an editor bug, or something I don’t realize about Blueprints and instances? I tried selecting “Edit PawnBPTest” in the World Outliner and it brought me to the same Blueprint as the PawnBP one uses, with the breakpoints there. Is there a bug with Blueprints where they sometimes don’t hit breakpoints? I hope not, as a developer, I know breakpoints are vital!

I’ve noticed something similar over a month ago on 4.10.1.
Breakpoints do not always get hit. It’s still happening on 4.10.4

I have a simple base class for weapons which consists of a static mesh, particle emitter and a sphere. There are 4 children of that base class with their own, unique static mesh and the sphere size adjusted.

I was trying to debug why the particle effect wasn’t reenabling and ran into breakpoint problem. After seeing your post I made some tests:

※I placed a break point on sphere begin and end overlap calls in the base class.

Test 1: I placed each of the 4 children in the world and tested each one, 1 at a time. Each one hits the breakpoint when there is only one in the world.

Test 2: I then added a second one, in addition to the last solo one that I verified worked. Only the first one fires.

Test 3: I then deleted all of the them (the 2 of’em), and placed all 4 of them in the level. Only the last one I placed fires.

Test 4: I deleted the 4th one and thought maybe the 3rd one I placed would fire. Not to my surprise it didn’t. hehe
For some reason now only the 2nd one fires.

Maybe there’s a “Musical Breakpoint” setting defaulted to “On” somewhere.

I talked to some co-workers and they mentioned that Unreal has a filter for what object you hit the breakpoint on. I haven’t tested it, but am sure is the fix as I’ve also seen the filter. You can find it up in the blueprint editor to the right of the play icons. The default is one of the objects as I understand, but you can change it to hit on any object, or one that you specify. Likely the semi-random behavior we are seeing is based on how the objects are stored in memory, so it will take whatever one is next in the list.

Give that a shot and if it works, please do post it as an answer so others can know what to do.

1 Like

Hey Elbryan thanks for the info. I used it to find a solution to my problem.
( isn’t really an answer, more just a confirmation to the answer your colleagues provided to you, and you to us.)

tl;dr Yes, it appears the debug filter is the way to get it to break on specific objects (copied or not) or classes.
Afaik, the objects/parent classes you want to break on have to be in the world in order for it to show up in the debug filter list.

In my case I wanted to debug problems with the base class. In order to do that I needed to set the Debug Filter for the base class to “No Debug Object Selected”. Here’s a ss of it:

As you assumed, it seems to pick 1 default instance, possibly by alphabetic order, or order of placement in the world. (In your case you said sometimes it hits, sometimes it doesn’t. I’ve seen that before too. I don’t have it happening right now, but I’d imagine that if I set the filter to the exact object I want to debug that it’ll probably hit 100% though.)

Regardless, thanks to you blueprint breakpoints are less of a mystery. Thanks for the help.

I have a custom player controller who, onBeginPlay, if has authority and is local player controller, gets the controlled pawn, casts it to my FlyBy pawn and calls it’s custom event “ChangeColor”.

“ChangeColor” will then change my material-instance’s “Color” parameter to red. No input value, nothing, is basically just at rigger to run color change. I put a breakpoint on the parameter-change node. The pawn gets recolored from white to red as it should be but the breakpoint is not called. If I put the breakpoint before the call to custom event, into my controller, it works. But inside my pawn’s custom event, it does not. Even though it runs as intended.

The custom event is set to multicast (did try the others as well).
No debug filtering has been set.