Debug your problem using service replay debugging

  1. Open a command prompt or shell.
    Tip:

    On Windows, one way to open a command prompt is to select Start > Run. . . Type cmd and click OK.

  2. Run the service replay debugging environment script in the command prompt to set the runtime environment for the service in the command prompt, as follows:
    • Windows: script_name.bat

    • UNIX csh: source script_name.cshrc

    • UNIX bash: . script_name.profile

    The environment scripts are located with the SERL files. For example, on Windows, in %SOAM_HOME%\work\serl\appName\serviceName.

    Tip:

    An easy way to set the environment is to copy the base file name from the service instance manager log that you were viewing in "Determining the problem". Change .serl in the file name to .env.bat, .env.profile, or .env.cshrc as required.

    On Windows, another easy way is to first navigate to the %SOAM_HOME%\work\serl\appName\serviceName directory using Windows Explorer, then drag the icon of the environment script into the command prompt, and press Enter.

  3. Launch the debugger or IDE from the same command prompt or shell. The following examples demonstrate how:

    GDB:

    /usr/bin/gdb

    Visual Studio:

    devenv C:\mydirectory\mysolution_vc71.sln

    or, if your Visual Studio environment is not set in the command prompt:

    "C:\Program Files\Microsoft Visual Studio.NET 2003\Common7\IDE\devenv.com" \mydirectory\mysolution_vc71.sln

    Eclipse:

    C:\eclipse\eclipse.exe
    /usr/bin/eclipse/eclipse
  4. Set breakpoints as appropriate.

    For example, if you already know that the problem is in CreateService, put a breakpoint at the beginning of the CreateService method. Otherwise, if you do not know where the problem is, put breakpoints at the beginning of each method.

  5. Run your service application from the debugger or IDE and step through the code to find the problem.
    Tip:

    On Windows, remember to set the Service project as the Startup Project or Active Project before running your service application.

    Note:

    If there are multiple problems in a particular method, you should be able to catch them using one iteration of service replay debugging. If, however, there are problems in other methods that were not yet invoked when the service was run, no replay data exists for these methods. Actions cannot be replayed until they are played once through Symphony or Symphony DE.

Related concepts
About debugging a service
Related reference
Service replay debugging