News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

How to test a server and a client?

Started by resander, November 09, 2009, 10:05:47 AM

Previous topic - Next topic

resander

The server uses sockets and listens for request messages issued by a client program.
Eventually, the server will run on a remote machine, but at the moment it runs on the same PC as the client and communicates via localhost loopback.

I start the server program from the Linux/Ubuntu command line and then the client program from codeblocks. I debug, single-step, watch variables etc on the client via codeblocks and use printf on the server. Using printf is tedious, so it would be nice to be able to use codeblocks on both server and client when both are active.

Starting the server from the Ubuntu menu, Applications->Programming->Codeblocks works fine, but when I try the same for the client program nothing happens, i.e. there is no second instance of codeblocks appearing for the client.

How can I debug both server and client using codeblocks?


zabzonk

Make sure that Settings|Environment|General Settings|Allow only one instance is unchecked.

Jenna

And if it's a newer version of C::B (aka a nightly), uncheck also "Use an already running instance (if possible)" in the "Interprocess ..." frame just below.

zabzonk

Jens, could you give a one-line explanation of what that setting actually does? The box surrounding it sems to suggest it has something to to with DDE, which I wouldn't have thought anyone was using anymore (especially on Linux).

Jenna

On windows it's dde, on linux ipc via unix-socket.
It's needed to open a file from your file-explorer (explorer on windows or nautilus, thunar, etc. on linux) in an already opened C::B instance.

See also the C::B-manual chapter 1.11.2 .

resander

Zabzonk & Jens:

Many thanks.

I can now debug both server and client using codeblocks.
Great!