What is the best way for Debugging (hitting breakpoints etc.) methods with the [Command] attribute in Networkbehaviour classes?

When I run a unity instance as ‘LAN Host’ everything is fine and my breakpoints will be hit. Unfortunately when I run one unity instance as ‘LAN Server Only’ and one instance as ‘LAN Client’ I cannot hit ANY breakpoints.

I would like to debug my ‘Client’ instance in specific. Is it possible to hit breakpoints in a method containing the [Command] attribute in my Networkbehaviour class?

Is this even possible? And if not, what should be a good way to debug this method for this specific ‘Client’ instance? (I tried to use Debug.Log but I din’t found it very helpfull)

So all in all: What is the best way for Debugging (hitting breakpoints etc.) methods with the [Command] attribute in Networkbehaviour classes?

I’m using Visual Studio 2017.

Thanks in advance!

Methods with the “command” attribute are RPC methods. They aren’t run on the client but on the server. You have to debug the server if you want to debug such a method. The client just sends an RPC command to the server and the server actually executes that code. So you can’t debug it on the client as the client only sends off that command.

use Debug.Log to show [Command] and [ClientRpc] function. No matter your are host /client /or LanServer Mode. the low level api communication will not trigger the breakpoint in these functions.