Download

Debugging and Replication

Hi guys!

I’ve been doing a lot of work with networking / replication lately, and was wondering what people are doing to debug - I’m mostly using on screen messages to debug the old fashioned way, but this has it’s limits! Are there any tools in UE4 that I haven’t seen? Some kind of networking profiling tool seems almost essential in this day and age, as an example.

As an example, I’m currently trying to work out why a bool is not triggering it’s associated repnotify function (replicatedusing=) on clients - but there doesn’t seem to be a way to do this :frowning:

Dear Ambershee,

What class is involved? can you post your code?

I think the forum is the new UE4 debugging tool :slight_smile:

:slight_smile:

Rama

PS: to contribute to your question, I just rely on UE_LOG and I"ve not heard of any networking profiling tool so far

Hey Rama!

I’m not too worried about individual code (I’ve also already solved that problem now anyway) - but it’d be good to know how people go about actually debugging and profling this stuff. A profiler tool would be especially handy, I think. It’s kind of good to know what kind of bandwidth you’re using etc.

Hey Ambershee

i have’nt tested it yet but in the answer hub i found an interresting post about network profiling.

Launch the game in editor build then enter netprofile in the console to start recording then do it again to stop it. After that you should see a .nprof in your game Saved/Profiling folder. To read the file launch the NetworkProfiler located in: < your Unreal install directory >/< version >/Engine/Binaries/DotNET/NetworkProfiler.exe

Hope it’s help

Good question actually!

My crude (hammer to fly) debugging:

  1. Setting up break points in Visual Studio, and commenting each function, where it is supposed to run. Then I just step by step, try to diagnose problem.

  2. stat net.

  3. https://answers.unrealengine.com/questions/32218/show-network-traffic.html

Though there certainly would be nice to have some option of explicitly looking at which functions are executed where (client, server), and what data is transferred in real time.

If you are working with network code and server.
I Have found that attaching the server process to Visual Studio Debuger and running under Debug_Editor works very well.

I typed in Stat and could see NET in the list, so I typed N and TAB to autocomplete, and it says that Stat NET command not found.

But it is listed exactly as Stat NET

I wonder why it’s not getting recognized?

Rama

I searched my entire UE4 Engine Github 4.2 directory structure and could not find NetworkProfiler.exe, though I do see all the source code.

Is there some special way Github builds can build the NetworkProfiler.exe?

:slight_smile:

EDIT:

I built the NetworkProfiler.sln and it produced the .exe,

It’s pretty neat!

You can just open it and then click the button to choose a file, you dont have to supply it in the commandline.

Here’s a pic of the properties tab!

I must say Epic, you really did have the NetworkProfiler choose an unusual color palette!

I rather like it!

:wink:

Yay!

Rama

Stat NET is not working in 4.2,

but I reported the issue and it is now fixed!

You can download the fix for your github engine here

https://answers.unrealengine.com/questions/62815/consolecommand-stat-net-showing-as-command-not-fou.html

Rama