Debugging an External Client

You can debug an external client using Sybase WorkSpace.

  1. Open the Database Development perspective.
  2. In Enterprise Explorer, open the procedural object.
  3. Put breakpoints into the procedural object.
  4. Select Window > Show View > Other > Sybase Database Debug > External Clients to open the External Clients view.
  5. Use the isql command line utility to connect to the database and determine the spid, or process identifier, of the connection:
    isql -U sa -P -S useridw2k
    1> select @@spid
    2> go
    ------
    24
    (1 row affected)
  6. In External Clients, expand the connection profile associated with the database to which the external client is connected.

    The new client is listed under the connection profile in the External Clients view.

  7. Right-click the client from which you want to debug and select attach Client Connection for the spid matching that of your isql connection.
  8. From the client session, execute the procedural object you opened.

    The Confirm Perspective Switch dialog opens informing you that it will switch to Database Debug perspective.

  9. Click OK. The client session is in a suspended state as the cursor is at the location of your first breakpoint.
  10. Debug the client using step-in, step-over, or resume in Debug.

    After debugging completes, the client session comes out of the suspended state as the cursor is at the location of your first breakpoint.

    Note: When you terminate the debugging session for an external client, the client connection is detached, but the client session remains. For example, if the client session is an isql session, terminating the debugging session detaches the isql session from the debugging tool, but the isql session is not terminated.
Related tasks
Debugging a Procedural Object
Debugging a Table in Referenced Tables View
Debugging a Trigger
Related reference
SQL Debugger

Send your feedback on this help topic to Sybase Technical Publications: pubs@sybase.com

Your comments will be sent to the technical publications staff at Sybase, Inc. For product-related issues or technical support, contact Sybase Technical Support at 1-800-8SYBASE.