In this lesson, you will learn how to leverage the Unreal Engine Net Debugger to visualize and troubleshoot the synchronization state of your actors in real-time.
Visualizing Network States
When your replication logic becomes complex, log files often fall short because they lack spatial and temporal context. The Net Debugger (accessible via the NetDebug console command or by enabling the Net Debugger plugin) acts as an "X-ray" for your network traffic. It allows you to see exactly which actors are replicating, which properties are dirty, and how the server is making decisions about your client’s relevancy.
Analyzing Role and Property Updates
Once the debugger is active, you can target specific actors to inspect their Role and RemoteRole. This is critical when you suspect an authority mismatch—for example, if a SimulatedProxy is failing to receive a property update because the server incorrectly determined the object was dormant.
The interface highlights two key areas:
- Replication Status: Displays if an actor is "Dormant," "Relevant," or "Active." If an actor is missing in the debugger, it’s not being replicated to that specific client, pointing directly to a potential issue in your
IsNetRelevantForlogic or distance culling settings. - Property Dirtying: As properties change, you will see them blink or highlight in the debugger. This allows you to verify that your
DOREPLIFETIMEmacros are firing correctly. If you update a variable in code but it never shows as "dirty" in the Net Debugger, you know your property hasn't been properly registered for replication.
Practical Workflow
To use this effectively:
- Launch a Play in Editor (PIE) session with "Number of Clients" set to 2+.
- Open the console and type
NetDebug. - Use the
PlayerControllerto focus on the actor in question. - Observe the NetGUID and Replication Frequency. If the property update rate seems off, compare these values against your
NetUpdateFrequencysettings.
By watching the data stream in real-time, you can distinguish between a logic error in your gameplay code and a failure in the underlying replication channel.
Key Takeaway: The Net Debugger is your primary diagnostic tool for verifying that the server is successfully pushing property updates and that clients are correctly interpreting their network roles.