|
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
|
2 <html> |
|
3 <head> |
|
4 <title>Adding traces to the source code</title> |
|
5 <link href="../../book.css" type="text/css" rel="stylesheet"></head> |
|
6 <body> |
|
7 |
|
8 <h2>Adding traces to the source code</h2> |
|
9 <p>To add a new trace, do the following: </p> |
|
10 <ol> |
|
11 <li>Place the cursor in your source code where you want to add the trace.</li> |
|
12 <li>Click the TraceBuilder menu and select <b>Add New Trace</b>.</li> |
|
13 <li>In the <b>Add Trace</b> dialog, enter trace group, name, and text: |
|
14 <ul> |
|
15 <li><b>Trace Group</b>: the trace group is needed when you want to activate |
|
16 your traces from the device. There are some predefined groups which you |
|
17 can use if your trace fits the purpose. You can also define your own group |
|
18 just by typing to the field.</li> |
|
19 <li><b>Trace Name</b>: the trace name is needed for creating unique identifiers |
|
20 for each OST trace so that they can be identified in the PC side. |
|
21 The trace name must be unique.</li> |
|
22 <li><b>Trace Text</b>: enter here the string you want to see when you receive |
|
23 the trace in TraceViewer.</li> |
|
24 <li>(Optional) From the <b>Templates</b> list, you can select pre-defined |
|
25 format for the trace name and trace text. |
|
26 <p>For example, <i>Function entry-exit</i> template parses the name of the |
|
27 class and function where the cursor is currently located. An entry trace is |
|
28 added to the beginning of the function and the exit trace is added to the end.</p></li> |
|
29 </ul> |
|
30 <p><img src="images/add_trace.png"></p> |
|
31 </li> |
|
32 <li>Click <b>OK</b>. You should get this kind of line to your source code:<br><br> |
|
33 <img src="images/ost_code.png"></li> |
|
34 </ol> |
|
35 |
|
36 <p>The trace is added to the defined location in the code, and details |
|
37 such as the trace group are displayed in TraceBuilder's tree view. </p> |
|
38 |
|
39 <h5>Related tasks</h5> |
|
40 <ul> |
|
41 <li><a href="addingparameters.htm">Adding parameters to traces</a></li> |
|
42 <li><a href="instrumenting.htm">Instrumenting traces</a></li> |
|
43 </ul> |
|
44 |
|
45 <div id="footer">Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. |
|
46 License: <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.</div> |
|
47 </body> |
|
48 </html> |