Advanced

Listening on a different port

You can select the port that the Debug Server will listen on for incoming connections from Debug Clients.

Step 1: Set Port in Debug Server

Run the Debug Server application (from the Workers tools menu or desktop shortcut) and in the connection section at the top of the application window, press Change Port (image below). A dialog will appear that will allow you to enter a new port number. The Debug Server will then re-launch itself and listen on the new port.

Step 2: Set Port in Debug Client

By default, a Debug Client will try to connect to the Debug Server on port 6981. But you can change this by setting the input Debug Server Port on the Debug Client Loader.vi to another number (image below).

When you run the Launcher VI (image above), the Workers application will connect to a Debug Server listening on the same port.

Running Multiple Debug Servers

You can have one or more Debug Servers running at the same time, each listening on a different port. This allows you to view multiple Workers applications on different Debug Servers.

To do this, load the Debug Server (from the Workers tools menu or desktop shortcut) a second time while an instance of the Debug Server is already running. The second instance will launch and start listening on the same port as the already running Debug Server. Change the port for the second Debug Server, which will reload it to listen on the new port you have selected.

Running the Debug Server in Client Mode

By default, the Debug Server runs in Server mode. This provides a very response experience when developing, because every time you run a Workers Launcher VI containing a Debug Client Loader.vi, the Debug Client background task will immediately connect to the Debug Server without any delay. This mode also allows you to have more than one Workers applications connected to the Debug Server over the same TCP port.

The disadvantage of Server mode is that every Debug Client is required to know the IP Address of the Debug Server it connects to. During application development this is preferred, however, if you have a Workers application deployed on a remote cRIO, and you want to connect to its Debug Client intermittently from a PC with a dynamically assigned IP Address, then you can use the Client mode of the Debug Server.

Step 1: Run Debug Client in Server Mode

In a Worker's Launcher VI, set the following input parameters on the Debug Client Loader.vi.

  1. Set the Server Mode input to True.

  2. You can assign the port you want the Debug Client to listen on. By default, this is port 4711.

When you run the Launcher VI, the Debug Client will open a TCP listener and listen on all IP Addresses available to the hardware that this VI is called from, on the port defined by the input Server Mode : Server Port for incoming connections from a Debug Server (which needs to be operating in Client Mode).

Step 2: Run the Debug Server in Client Mode

In the connection section at the top of the Debug Server window, press Switch Mode to reload the Debug Server into Client mode. In Client mode, as shown below, you will then have the option to connect to a Debug Client that is running in Server mode.

Here you can now set the Server Port that you have defined in Step 1 (e.g. 4711) and the Server IP Address of the Debug Client running in Server mode. Press Connect to establish a connection to the Debug Client running in Server mode.

Last updated