Home > database >  Debugging a TCP client/server pair of applications on Windows?
Debugging a TCP client/server pair of applications on Windows?

Time:06-06

I have a server application in .NET 6/VS2022 which creates a TCP listener, and a python 3 application which creates a socket to connect to the server application.

Rather than hopping back and forth between VS2022 and PyCharm with breakpoints in each, is there any way I can view the network communication, including contents with bytes and ASCII decode, source and remote endpoint, and source and remote process names and ids?

CodePudding user response:

A simple way is to use the Wireshark GUI application. On devices that do not allow the installation of the GUI, the network data can be recorded using tshark to a file, transferred to a PC with GUI Wireshark and viewed in detail.

https://www.wireshark.org/

(On windows, the tshark is part of the Wireshark installation. In Linux, it is installed separately from the SW repository.)

Wireshark allows you to view everything you want from the captured data. It is necessary to correctly choose the interface from which the data is recorded. If the server and client are on the same PC, you must choose the localhost interface (the loopback i/f with the address 127.0.0.1).

  • Related