Using Sun WorkShop

Starting Debugging

You can debug the current program, a program previously run or debugged in Sun WorkShop, or a program that is new to Sun WorkShop (not part of your picklist).

The current program name appears in the Debugging window header. If you just built a target, a program with the same name as the target (if it exists in the current directory) is the current program.

To start debugging a program:

  1. Select a debugging state.

    Choose Debug > Quick Mode to run a program normally, with the option of switching to debugging at any point. For more information on Quick Mode, see "Quick Mode".

    Choose Debug > Debug Mode or click the Debug button in the Sun WorkShop main window to debug the program using the full functionality of the debugger.

  2. Select the program to debug.

    To start debugging the current program, click the Debug button in the Sun WorkShop main window.

    To start debugging a program other than the current program, do one of the following:

    • To debug a program previously run or debugged in Sun WorkShop, select the program from the picklist in the Sun WorkShop main window or the Debugging window.

    • To debug a program that is not on your picklist, load the new program by choosing Debug > New Program.

    • To attach to another running process, choose Debug > Attach Process.

    • To debug a core dump file from an unsuccessful program execution, choose Debug > Load Core File.

    Your program is loaded and the primary Sun WorkShop debugging windows are displayed (see "Sun WorkShop Debugging Windows"").

  3. Run your program by clicking on the Start or Go button, or choosing Execute > Start or Execute > Go in the Debugging window.


    Note -

    Before you begin debugging, you can change run parameters such as arguments, the run directory, or environment variables (see "Changing Run Parameters").