My Code added to Actor Tick is never executed

I’m customizing a Pawn in C++ using Xcode on UE 4.19.2. Xcode version is Version 9.2 beta (9C32). macOS is 17D47.
I added some code to Tick():

    void APaddlePawn::Tick(float DeltaTime)
    {
        Super::Tick(DeltaTime);

        <My code is here>

When I Build and Run in Xcode, the editor starts up and I run my game and it breakpoints in Tick()
at Super::TickDelta(time). Then I Step Over and I end up in the caller of Tick(), namely AActor::TickActor().
From this I infer that my added source code isn’t getting compiled into the object file that is being run.
I have tried injecting a deref of 0 after the call to super, but it is definitely not being executed.

The build mode of the target is DebugGame Editor.

did you set the PrimaryActorTick.bCanEverTick = true; in your class declaration?

Yes. My pawn.cpp file is below. It definitely enters the tick routine.
It just seems to exit immediately after calling super. I put a deref of 0
but it is not being executed.


#include "PaddlePawn.h"


// Sets default values
APaddlePawn::APaddlePawn()
{
 	// Set this pawn to call Tick() every frame.  You can turn this off to improve performance if you don't need it.
	PrimaryActorTick.bCanEverTick = true;

    // Set this pawn to be controlled by the lowest-numbered player
    AutoPossessPlayer = EAutoReceiveInput::Player0;
}

// Called when the game starts or when spawned
void APaddlePawn::BeginPlay()
{
	Super::BeginPlay();
	
}

int* ptr = 0;

// Called every frame
void APaddlePawn::Tick(float DeltaTime)
{
	Super::Tick(DeltaTime);

    *ptr;

    USceneComponent* root = GetRootComponent();

    if (motionState == Stationary)
        return;

  }

// Called to bind functionality to input
void APaddlePawn::SetupPlayerInputComponent(UInputComponent* PlayerInputComponent)
{
	Super::SetupPlayerInputComponent(PlayerInputComponent);

    InputComponent->BindAction("MoveLeft", IE_Pressed, this, &APaddlePawn::MoveLeft);
    InputComponent->BindAction("MoveRight", IE_Pressed, this, &APaddlePawn::MoveRight);
}

void APaddlePawn::MoveLeft()
{
    motionState = MovingLeft;
}

void APaddlePawn::MoveRight()
{
    motionState = MovingRight;
}

I checked the disassembly and there is literally nothing being compiled into the code other than a call to AActor::Tick(flo
at). I checked the pawn tick in the PlayerInput tutorial and it has all of its code compiled in. So the key question is why
is my code not being compiled into my pawn tick. I’m getting normal looking build messages in my build log:

Showing All Messages
Performing 2 actions (8 in paralle
[1/2] Compile PaddlePawn.cpp
[2/2] Link UE4Editor-BreakOut-9569-Mac-DebugGame.dylib
Deploying BreakOutEditor Mac DebugGame…
Deploying now!

I figured out the problem. The scheme’s Build Configuration must be set to Development. It was set to DebugGame editor, and that is incorrect.

I figured out the problem. The scheme’s Build Configuration must be set to Development. It was set to DebugGame editor, and that is incorrect.