Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(398)

Side by Side Diff: native_client_sdk/doc_generated/devguide/devcycle/debugging.html

Issue 254033002: [NaCl SDK Docs] Remove links to developers.google.com (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 {{+bindTo:partials.standard_nacl_article}} 1 {{+bindTo:partials.standard_nacl_article}}
2 2
3 <section id="debugging"> 3 <section id="debugging">
4 <span id="devcycle-debugging"></span><h1 id="debugging"><span id="devcycle-debug ging"></span>Debugging</h1> 4 <span id="devcycle-debugging"></span><h1 id="debugging"><span id="devcycle-debug ging"></span>Debugging</h1>
5 <p>This document describes tools and techniques you can use to debug, monitor, 5 <p>This document describes tools and techniques you can use to debug, monitor,
6 and measure your application&#8217;s performance.</p> 6 and measure your application&#8217;s performance.</p>
7 <div class="contents local" id="table-of-contents" style="display: none"> 7 <div class="contents local" id="table-of-contents" style="display: none">
8 <p class="topic-title first">Table Of Contents</p> 8 <p class="topic-title first">Table Of Contents</p>
9 <ul class="small-gap"> 9 <ul class="small-gap">
10 <li><p class="first"><a class="reference internal" href="#diagnostic-information " id="id2">Diagnostic information</a></p> 10 <li><p class="first"><a class="reference internal" href="#diagnostic-information " id="id2">Diagnostic information</a></p>
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 <li>NACLVERBOSITY=[1-255]</li> 82 <li>NACLVERBOSITY=[1-255]</li>
83 </ul> 83 </ul>
84 </section></section><section id="basic-debugging"> 84 </section></section><section id="basic-debugging">
85 <h2 id="basic-debugging">Basic debugging</h2> 85 <h2 id="basic-debugging">Basic debugging</h2>
86 <section id="writing-messages-to-the-javascript-console"> 86 <section id="writing-messages-to-the-javascript-console">
87 <h3 id="writing-messages-to-the-javascript-console">Writing messages to the Java Script console</h3> 87 <h3 id="writing-messages-to-the-javascript-console">Writing messages to the Java Script console</h3>
88 <p>You can send messages from your C/C++ code to JavaScript using the PostMessag e 88 <p>You can send messages from your C/C++ code to JavaScript using the PostMessag e
89 call in the <a class="reference internal" href="/native-client/devguide/coding/m essage-system.html"><em>Pepper messaging system</em></a>. When the 89 call in the <a class="reference internal" href="/native-client/devguide/coding/m essage-system.html"><em>Pepper messaging system</em></a>. When the
90 JavaScript code receives a message, its message event handler can call 90 JavaScript code receives a message, its message event handler can call
91 <a class="reference external" href="https://developer.mozilla.org/en/DOM/console .log">console.log()</a> to write 91 <a class="reference external" href="https://developer.mozilla.org/en/DOM/console .log">console.log()</a> to write
92 the message to the JavaScript <a class="reference external" href="https://develo pers.google.com/chrome-developer-tools/docs/console">console</a> in 92 the message to the JavaScript <a class="reference external" href="/devtools/docs /console-api">console</a> in
93 Chrome&#8217;s Developer Tools.</p> 93 Chrome&#8217;s Developer Tools.</p>
94 </section><section id="debugging-with-printf"> 94 </section><section id="debugging-with-printf">
95 <h3 id="debugging-with-printf">Debugging with printf</h3> 95 <h3 id="debugging-with-printf">Debugging with printf</h3>
96 <p>Your C/C++ code can perform inline printf debugging to stdout and stderr by 96 <p>Your C/C++ code can perform inline printf debugging to stdout and stderr by
97 calling fprintf() directly, or by using cover functions like these:</p> 97 calling fprintf() directly, or by using cover functions like these:</p>
98 <pre class="prettyprint"> 98 <pre class="prettyprint">
99 #include &lt;stdio.h&gt; 99 #include &lt;stdio.h&gt;
100 void logmsg(const char* pMsg){ 100 void logmsg(const char* pMsg){
101 fprintf(stdout,&quot;logmsg: %s\n&quot;,pMsg); 101 fprintf(stdout,&quot;logmsg: %s\n&quot;,pMsg);
102 } 102 }
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 </dd> 352 </dd>
353 <dt><code>--user-data-dir=&lt;directory&gt;</code></dt> 353 <dt><code>--user-data-dir=&lt;directory&gt;</code></dt>
354 <dd><p class="first last">Specifies the <a class="reference external" href="http ://www.chromium.org/user-experience/user-data-directory">user data directory</a> from which 354 <dd><p class="first last">Specifies the <a class="reference external" href="http ://www.chromium.org/user-experience/user-data-directory">user data directory</a> from which
355 Chrome should load its state. You can specify a different user data 355 Chrome should load its state. You can specify a different user data
356 directory so that changes you make to Chrome in your debugging session do 356 directory so that changes you make to Chrome in your debugging session do
357 not affect your personal Chrome data (history, cookies, bookmarks, themes, 357 not affect your personal Chrome data (history, cookies, bookmarks, themes,
358 and settings).</p> 358 and settings).</p>
359 </dd> 359 </dd>
360 <dt><code>--nacl-debug-mask=&lt;nmf_url_mask1,nmf_url_mask2,...&gt;</code></dt> 360 <dt><code>--nacl-debug-mask=&lt;nmf_url_mask1,nmf_url_mask2,...&gt;</code></dt>
361 <dd><p class="first last">Specifies a set of debug mask patterns. This allows yo u to selectively 361 <dd><p class="first last">Specifies a set of debug mask patterns. This allows yo u to selectively
362 choose to debug certain applications and not debug others. For example, 362 choose to debug certain applications and not debug others. For example, if
363 if you only want to debug the NMF files for your applications at 363 you only want to debug the NMF files for your applications at
364 <code>https://example.com/app</code>, and no other NaCl applications found 364 <code>https://example.com/app</code>, and no other NaCl applications found on th e
365 on the web, specify <code>--nacl-debug-mask=https://example.com/app/*.nmf</code> . 365 web, specify <code>--nacl-debug-mask=https://example.com/app/*.nmf</code>. This
366 This helps prevent accidentally debugging other NaCl applications if 366 helps prevent accidentally debugging other NaCl applications if you like
367 you like to leave the <code>--enable-nacl-debug</code> flag turned on. 367 to leave the <code>--enable-nacl-debug</code> flag turned on. The pattern langu age
368 The pattern language for the mask follows <a class="reference external" href="ht tp://developer.chrome.com/extensions/match_patterns">chrome extension match patt erns</a>. 368 for the mask follows <a class="reference external" href="/extensions/match_patte rns">chrome extension match patterns</a>. The pattern set can be inverted by
369 The pattern set can be inverted by prefixing the pattern set with 369 prefixing the pattern set with the <code>!</code> character.</p>
370 the <code>!</code> character.</p>
371 </dd> 370 </dd>
372 <dt><code>&lt;URL&gt;</code></dt> 371 <dt><code>&lt;URL&gt;</code></dt>
373 <dd><p class="first last">Specifies the URL Chrome should open when it launches. The local server 372 <dd><p class="first last">Specifies the URL Chrome should open when it launches. The local server
374 that comes with the SDK listens on port 5103 by default, so the URL when 373 that comes with the SDK listens on port 5103 by default, so the URL when
375 you&#8217;re debugging is typically <code>localhost:5103</code> (assuming that y our 374 you&#8217;re debugging is typically <code>localhost:5103</code> (assuming that y our
376 application&#8217;s page is called index.html and that you run the local server 375 application&#8217;s page is called index.html and that you run the local server
377 in the directory where that page is located).</p> 376 in the directory where that page is located).</p>
378 </dd> 377 </dd>
379 </dl> 378 </dl>
380 </li> 379 </li>
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
545 build a module into a .DLL.</p> 544 build a module into a .DLL.</p>
546 <section id="open-source-profiling-tools"> 545 <section id="open-source-profiling-tools">
547 <h3 id="open-source-profiling-tools">Open source profiling tools</h3> 546 <h3 id="open-source-profiling-tools">Open source profiling tools</h3>
548 <p>For the brave-hearted there are open source tools at <a class="reference exte rnal" href="http://www.chromium.org/nativeclient">Chromium.org</a> that describe how to do profiling on 547 <p>For the brave-hearted there are open source tools at <a class="reference exte rnal" href="http://www.chromium.org/nativeclient">Chromium.org</a> that describe how to do profiling on
549 <a class="reference external" href="https://sites.google.com/a/chromium.org/dev/ nativeclient/how-tos/profiling-nacl-apps-on-64-bit-windows">64-bit Windows</a> 548 <a class="reference external" href="https://sites.google.com/a/chromium.org/dev/ nativeclient/how-tos/profiling-nacl-apps-on-64-bit-windows">64-bit Windows</a>
550 and <a class="reference external" href="http://www.chromium.org/nativeclient/how -tos/limited-profiling-with-oprofile-on-x86-64">Linux</a> 549 and <a class="reference external" href="http://www.chromium.org/nativeclient/how -tos/limited-profiling-with-oprofile-on-x86-64">Linux</a>
551 machines.</p> 550 machines.</p>
552 </section></section></section> 551 </section></section></section>
553 552
554 {{/partials.standard_nacl_article}} 553 {{/partials.standard_nacl_article}}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698