diff -r 5310aeaa3526 -r e265bbe56eb0 core/com.nokia.carbide.cpp.doc.user/html/tasks/start/carbide_debugging.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/tasks/start/carbide_debugging.htm Mon Apr 12 14:47:08 2010 -0600 +++ b/core/com.nokia.carbide.cpp.doc.user/html/tasks/start/carbide_debugging.htm Tue Apr 13 15:55:45 2010 -0500 @@ -10,38 +10,28 @@

Debugging a Symbian OS Program

Use the Carbide.c++ debugger to debug a compiled Symbian OS program in an emulator or on-device. The same process works for other emulators and target devices as well.

-

NOTE This example uses an emulator. The steps are identical for on-device debugging, although a .sym file is not needed for emulator builds.

+

NOTE This example uses the emulator included with the S60 5th Edition SDK. The steps are identical for on-device debugging, although a .sym file is not needed for emulator builds.

Debugging a Symbian OS program

-

NOTE You can only debug compiled programs. Use the Build Project command to compile project sources into a binary file if you do not already have an executable in the project. You will also need a symbolics ( .sym) file for debugging on a target device. Ensure that a .sym file has been created. If you are importing an existing application, you may have to rebuild the application and create a related .sym file. Make sure a .sym file has been created in the output directory.

+

NOTE You can only debug compiled programs. Use the Build Project command to compile project sources into a binary file if you do not already have an executable in the project. A symbolics (.sym) file is also required for debugging on a target device. Ensure that a .sym file has been created. If you are importing an existing application, you may have to rebuild the application and create a related .sym file. Make sure a .sym file has been created in the output directory.

    -
  1. Set a breakpoint in the HelloCarbide program
  2. -

    Open the \src\CHelloCarbideAppUI.cpp file and set a breakpoint in the HandleCommandL routine.

    -

    -

    Figure 1 - Breakpoint set in CHelloCarbideAppUI::HandleCommandL routine.

    -
  3. Launch the Carbide.c++ debugger and S60 EPOC Emulator
  4. -

    Start the Carbide debugger which launches the S60 EPOC Emulator and installs the HelloCarbide application. For on-device debugging, your application will be installed on your target device.

    -

    -

    Figure 2 - S60 Emulator launches

    -
  5. Open the Installed directory within the S60 Emulator or your target device
  6. - Use the S60 Emulator controls to locate and open the Installation directory. Select Open from the Options menu (Figure 3). -

    -

    Figure 3 - Open the Installed directory

    -
  7. Launch the HelloCarbide application
  8. -

    Use the S60 Emulator or target device controls to launch the HelloCarbide application (Figure 4). -

    -

    -

    Figure 4 - Launch the HelloCarbide application

    -

    The HelloCarbide application launches (Figure 5).

    -

    -

    Figure 5 - HelloCarbide application running on S60 Emulator

    -
  9. Click the Options soft-key on the S60 Emulator to display the Select menu.
  10. -
  11. Choose the Message menu item and press the Select soft-key to send a message (Figure 6).
  12. -

    -

    Figure 6 - Send Message to HelloCarbide application

    -

    The HandleCommandL breakpoint is hit in the program and control returns to the Carbide.c++ debugger (Figure 7). You can now set additional breakpoints, examine variables, or use the Debug view buttons to control the program.

    -

    -

    Figure 7 - Back in the CHelloCarbideAppUI::HandleCommandL routine

    +
  13. Set a breakpoint in the MyProject program
  14. +

    Open the \src\MyProjectAppUI.cpp file and set a breakpoint in the HandleCommandL routine.

    +

    +

    Figure 1 - Breakpoint set in MyProjectAppUI::HandleCommandL routine.

    +
  15. Launch the Carbide debugger and S60 SDK Emulator
  16. +

    Start the Carbide debugger which launches the S60 SDK Emulator, installs and launches the executable. For on-device debugging, the application is installed on the target device.

    +

    The HelloCarbide application launches (Figure 2).

    +

    +

    Figure 2 - MyProject application running on S60 Emulator

    +

    NOTE For SDKs prior to the S60 5th Edition it may be necessary to locate the installed application and manually launch it in the emulator or on the target device.

    +
  17. Click the Options soft-key on the S60 Emulator to display the Options menu.
  18. +
  19. Choose the Message menu item and press the Select soft-key to send a message (Figure 3).
  20. +

    +

    Figure 3 - Send Message to MyProject application

    +

    The HandleCommandL breakpoint is hit in the program and control returns to the Carbide debugger (Figure 4). You can now set additional breakpoints, examine variables, or use the Debug view buttons to control the program.

    +

    +

    Figure 4 - Back in the CMyProjectAppUI::HandleCommandL routine

That's it for this basic introduction to debugging with Carbide.c++.

@@ -55,7 +45,7 @@
  • Building Projects
  • Creating a Launch Configuration
  • - + \ No newline at end of file