You want to test a network application on localhost, but Wireshark cannot capture localhost traffic on Windows. Wireshark uses the WinPcap library to capture network traffic on Windows. But unlike Linux, Windows does not expose a loopback network interface that can be used by WinPcap.
The solution is another awesome tool from Nirsoft called SocketSniff. This can be used to capture the network traffic of any Windows process. It captures the traffic on the Windows Sockets (WinSock) of the process and does capture any localhost traffic of this process that happens with the loopback network interface.
Tried with: SocketSniff 1.07