Changes to code not executing sometimes - Frustrating

I’m just starting to learn UE4 (and C++, though I’m not new to programming). I just spent 5 minutes writing a detailed post, I wanted my character to stop rotating towards the direction of movement. So I set bOrientRotationToMovement to false, it wasn’t working as expected. This was after about an hour of reading up on it. Then right before submitting the thread, I loaded up my project again and clicked play, and realized it was working as it should have an hour ago (finally, lol).

I’ve had this problem happen a few times, but usually related to components. For example, modifying any of the below variables will successfully compile, but when I hit play, there isn’t any change. What I have to do is delete the lines, compile, paste the lines back, then compile again. Restarting the editor sometimes works.


	
CameraBoom = CreateDefaultSubobject<USpringArmComponent>(TEXT("CameraBoom"));
CameraBoom->AttachTo(RootComponent);
CameraBoom->bAbsoluteRotation = true;
CameraBoom->bDoCollisionTest = false;
CameraBoom->TargetArmLength = 1500.f;  // This one actually doesn't require the "fix" above
CameraBoom->SocketOffset = FVector(0.f, 0.f, 0.f);
CameraBoom->RelativeRotation = FRotator(0.f, 180.f, 0.f);
CameraComponent = CreateDefaultSubobject<UCameraComponent>(TEXT("SideViewCamera"));
CameraComponent->AttachTo(CameraBoom, USpringArmComponent::SocketName);
CameraComponent->bUsePawnControlRotation = false;


It’s really frustrating when trying to debug things. It’s hard to tell if things aren’t working because the code is simply wrong, or if I just need to do some weird work around. Is this common? I’m using 4.8.1.

Sometimes things just fail to hotload correctly. Usually what I do is just compile it in VS and wait for it to be reloaded in the editor. Occasionally I make a change and it can’t do this - in which case the compile button at the top disappears.

I try to keep this in the back of my mind when debugging things - if I’m reasonably sure that what I’m doing is correct, or I just can’t think of anything else to do I shut down the editor, then compile from VS ( which deletes all the temporary libraries) and then restart the editor. That rarely fails. I’m using 4.7.