Debugging UFunction::Invoke

Back in October Nick Penwarden highlighted several improvements that we made to Unreal Engine 4 while working on Fortnite Battle Royale.

One of the things that didn’t make the list in his article is a little debugging gem I added while working on Battle Royale. The team made heavy use of Blueprint based Widgets so we would often see callstacks in C++ like the following, which don’t capture who in Blueprints is actually making the native call.

 

[Your C++ Code]
UFunction::Invoke(...)  
UObject::ProcessEvent(...)  
AActor::ProcessEvent(...)  
[Rest of the stack]

I was working with a lot of code in Fortnite that I was unfamiliar with, so it wasn’t always obvious where the calls might be coming from. To aid in my search I added a C command you can run from the Immediate Window in Visual Studio that will print the current Blueprint/Scripting callstack.

When running an Editor build of your game, you can now use the command,

{,,UE4Editor-Core}::PrintScriptCallstack()

and just

::PrintScriptCallstack() 

in a monolithic build when using 4.18 and beyond.

I hope you find this as useful as I have in getting a live snapshot of the callstacks in your UE4 projects.

Get Prey & Wolfenstein II or Sniper Elite 4 for free with SAPPHIRE Radeon RX Vega card!

Just in time for the Holiday season, AMD has launched a new bundle with not one, but two free games that you’ll now be getting with a qualifying purchase of SAPPHIRE Radeon RX Vega 64 and 56 graphics cards. Starting November 24th, and ending till supplies last or on December 31st, 2017, at latest, you […]

The post Get Prey & Wolfenstein II or Sniper Elite 4 for free with SAPPHIRE Radeon RX Vega card! appeared first on SAPPHIRE Nation – Community blog by SAPPHIRE Technology.

Get Prey & Wolfenstein II or Sniper Elite 4 for free with SAPPHIRE Radeon RX Vega card!

Just in time for the Holiday season, AMD has launched a new bundle with not one, but two free games that you’ll now be getting with a qualifying purchase of SAPPHIRE Radeon RX Vega 64 and 56 graphics cards. Starting November 24th, and ending till supplies last or on December 31st, 2017, at latest, you […]

The post Get Prey & Wolfenstein II or Sniper Elite 4 for free with SAPPHIRE Radeon RX Vega card! appeared first on SAPPHIRE Nation – Community blog by SAPPHIRE Technology.