Quick Mode is a debugging feature that allows you to run your program normally but with debugging ready in the background to take over the process at any point. If your program terminates abnormally, the debugger is there to save the program before it core dumps.
If all you want to do is run your program as quickly as possible, but you might still need to do some debugging, select Quick Mode when you start the debugger. The Debugging window opens, but otherwise your program runs exactly as if you were running it from the shell; the symbols for the program are not loaded.
If the program encounters a condition that would cause it to terminate, the debugger switches to Debug Mode, and the symbols for the program are loaded. This causes a delay, but leaves you with an active program and full debugging functionality.
When you are running your program in Quick Mode, you can switch to Debug mode whenever execution is interrupted--for example, at a breakpoint or when you manually interrupt execution by clicking on the Interrupt button.
Quick Mode offers the following advantages:
When a program encounters a segmentation fault or some other abnormal condition, Sun WorkShop steps in before the program terminates, leaving you with an active program and full debugging functionality. If you had run the program without Quick Mode, Sun WorkShop would have terminated the program. You would then have to debug a core file using a restricted set of debugging actions.
You can interrupt your program at any point in the process and automatically bring the debugger into control to set breakpoints, watch data, and browse through source code. You don't have to restart your program to get access to debugging functionality.
When you run in Quick Mode, your program runs quickly, but you have the security of knowing all of the debugging functionality is available if you need it.
Your only initial time lag comes from opening the Debugging window. Symbol tables aren't loaded.
Your program never crashes and produces a core dump. The debugger always stops the program first.
You have full debugger functionality with a program that was about to crash. (When you attach to a core file, you can only use limited debugger functions.)
When the Debugger takes over for a program that was about to crash, you can pop back through function calls.
Use Quick Mode when you:
Think you are finished debugging
Want to avoid waiting for symbols to load
Want to test a fix you made
As you debug your program, you can toggle between Debug Mode and Quick Mode to take advantage of the best features of each.
You can choose to run your program in Quick Mode or Debug Mode whenever you select a program to run or debug.
You can toggle between Quick Mode and Debug Mode for the current program from the Debug menu in the Sun WorkShop main window or in the Debugging window.
If you want to change your defaults so that future programs automatically start in Quick Mode, choose Options > Debugging Options in the Sun WorkShop main window. Then choose Debugging Performance from the Category list in the Debugging Options window and click Save As Defaults.
Suppose you made a change to a program and are confident that the change works. After rebuilding the program, you choose Quick Mode from the Debug menu, so that the program runs with minimal overhead. As this is the first time you have run or debugged a program since opening Sun WorkShop, there is a slight delay as the Debugging window opens.
You start your program by clicking the Start button or choosing Execute > Start in the Debugging window. It runs normally until it encounters a segmentation fault.
Before the program can terminate and create a core dump, Sun WorkShop switches into Debug Mode and loads the symbols for your program. You now have access to the full debugging functionality of Sun WorkShop and can debug the program as if you had started debugging in Debug Mode. Eventually, after making many changes, fixing them, and continuing, you rebuild your program.
You again select Quick Mode before running the program.
This time, no initial pause is noticeable, but your program appears to be stuck in an infinite loop. Clicking on the Interrupt button stops the program and loads the debugging symbols. You can now view data values, set breakpoints, and do any other needed debugging actions to track down your bug.
Convinced the third time is the charm, you rebuild your program, re-enable Quick Mode, and run the program again. Your program runs without a flaw.