IBM ILOG Solver Debugger User's Manual > Debugging and Performance Tuning for Solver-based Applications > Setting Up Solver Debugger

In this section you will see how to launch the Debugger GUI and connect an application to it.

Launching the GUI

In a command prompt window, go to the bin subdirectory where Solver is installed and type:

debugger

On Windows you can use the shortcut provided in:

Start Menu>ILOG>ILOG Solver>ILOG Solver Debugger

By default, the port used for communication between the GUI and your application is 4011.

If you want to use a specific port number, pass, for example, -listensocket 8000 as an argument.

The GUI starts in initializing mode with a red patch in the bottom right corner of the window. Solver Debugger is waiting for your application to connect.

images/initializing.png

Connecting an Application

To connect an example of an application, go to the directory:

<solverdir>/examples/

Compile and link a debugger example (such as debugnqueen). To start the application:

The GUI switches to idle mode with a blue patch in the bottom right corner of the window. The Run button is now active. The GUI is ready for you to debug the application.

Note
When using the debuggolomb example, pass it two integer parameters: the size of the problem and the filtering level of the alldiff constraint.

debuggolomb 6 0 (0 = basic filtering level)

debuggolomb 6 1 (1 = medium filtering level)

debuggolomb 6 2 (2 = extended filtering level)

You can select the arguments before starting the application with File > Arguments.

Connecting Two Applications at the Same Time

To load two applications at the same time, proceed as follows:

  1. Launch two Debugger GUIs with different socket port numbers, for example:
  2. debugger -listensocket 5000 &
    debugger -listensocket 5001 &
  3. Connect each application to a different port number giving extra arguments to the constructor IlcSolverDebugger.
  4. In one application, type:
    IlcSolverDebugger debugger(solver, IloTrue, IloFalse, 1.0, 5000);
    In the other application, type:
    IlcSolverDebugger debugger(solver, IloTrue, IloFalse, 1.0, 5001);

Connecting an Application Remotely

To load an application remotely, give the machine name and the port number expected by the GUI to the constructor IlcSolverDebugger.

IlcSolverDebugger debugger(solver, IloTrue, IloFalse, 1.0, 4011,

"NameOfMachineOnWhichTheGUIisRunning");

Note
To activate or deactivate the Debugger without recompiling, pass IloTrue or IloFalse as a second argument to the IlcSolverDebugger constructor based on a command line argument of your application.