aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/archive/b2g_os/debugging
diff options
context:
space:
mode:
Diffstat (limited to 'files/zh-cn/archive/b2g_os/debugging')
-rw-r--r--files/zh-cn/archive/b2g_os/debugging/debugging_b2g_using_gdb/index.html88
-rw-r--r--files/zh-cn/archive/b2g_os/debugging/debugging_ooms/index.html62
-rw-r--r--files/zh-cn/archive/b2g_os/debugging/developer_settings/index.html161
-rw-r--r--files/zh-cn/archive/b2g_os/debugging/index.html80
-rw-r--r--files/zh-cn/archive/b2g_os/debugging/taking_screenshots/index.html69
5 files changed, 0 insertions, 460 deletions
diff --git a/files/zh-cn/archive/b2g_os/debugging/debugging_b2g_using_gdb/index.html b/files/zh-cn/archive/b2g_os/debugging/debugging_b2g_using_gdb/index.html
deleted file mode 100644
index b4939ee2f8..0000000000
--- a/files/zh-cn/archive/b2g_os/debugging/debugging_b2g_using_gdb/index.html
+++ /dev/null
@@ -1,88 +0,0 @@
----
-title: 使用 gdb 及相关工具调试 B2G
-slug: Archive/B2G_OS/Debugging/Debugging_B2G_using_gdb
-tags:
- - B2G
- - Firefox OS
- - Mobile
- - 调试
-translation_of: Archive/B2G_OS/Debugging/Debugging_B2G_using_gdb
----
-<div class="summary">
- <p><strong><code>gdb</code></strong> 是一个命令行调试器,提供了许多有用的选项,可以用来调试 Firefox OS 应用程序。其他相关的工具也是同样有效的,比如  <strong><code>b2g-ps</code></strong>, 它是对标准 ps 工具的封装,会显示 B2G 实例中运行的每个进程的名称。本文则描述了如何使用这些工具来执行 Fiefox OS 调试工作。</p>
-</div>
-<h2 id="在单进程模式下启动调试器">在单进程模式下启动调试器</h2>
-<div class="note">
- <p><strong>注意:</strong> 在运行调试器前,你可能想要建立一个  <code>.userconfig</code> 文件来自定义一些配置。请查看 <a href="/en-US/docs/Mozilla/Boot_to_Gecko/Customization_with_the_.userconfig_file" title="/en-US/docs/Mozilla/Boot_to_Gecko/Customization_with_the_.userconfig_file">Customization with the .userconfig file</a> 获取更多信息。</p>
-</div>
-<p>要重启 Firefox OS 并在 gdb 控制下运行,只需要简单的运行 <code>run-gdb.sh</code> 脚本就可以了:</p>
-<pre>./run-gdb.sh
-</pre>
-<div class="note">
- <p><strong>注意:</strong> 如果你想要在模拟器上调试,请确保并没有连接手机;否则可能会与模拟器上调试 gdb 相冲突。</p>
-</div>
-<p>如果 Firefox OS 已经在运行,你想要在不重启的情况下附加在上面,也可以这样做:</p>
-<pre>./run-gdb.sh attach
-</pre>
-<h2 id="调试_out-of-process_任务">调试 out-of-process 任务</h2>
-<p>Because of the threaded nature of Firefox OS, 你可能需要掉时除了主 B2G 任务之外的任务。最简单的方式就是使用 <code>b2g-ps</code> 命令来找出你需要调试的进程的 PID:</p>
-<pre>$ adb shell b2g-ps
-b2g root 106 1 189828 56956 ffffffff 40101330 S /system/b2g/b2g
-Browser app_0 4308 106 52688 16188 ffffffff 400db330 S /system/b2g/plugin-container
-</pre>
-<p>此处, Browser 是一个子进程用作 browser 应用的 "content process" 。因此如果在本例中,你想要调试  content process, 可以这么做:</p>
-<pre>$ ./run-gdb.sh attach 4308</pre>
-<p>有时候,如果有任何子进程被创建就立刻通知是非常有用的。我们可以在启动  <code>run-gdb.sh</code>  时添加  <code>MOZ_DEBUG_CHILD_PROCESS</code> 环境变量来实现:</p>
-<pre>MOZ_DEBUG_CHILD_PROCESS=1 ./run-gdb.sh</pre>
-<p>运行上面命令后,在 Firefox OS 中启动一个 OOP 应用时,就会输出新任务 plugin-container  的 PID。Having done this, launching an OOP application on Firefox OS will output the PID of the plugin-container for the new task, and will sleep for 30 seconds, enough time for you to run the attach command we saw above:</p>
-<pre>$ ./run-gdb.sh attach 4308</pre>
-<p>If you are trying to debug something that occurs during boot, you have to launch the debugger instance for the new application fairly quickly. Once the new debugger is launched, you should immediately press "c" to continue running the new task.</p>
-<h2 id="支持">支持</h2>
-<h3 id="What_level_of_functionality_to_expect">What level of functionality to expect</h3>
-<p>The following debugging features at least should definitely work. If they don't, it's likely that a simple tweak to your setup will make them work:</p>
-<ul>
- <li>Symbols for all libraries (except perhaps certain drivers on certain Android phones)</li>
- <li>Backtraces with full debug info (except for optimized-away argument values)</li>
- <li>Breakpoints: you should be able to break on a symbol, or on a file:line, or on an address. All should work.</li>
- <li>Single-stepping ('s' and 'n' should both work)</li>
-</ul>
-<p>The following debugging features are <strong>not</strong> supported. Don't try to use them.</p>
-<ul>
- <li>Watchpoints.</li>
-</ul>
-<h3 id="Troubleshooting">Troubleshooting</h3>
-<p>Here are a few things to try first whenever GDB is not working as described above.</p>
-<h4 id="Ensure_that_your_B2G_clone_is_up-to-date">Ensure that your B2G clone is up-to-date</h4>
-<p>Always keep in mind to that to update your B2G clone you must run these <strong>two</strong> commands:</p>
-<pre>git pull
-./repo sync</pre>
-<p>Forgetting the <code>git pull</code> there is a typical reason why you'd end up with an old <code>run-gdb.sh</code> and not benefit from recent improvements.</p>
-<h4 id="确保你已经附着在了正确的进程上">确保你已经附着在了正确的进程上</h4>
-<p>Attaching to the wrong process (e.g. main B2G process versus Browser process) would explain why your breakpoints don't get hit.</p>
-<h4 id="Ensure_that_symbols_are_correctly_read">Ensure that symbols are correctly read</h4>
-<ol>
- <li>In <code>gdb</code>, use <code>info shared</code> to check that symbols are correctly read:
- <pre>(gdb) info shared
-From        To          Syms Read   Shared Object Library
-0xb0001000  0xb0006928  Yes         out/target/product/otoro/symbols/system/bin/linker
-0x40051100  0x4007ed74  Yes         /hack/b2g/B2G/out/target/product/otoro/symbols/system/lib/libc.so
-0x401ab934  0x401aba2c  Yes         /hack/b2g/B2G/out/target/product/otoro/symbols/system/lib/libstdc++.so
-...</pre>
- </li>
- <li>The <code>Syms Read</code> column should say <code>Yes</code> everywhere. Maybe on some android phone you would see <code>Yes (*)</code> for some system libraries or drivers; that would be OK. You should not see any <code>No.</code></li>
- <li>If you do see a <code>No</code>, that is your first problem and you must solve it before looking at anything else.</li>
- <li>Look for any error messages in the terminal output just after you typed your <code>run-gdb.sh</code> command.</li>
- <li>Also check in that terminal output that the GDB command is sane. In particular, its last command line argument should be the path to your b2g executable. Here is a sane example:
- <pre>prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/arm-linux-androideabi-gdb -x /tmp/b2g.gdbinit.bjacob /hack/b2g/B2G/objdir-gecko/dist/bin/b2g</pre>
- </li>
- <li>Check the value of these GDB variables: <code>solib-search-path</code> and <code>solib-absolute-prefix:</code>
- <pre>(gdb) show solib-search-path
-The search path for loading non-absolute shared library symbol files is /hack/b2g/B2G/objdir-gecko/dist/bin:out/target/product/otoro/symbols/system/lib:out/target/product/otoro/symbols/system/lib/hw:out/target/product/otoro/symbols/system/lib/egl:out/target/product/otoro/symbols/system/bin:out/target/product/otoro/system/lib:out/target/product/otoro/system/lib/egl:out/target/product/otoro/system/lib/hw:out/target/product/otoro/system/vendor/lib:out/target/product/otoro/system/vendor/lib/hw:out/target/product/otoro/system/vendor/lib/egl.
-(gdb) show solib-absolute-prefix
-The current system root is "out/target/product/otoro/symbols".</pre>
- </li>
-</ol>
-<div class="note">
- <p><strong>Note</strong>: If you need more help, try the #b2g IRC channel. If you think you found a bug, report it on the <a href="https://github.com/mozilla-b2g/B2G/issues" title="https://github.com/mozilla-b2g/B2G/issues">B2G issue tracker</a>.</p>
-</div>
-<p> </p>
diff --git a/files/zh-cn/archive/b2g_os/debugging/debugging_ooms/index.html b/files/zh-cn/archive/b2g_os/debugging/debugging_ooms/index.html
deleted file mode 100644
index 2b6b511092..0000000000
--- a/files/zh-cn/archive/b2g_os/debugging/debugging_ooms/index.html
+++ /dev/null
@@ -1,62 +0,0 @@
----
-title: 调试 Firefox OS 的内存溢出错误
-slug: Archive/B2G_OS/Debugging/Debugging_OOMs
-translation_of: Archive/B2G_OS/Debugging/Debugging_OOMs
----
-<div class="summary">
- <p><span class="seoSummary">当 Firefox OS 设备内存溢出时,低内存管理器以及低内存消息系统就会 kill 掉一些进程,从而保持 OS 运行。 当 kernel 选择 kill 掉前台进程时, 就会看到你正在使用的 app 有一个明显的 crash 现象。 本文主要描述了如何理解和调试 OOM crash 问题。</span></p>
-</div>
-<div class="note">
- <p><b>注意:</b> 如果你并不了解内存条件在 Firefox OS 上是如何管理的,请在阅读本文前参考 <a href="/en-US/Firefox_OS/Platform/Out_of_memory_management_on_Firefox_OS">Out of memory management on Firefox OS</a></p>
-</div>
-<h2 id="调试_OOM_crash">调试  OOM crash</h2>
-<p>假设你已经复现了你认为是由于手机内存溢出所导致的 crash 问题。下面的步骤可以帮助我们理解这些错误是如何产生的。 </p>
-<h3 id="步骤_1_验证确实是_OOM">步骤 1: 验证确实是 OOM </h3>
-<p>首先,我们需要检查下是否 crash 是否确实是由于内存溢出所导致的。运行命令  <code>adb shell dmesg </code>可以查看。如果 app 确实是由于 OOM 被 kill 掉的, 你就会看到下面类似的语句输出:</p>
-<pre class="brush: bash">&lt;4&gt;[06-18 07:40:25.291] [2897: Notes+]send sigkill to 2897 (Notes+), adj 2, size 30625</pre>
-<p>这一行表示手机的低内存管理器 kill 掉了  Notes+ app (进程 id 2897), 当被 kill 时,其 <code>oom_adj 2</code> 。size 是以 pages 为单位的,每个 page 表示 4kb。因此,在此情况下,   Notes+ app 使用了 30625 * 4kb = 120mb 的内存。</p>
-<h4 id="题外话_如果不是_OOM">题外话: 如果不是 OOM </h4>
-<p>如果你在 <code>dmesg</code> 输出中没有看到类似的信息,你的 crash 可能就不是 OOM。下面的步骤就是将  crash 的进程附加在  <code>gdb</code> 上进行调试,并获取 backtrace,就像下面代码所示:</p>
-<pre class="brush: bash">$ cd path/to/B2G/checkout
-$ adb shell b2g-ps
-# Note pid of the app that you're going to crash
-$ ./run-gdb.sh attach &lt;pid&gt;
-(gdb) continue
-# crash the app
-(gdb) bt</pre>
-<p>当报出 bug 时, 关注上述命令的输出,同时伴随这  <code>adb logcat</code> 的输出。如果你的 crash  是由于 OOM 导致的,   <code>gdb</code> backtrace 就没有什么用了。 因为 OOM crash 是由发送到 kernel 的信号所触发的,而不是进程中错误代码执行时所导致的。</p>
-<h3 id="步骤_2_收集内存报告">步骤 2: 收集内存报告</h3>
-<p>在您已经验证您的 crash 确实是由于 OOM 导致的,下面要做的就是在 app crash 前收集关于手机的内存报告。内存报告会帮助我们理解内存都在哪些方面被使用了。 这个步骤有点困难, 因为一旦 app 出现 crash, 就没有办法从那个进程获取到内存报告。当然也没有办法在 kernel 试图去 kill 一个进程时,才来出发内存报告,那就太晚了。</p>
-<p>要从手机上获取内存报告, 首先要更新你的构建树,才能获取到最新版本的相关工具。 <code>repo sync</code> 是不能实现这个要求的;你必须执行  <code>git fetch &amp;&amp; git merge</code> 或 <code>git pull </code>命令才可以:</p>
-<pre class="brush: bash">$ cd path/to/B2G/checkout
-$ git fetch origin
-$ git merge --ff-only origin</pre>
-<p>现在你就可以运行使用下面命令来运行内存报告工具了:</p>
-<pre class="brush: bash">$ tools/get_about_memory.py</pre>
-<p>一旦获取了你所想要的内存报告,就可以将问题的目录(名称为  <code>about-memory-N</code>)压缩,并附加在相关的 bug 上。但是,只有在你运行这些命令时,你所关注的 app 还活着,并且耗费了大量的内存时,才是管用的。此时也有一些选项。</p>
-<h4 id="Step_2_选项_1_获取不同的设备Get_a_different_device">Step 2, 选项 1: 获取不同的设备Get a different device</h4>
-<p>一般最简单的方式就是使用包含更多 RAM 的设备。从步骤 1 中获知当产生 crashed 时,进程会使用多少内存,因此你可以简单的等待,直到进程使用了那么多的内存时,就获取内存报告。 <code>b2g-info</code> 工具就会显示出不同的 B2G 进程使用了多少内存。你可以使用下面的命令循环的运行这个工具:</p>
-<pre class="brush: bash">$ adb shell 'while true; do b2g-info; sleep 1; done'</pre>
-<p>如果在设备上无法获取 <code>b2g-info</code> ,你就可以使用  <code>b2g-procrank</code> 来替代。</p>
-<h4 id="Step_2_option_2_Fastest_finger">Step 2, option 2: Fastest finger</h4>
-<p>如果无法获得包含更多 RAM 的设备,就可已尝试着去在 app crash 前运行  <code>get_about_memory.py</code> 。 你也可以向上节一样循环运行 <code>b2g-info</code> 来计算何时运行  <code>get_about_memory.py</code>. 运行内存报告时会将手机上的所有进程冻结一段时间,因此在进程 OOM 之前抓取内存报告并不困难。</p>
-<h4 id="Step_2_option_3_Use_a_smaller_testcase">Step 2, option 3: Use a smaller testcase</h4>
-<p>We often hit OOMs when doing something like "loading a file of at least size X in the app."</p>
-<p>If the app crashes very quickly with a testcase of size X, you could try running a similar but smaller testcase (say, size X/2) and capturing a memory report after that succeeds.  The memory report generated this way often gives us good insights into the OOM crash that we ultimately care about.</p>
-<h4 id="Step_2_option_4_Run_B2G_on_your_desktop">Step 2, option 4: Run B2G on your desktop</h4>
-<p>If the worst comes to the worst, you can run B2G on your desktop, which probably has much more RAM than your FxOS phone.  This is tricky because B2G running on a desktop machine is a different in some key ways from B2G running on a phone.</p>
-<p>In particular, B2G on desktop machines has multiprocess disabled by default.  It doesn't really work 100% correctly anywhere, but it works most accurately on Linux and Mac.  (Follow <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=923961">Bug 923961</a>, <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=914584">Bug 914584</a>, <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=891882">Bug 891882</a>)  You can test on your desktop without multiprocess enabled, but in my experience a lot of our high memory usage issues are caused by our interprocess communication code, so that won't necessarily trigger the bug you're seeing.</p>
-<p>It's also not as convenient to take memory reports from a B2G desktop process.  On Linux, you can send signal 34 to the main B2G process and it'll write <code>memory-report-*.gz</code> files out to <code>/tmp</code>.<br>
- <br>
- One advantage to using B2G desktop builds is that you can use your favorite desktop debugging tools, such as Instruments on Mac OSX.  We've had a lot of success with this in the past. To collect a memory report using Instruments on OS X, choose "New -&gt; Mac OS X -&gt; Allocations". Start b2g-desktop and you should see multiple "plugin-container" processes in the activity monitor. You will need 2 Instruments activities: 1 to trace the allocations on the main b2g process and another to trace the allocations on the app you wish to analyze. Attach the instrument activities and execute your test case.</p>
-<p>To analyze how much memory your app is using, analyze call trees. Check the "Invert Call Tree" tick, and sort by bytes used. This will show you which part of your app is using lots of memory. Below is a screenshot of a sample analysis of memory usage for an app:</p>
-<p><img alt="Screen shot of instruments." src="https://mdn.mozillademos.org/files/6439/instrumentsScreenShot.png" style="width: 800px; height: 492px;"><br>
- <br>
- For more information on setting up B2G desktop builds, read our <a href="/en-US/docs/Mozilla/Firefox_OS/Platform/Gaia/Hacking">Hacking Gaia</a> page.</p>
-<h3 id="步骤_3_分析内存报告">步骤 3: 分析内存报告 </h3>
-<p>当运行 <code>get_about_memory.py</code> 时,它就会打开 Firefox 中的内存报告。这个文件包含系统上所有进程的内存使用信息。  Note that you can hover over any leaf node to get a description of what that node describes. 你真正要寻找的是在  crashing 进程中 ”异常变大“ 的事物。此处的 "unusually large" means by capturing a memory report of your app when it's not using a ton of memory and comparing that to the errant memory report.</p>
-<p>阅读内存报告需要一些实践,因此请在需要的时候就发问吧。这个领域的专家在 #memshrink on IRC.</p>
-<h3 id="步骤_4_必要时使用_DMD_重新构建">步骤 4: 必要时使用  DMD 重新构建</h3>
-<p>One common line item to stick out in memory reports captured before apps crash is <code>heap-unclassified</code>.  <code>heap-unclassified</code> counts memory allocated by the process that isn't covered by any other memory reporter.  If you have high <code>heap-unclassified</code>, the memory report can't tell you anything else about what that memory belongs to. Our tool for digging into <code>heap-unclassified</code> is called DMD.  This works on B2G, but you must <a href="/en-US/docs/Mozilla/Firefox_OS/Building_and_installing_Firefox_OS">build B2G</a> yourself in order for it to work because DMD requires local symbols that are only kept on the build machine.</p>
-<p>To find out more information on running DMD and interpreting its output, read the <a href="https://wiki.mozilla.org/Performance/MemShrink/DMD">Mozilla Wiki DMD page</a>.<br>
-  </p>
diff --git a/files/zh-cn/archive/b2g_os/debugging/developer_settings/index.html b/files/zh-cn/archive/b2g_os/debugging/developer_settings/index.html
deleted file mode 100644
index 0b59d842f7..0000000000
--- a/files/zh-cn/archive/b2g_os/debugging/developer_settings/index.html
+++ /dev/null
@@ -1,161 +0,0 @@
----
-title: Firefox OS 开发者设置
-slug: Archive/B2G_OS/Debugging/Developer_settings
-translation_of: Archive/B2G_OS/Debugging/Developer_settings
----
-<div class="summary">
- <p><span class="seoSummary">在 Firefox OS Settings 应用中有一个开发者面板。这个面板提供了许多选项可以使您在 Firefox OS 上调试 open web app 更简单。本文则对有效的选项和如何使用进行了介绍。</span></p>
-</div>
-<p>开发者选项的设置面板故意将路径设置的不太好找,这是为了避免不需要这些选项的终端用户无意中打开该选项,从而使设备变得更慢或者在界面中显示出特殊的效果。该面板与下图类似 (下图是一个运行 Firefox OS 2.0 2014 四月版本的 Geeksphone keon ):</p>
-<p><img alt="" src="https://mdn.mozillademos.org/files/7801/developermenu-short.png" style="width: 320px; height: 480px; display: block; margin: 0px auto;"></p>
-<p>可以通过下面路径找到开发者面板:</p>
-<ul>
- <li>Firefox OS &lt;1.4 版本, 通过 <em>Settings &gt; Device information &gt; More Information &gt; Developer 打开开发者面板。</em></li>
- <li>Firefox 1.4+ 版本, 首先需要在路径  <em>Settings &gt; Device information &gt; More Information &gt;  Check the Developer Menu checkbox 下使能开发者面板。完成后,就可以通过 </em> <em>Settings &gt; Developer 来访问开发者面板。</em></li>
-</ul>
-<p>下面的章节则对开发者面板中的每个选项进行了介绍,包括它们是做什么的以及为何有效。</p>
-<h2 id="开发者工具设置">开发者工具设置</h2>
-<h3 id="通过_USB_调试">通过 USB 调试</h3>
-<p>“远程调试” 选项会在 Firefox OS 设备上对 <a href="/en-US/docs/Tools/Debugger" title="/en-US/docs/Tools/Debugger">远程调试功能</a> 进行使能。同时也使能了 <a href="/en-US/Firefox_OS/Debugging/Installing_ADB">ADB</a> 命令用法。在<strong> </strong> Firefox &lt;1.4 版本,只是一个复选框;在 Firefox 1.4  中是一个下拉选框,其中有三个有效的选项:</p>
-<ul>
- <li>Disabled: 远程调试被禁用 (默认情况)</li>
- <li>ADB only: 允许通过 ADB 对访问设备</li>
- <li>ADB and Devtools: 允许通过 ADB 和 Firefox Devtools 如  <a href="/en-US/Firefox_OS/Using_the_App_Manager">App Manager</a> 访问设备</li>
-</ul>
-<h3 id="开发者_HUD">开发者 HUD</h3>
-<p>Firefox OS 1.4+ 版本中, 点击该部分会进入开发者 HUD 选择视图。</p>
-<p><img alt="" src="https://mdn.mozillademos.org/files/7803/developerhud-new.png" style="width: 320px; height: 480px; margin: 0px auto; display: block;"></p>
-<p>在显示开发者信息的 FIrefox OS UI 的顶部,有一个复选框可涌来使能或禁用开发者 HUD 全部的功能,下面有 5 个复选框可以用来启用或禁用:</p>
-<ul>
- <li><strong>Log changes in adb</strong>: 使用 adb logcat 时启用设备 log记录 </li>
- <li><strong>Warnings</strong>: 显示终端警告</li>
- <li><strong>Errors</strong>: 显示终端错误</li>
- <li><strong>Security issues</strong>: 显示潜在的安全问题</li>
- <li><strong>Reflows</strong>: 当发生时,显示 reflows(这里可能至再次重复此场景,但不太确切)</li>
- <li><strong><a href="/en-US/Firefox_OS/Platform/Architecture#Jank">Jank</a>/Jank threshold</strong>: 通知手机用户出现出现不可接受的 Jank 的数目,其门限值可以设定。</li>
- <li><strong>Frames per second</strong>: 显示每秒的 frames,在下面 <a href="#Frames_per_second">Frames_per_second</a> 章节中有介绍。</li>
- <li><strong>Time to load</strong>: 显示撞在信息的时间,在下面章节  <a href="#Time_to_load">Time_to_load</a> 有介绍。</li>
- <li><strong>App memory</strong>: 显示 app 使用的内存信息,并允许您启用或禁用不同的内存使用系统。请参考 <a href="#App_memory">App_memory</a> 获取更多信息。</li>
-</ul>
-<h4 id="每秒帧数(Frames_per_second)">每秒帧数(Frames per second)</h4>
-<p>启用该选项会使 Firefox OS 显示界面左上角显示 3 个数字; 这个数字表示的是在滑动窗口中近期的平均值,指瞬时数据,但又是相当精确的。实际上,所有的数字都是推测出来的:</p>
-<ul>
- <li>左侧的数字是 合成速率(<strong>composition rate)</strong>: 这个估计值是指Firefox OS 每秒钟向硬件 framebuffer 所绘制的帧数。 这仅仅是一个用户界面所接收帧数速率的估计值。例如,即使屏幕没有变化, 计数器可能也会报告出每秒 60次的速率, 但真实的情况是此时用户的接收速率应该是 0。 然而,当您知道这种情况后,并且经其他的测量工具真实, 这种监测器仍时一个有效而且简单的工具。</li>
- <li>中间的数字是  <strong>layer transaction rate</strong>,  表示每秒钟绘制和通知合成器的估计次数。 这个数字对 Gecko 平台工程师是非常有用的, 但是它应该小于或等于左侧的合成速率。</li>
- <li>右手侧的数字是的屏幕大小的百分比作为绘制的像素值。数字 273 表示屏幕被绘制了 2.73 次。最佳的情况是该数字应尽可能接近 100。</li>
-</ul>
-<p><img alt="A screenshot of Firefox OS, showing three numbers in the top left hand corner that are measurements of app framerate." src="https://mdn.mozillademos.org/files/6889/framerate-fxos.jpg" style="width: 357px; height: 640px; display: block; margin: 0px auto;"></p>
-<h4 id="装载时间">装载时间</h4>
-<p>Firefox OS 也有一个工具可以帮助测量启动时间,尤其是“初次绘制“ 时间。 由工具所显示的值 — 位于 Firefox OS 界面右上角 — 是指从距今最近的应用的启动时间到应用第一次绘制自己 UI 估计值 之间的时间间隔,间隔以毫秒为单位。 这个数字只是接近“第一次真正画界面”的时间,一般会比实际值要小。 然而, 降低这以数值一般与改善真正的启动时间有直接关系, 因此它可以用来快速的测量优化问题。</p>
-<p><img alt="A screenshot of Firefox OS, showing a number in the top right hand corner that is a measurement of the current app startup time, in milliseconds." src="https://mdn.mozillademos.org/files/6891/startup-time-fxos.jpg" style="width: 378px; height: 640px; display: block; margin: 0px auto;"></p>
-<h4 id="App_内存">App 内存</h4>
-<p>它会显示有关 app 所使用内存的信息, 并且允许您启用或禁用使用内存的不同条目以显示当前 app 所使用的内存。 例如,下面的截图显示了只有 App 内存 和 Js 对象勾选了,就会在界面右下角提示 Settings app 中 Js 对象使用了 414.77KB 内存。</p>
-<p><img alt="" src="https://mdn.mozillademos.org/files/7731/memory-usage.png" style="width: 320px; height: 480px; display: block; margin: 0px auto;"></p>
-<h3 id="Flash_重绘区域">Flash 重绘区域</h3>
-<p>In this mode, every time a region of the screen is painted by Gecko, Gecko blits a random translucent color over the painted region. Ideally, only parts of the screen that visually change between frames will "flash" with a new color. But sometimes more area than is needed is repainted, causing large areas to "flash". This symptom may indicate that application code is forcing too much of its scene to update. It may also indicate bugs in Gecko itself.</p>
-<p><img alt="A screenshot of Firefox OS with a number of transparent overlays, showing the parts of the screen repainted with each new animation frame." src="https://mdn.mozillademos.org/files/6893/paint-update-fxos.jpg" style="width: 378px; height: 640px; display: block; margin: 0px auto;"></p>
-<h2 id="Graphics_settings">Graphics settings</h2>
-<h3 id="Enable_APZ_for_all_content_(was_Async_PanZoom)">Enable APZ for all content (was Async Pan/Zoom)</h3>
-<p>When enabled, the Async Pan/Zoom module allows panning and zooming to be performed on asynchronously, on another thread, with some noticeable differences to rendering behaviour. To find out more, read the <a href="https://wiki.mozilla.org/Platform/GFX/APZ">MozillaWiki APZ</a> article.</p>
-<h3 id="Tiling_(was_Layers_Enable_tiles)">Tiling (was Layers: Enable tiles)</h3>
-<p>Introduced in Firefox OS 1.4, this feature enables the painting of content to the screen in smaller chunks ("tiles") rather than painting the whole screen at once. This is mainly useful for platform QA work involving reducing checkerboarding and finding regression windows.</p>
-<h3 id="Simple_tiling_(was_Layers_Simple_tiles)">Simple tiling (was Layers: Simple tiles)</h3>
-<p>This flips between the two different content painting implementations described in the section above.</p>
-<h3 id="Hardware_composer_(was_Enable_hardware_compositing)">Hardware composer (was Enable hardware compositing)</h3>
-<p>When enabled, this setting causes the device to use its <a href="https://source.android.com/devices/graphics.html#hwc">Hardware Composer</a> to composite visual elements (surfaces) to the screen.</p>
-<h3 id="Draw_tile_borders_(was_Layers_Draw_tile_borders)">Draw tile borders (was Layers: Draw tile borders)</h3>
-<p>This is very similar to the <a href="#Draw_layer_borders">Draw layer borders</a> option, the difference being that it also draws the borders for individual tiles as well as the borders around layers.</p>
-<h3 id="Draw_layer_borders">Draw layer borders</h3>
-<p>When this setting is enabled, a brightly colored border is added around all the different layers painted to the display — great for diagnosing layout issues.</p>
-<p><img alt="A screenshot from Firefox OS showing an opened select form with the draw layers borders option enabled, resulting in colored borders being drawn on all the different rendered layers." src="https://mdn.mozillademos.org/files/6897/paint-layers-borders.png" style="width: 320px; height: 480px; display: block; margin: 0px auto;"></p>
-<h3 id="Dump_layers_tree">Dump layers tree</h3>
-<p>This option causes a copy of the compositor's layer tree to be dumped to logcat on every frame composited to the screen; this is mainly useful for platform graphics performance work, rather than regular web development.</p>
-<h3 id="Cards_View_Screenshots">Cards View: Screenshots</h3>
-<p>When enabled, this specifies that app screenshots will be taken when the open apps are displayed in card view. If disabled, app icons are shown in the center of blank cards for the card view instead.</p>
-<h2 id="窗口管理设置">窗口管理设置</h2>
-<h3 id="Software_home_button">Software home button</h3>
-<p>Enabling this option creates a software home button that can provide the same functionality as the equivalent hardware button if it is not available. This is intended for future use on devices that are likely to not have hardware home buttons, like tablets.</p>
-<h3 id="Home_gesture">Home gesture</h3>
-<p>Enabling this option allows you to swipe upwards towards the center from outside the screen to bring up the homescreen. Again, this can provide the same functionality as the equivalent hardware button if it is not available, and is intended for future use on devices that are likely to not have hardware home buttons, like tablets.</p>
-<h3 id="Edges_gesture">Edges gesture</h3>
-<p>Enabling this option allows you to swipe left and right from outside the screen towards the center, to navigate to the next and previous sheets (either web pages in the browser, or views inside another app.) This basically works like the browser navigator bar in Firefox.</p>
-<h3 id="Continuous_transition">Continuous transition</h3>
-<p>This setting allows you to decide whether app keyboards open immediately or continuously (with a  transition). Disabling such transition effects are useful on low end devices, when they cause performance to suffer.</p>
-<h3 id="App_transition">App transition</h3>
-<p>Turn this on and then off again and you will disable all app closing/opening transitions: all apps will now just show immediately, without the smooth animation, and keyboards will also open/close without animation. Like "Continuous transition enabled", this is meant for improving performance on low end devices, but it has more of an effect.</p>
-<h3 id="App_suspending">App suspending</h3>
-<p>If enabled, this specifies that when an app is killed in the background, it will be kept in history and reopened when you open it from homescreen/card view. If disabled, such apps are not kept in history/card view.</p>
-<h2 id="Debug_settings">Debug settings</h2>
-<h3 id="Log_slow_animations">Log slow animations</h3>
-<p>This tool tries to help developers understand why animations are not offloaded to the compositor to be run efficiently as possible. It reports "bugs" like trying to animate elements that are too large, or trying to animate CSS properties that can't be offloaded. The messages you'll get on the device will look like the following:</p>
-<pre>I/Gecko ( 5644): Performance warning: Async animation disabled because frame size (1280, 410) is bigger than the viewport (360, 518) [div with id 'views']
-</pre>
-<h3 id="Wi-Fi_output_in_adb">Wi-Fi output in adb</h3>
-<p>Enabling this option adds information about Wi-Fi to the adb logs (error logs from the console can be accessed using <code>adb logcat | grep "Error"</code> in the Terminal.)</p>
-<h3 id="Bluetooth_output_in_adb">Bluetooth output in adb</h3>
-<p>Enabling this option adds information about Bluetooth to the adb logs (error logs from the console can be accessed using <code>adb logcat | grep "Error"</code> in the Terminal.)</p>
-<h3 id="Console_enabled">Console enabled</h3>
-<p>When enabled, this option lets you use the <a href="/en-US/docs/Mozilla/Firefox_OS/Debugging/Using_the_Remote_Web_Console" title="/en-US/docs/Mozilla/Firefox_OS/Debugging/Using_the_Remote_Web_Console">Web Console</a> in Firefox to remotely access the console output on the device; without this option enabled, the <a href="/zh-CN/docs/Web/API/Console/log" title="向web控制台输出一条消息."><code>console.log()</code></a> function does nothing.</p>
-<h3 id="Gaia_debug_traces">Gaia debug traces</h3>
-<p>Enabling this directly enables DEBUG traces in Gaia; see <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=881672" title="FIXED: Enabling a DUMP function for all Gaia apps">bug 881672</a> for more details.</p>
-<div class="note">
- <p><strong>Note</strong>: Unfortunately, not every app supports this mechanism to print their debug log. Instead, they control a "DEBUG" flag in code directly, so enabling this flag does NOT ensure that you'll see all debug logs.</p>
-</div>
-<h3 id="Show_accessibility_settings">Show accessibility settings</h3>
-<p>This enables the accessibility settings menu, subsequently found at <em>Settings &gt; Accessibility</em>. The options contained within the accessibility settings are as follows:</p>
-<h4 id="Screen_reader">Screen reader</h4>
-<p>Enabling this option turns on Firefox OS's screen reader. This is technology that allows a blind person to use a Firefox OS device. Currently at a very early stage, it changes the way the standard touch events work. When the screen reader is on, you must interact with the screen as follows:</p>
-<ul>
- <li>Touch somewhere to focus that app (or whatever) and be alerted as to what it is. This is indicated both by audible speech output and a rectangle around the selected item. Double tap anywhere on the screen (two taps in rapid succession) to activate the item that has the rectangle around it.</li>
- <li>Swipe from left to right to move sequentially through items on the screen. Items are moved through from left to right, then top to bottom, including scrolling the screen vertically if there are more items to display, and you will be alerted as to each one's name via speech output and a rectangle. Swiping right to left moves through the items in reverse order. Again, double-tap the screen to execute the currently highlighted item.</li>
- <li>Do a swipe with two fingers — left, right, up or down — to scroll the screen in that direction. This is equivalent to swiping one finger across the screen in the given direction when the screen reader is not running. For example, a two-finger swipe left on the first home screen will flip to the second one, and a two-finger swipe upwards on a home screen or browser would cause the screne to scroll downwards to show more content.</li>
-</ul>
-<div class="note">
- <p><strong>Note</strong>: If you have turned the screen reader on and wish to disable it again, you must navigate back to the setting via these new gestures and double-tap the checkbox once it is highlighted to turn it off again. That will restore the touch screen functionality to its default behaviour.</p>
-</div>
-<p><strong>Note</strong>: In Firefox 1.4 and above, there is a quick toggle for the screen reader. Press volume up, then down, three times (up, down, up, down, up, down). The screen reader will instruct you to perform this same action again (volume up, down, up, down, up, down) to turn it on if it is not running, or to turn it off if it is already running. If you do not want to change the current toggle state, simply do something else. That way, you can turn it on and off at will to test your web application for accessibility without having to navigate the accessibility settings menu each time.</p>
-<h4 id="Speech_volume">Speech volume</h4>
-<p>A slider that controls how loud the speech is delivered.</p>
-<h4 id="Speech_rate">Speech rate</h4>
-<p>A slider that controls how fast the speech is delivered.</p>
-<h3 id="Launch_first_time_use">Launch first time use</h3>
-<p>The "Launch first time use" button runs the first-time startup program; this lets you go through the initial setup and tutorial process, and is useful when trying to debug that process, or if you want to re-configure your device from scratch.</p>
-<h2 id="Obsolete_settings">Obsolete settings</h2>
-<p>This section lists settings that are no longer provided, or no longer exist in the same state, but might still be interesting if you are running an older version of Firefox OS.</p>
-<h3 id="Accessibility">Accessibility</h3>
-<p>In versions of Firefox earlier than newer 1.4 versions, this controls the accessibility settings, as explained in the <a href="#Show_accessibility_settings">Show_accessibility_settings</a> section above.</p>
-<h3 id="Grid">Grid</h3>
-<p>The "Grid" option, when enabled, causes the Firefox OS display to be overlaid with a grid pattern to help you gauge positioning and alignment of items. For example, below we see the Browser app running with the Grid option enabled:</p>
-<p><img alt="" src="https://mdn.mozillademos.org/files/5071/Grid.png" style="width: 320px; height: 480px; display: block; margin: 0px auto;"></p>
-<p>The grid's heavier lines are 32 pixels apart, both horizontally and vertically.</p>
-<h3 id="Show_frames_per_second">Show frames per second</h3>
-<p>In Firefox OS versions older than newer 1.4, enabling this displays frames per second, as explained in the <a href="#Frames_per_second">Frames_per_second</a> section above.</p>
-<h3 id="Show_time_to_load">Show time to load</h3>
-<p>In Firefox OS versions older than newer 1.4, enabling this displays time to load information, as explained in the <a href="#Time_to_load">Time_to_load</a> section above.</p>
-<h3 id="Rocketbar_enabled">Rocketbar enabled</h3>
-<p>In Firefox OS versions older than newer 1.4, this option enables the new <a href="https://groups.google.com/forum/#!topic/mozilla.dev.gaia/Nlfbrq1KMP0">Firefox Rocketbar</a> on your device, which provides a useful new way to switch between apps, search, and more. When enabled, you'll find a search icon at the top left of the device, and the RocketBar can be brought up by swiping from the top left of the device towards the bottom left.</p>
-<div class="note">
- <p><strong>Note</strong>: In newer versions of Firefox OS, Rocketbar is enabled automatically and cannot be turned off.</p>
-</div>
-<h3 id="Contacts_debugging_output_in_adb">Contacts debugging output in adb</h3>
-<p>Enabling this option adds debugging information about contacts to the adb logs (error logs from the console can be accessed using <code>adb logcat | grep "Error"</code> in the Terminal.)</p>
-<h3 id="Progressive_paint_(was_Layers_Progressive_paint)">Progressive paint (was Layers: Progressive paint)</h3>
-<p>This was introduced to help with debugging of the <a href="https://wiki.mozilla.org/Platform/GFX/APZ">Async Panning/Zoom module</a> (APZ) during its implementation. Now APZ implementation is complete, this option is deprecated, and will be removed from future versions (see <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1003228" title="FIXED: Remove unnecessary APZ-related settings and menu items">bug 1003228</a>).</p>
-<h3 id="Displayport_Heuristics">Displayport Heuristics</h3>
-<ul>
- <li>Default</li>
- <li>Center displayport</li>
- <li>Assume perfect paints</li>
- <li>Taller displayport</li>
- <li>Faster paints</li>
- <li>No checkerboarding</li>
-</ul>
-<p>These options were introduced to help with debugging of the <a href="https://wiki.mozilla.org/Platform/GFX/APZ">Async Panning/Zoom module</a> (APZ) during its implementation, specifically to allow QA to experiment with different repainting heuristics to see which resulted in the least amount of checkboarding.. Now APZ implementation is complete, these options are deprecated, and will be removed from future versions (see <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1003228" title="FIXED: Remove unnecessary APZ-related settings and menu items">bug 1003228</a>).</p>
-<h2 id="Keyboard_layouts">Keyboard layouts</h2>
-<p>In addition to the developer-specific options listed above, Firefox OS &lt; 1.4's developer settings featured keyboard layout options. These let you toggle on and off the then-experimental Chinese input methods:</p>
-<p><img alt="" src="https://mdn.mozillademos.org/files/5079/InputMethods.png"></p>
-<p>As of Firefox 1.4, these options have been removed. This is because the Chinese keyboard layout implementations (zhuyin and pinyin) have now been completed.</p>
-<div class="note">
- <p><strong>Note</strong>: For other keyboard layouts still under development, such as Japanese, we now have a build-time config to opt them in.</p>
-</div>
-<p> </p>
diff --git a/files/zh-cn/archive/b2g_os/debugging/index.html b/files/zh-cn/archive/b2g_os/debugging/index.html
deleted file mode 100644
index a83bb6ae67..0000000000
--- a/files/zh-cn/archive/b2g_os/debugging/index.html
+++ /dev/null
@@ -1,80 +0,0 @@
----
-title: Debugging on Firefox OS
-slug: Archive/B2G_OS/Debugging
-tags:
- - B2G
- - Debugging
- - Firefox OS
- - NeedsTranslation
- - QA
- - Testing
- - TopicStub
-translation_of: Archive/B2G_OS/Debugging
----
-<div class="summary">
- <p><span class="seoSummary">There are two main types of debugging you'll want to with Firefox OS: debugging apps, and debugging other aspects of the system.</span> This section of the site provides articles covering the different tools at your disposal to debug your Firefox OS code.</p>
-</div>
-<h2 id="Debugging_apps">Debugging apps</h2>
-<p>When debugging your web apps, the best tool at your disposal is Mozilla's powerful <a href="/en-US/Firefox_OS/Using_the_App_Manager">App Manager</a>, which allows you to run your apps directly on a real device or simulator, update any changes instantly, and debug them directly on the device using Mozilla's excellent <a href="https://developer.mozilla.org/en-US/docs/Tools" title="en-US/docs/Tools">developer tools</a>. This should be your first choice, especially for app/Gaia debugging.</p>
-<dl>
- <dt>
- <a href="/en-US/Firefox_OS/Using_the_App_Manager">Using the App Manager</a></dt>
- <dd>
- The App Manager is a new tool available in Firefox for Desktop, which provides a number of useful tools to help you test, deploy and debug HTML5 web apps on Firefox OS phones and the Firefox OS Simulator, directly from your browser.</dd>
- <dt>
- <a href="/en-US/docs/Mozilla/Firefox_OS/Debugging/Debugging_OOMs">Debugging out of memory errors on Firefox OS</a></dt>
- <dd>
- This article describes how B2G's multiprocess architecture affects what the phone does when we run out of memory, and how to understand and debug OOM crashes.</dd>
-</dl>
-<h2 id="Debugging_GaiaB2G">Debugging Gaia/B2G</h2>
-<p>If you want to debug code from the Gaia apps suite or B2G itself, the following tools will be of use to you.</p>
-<dl>
- <dt>
- <a href="/en-US/docs/Mozilla/Firefox_OS/Debugging/Debugging_using_the_desktop_B2G_client" title="/en-US/docs/Mozilla/Firefox_OS/Debugging/Debugging_using_the_desktop_B2G_client">Debugging using the desktop B2G client</a></dt>
- <dd>
- You can use the dedicated B2G desktop application (and associated tools) to debug multiple aspects of B2G and Gaia.</dd>
- <dt>
- <a href="/en-US/Firefox_OS/Hacking_Firefox_OS/Quickstart_guide_to_Gaia_development">Quickstart guide to Gaia development</a></dt>
- <dd>
- This guide provides a very quick easy guide to developing and debugging Gaia apps, including running Gaia inside desktop Firefox, and debugging Gaia with App Manager.</dd>
- <dt>
- <a href="/en-US/docs/Mozilla/Firefox_OS/Debugging/Debugging_B2G_using_gdb" title="/en-US/docs/Mozilla/Firefox_OS/Debugging/Debugging_B2G_using_gdb">Debugging B2G using gdb</a></dt>
- <dd>
- The popular gdb debugger can be used to debug Firefox OS and web apps running on a device, or on an emulator. This guide will show you how it's done.</dd>
- <dt>
- <a href="/en-US/docs/Mozilla/Firefox_OS/Debugging/Debugging_B2G_using_valgrind" title="/en-US/docs/Mozilla/Firefox_OS/Debugging/Debugging_B2G_using_gdb">Debugging B2G using Valgrind</a></dt>
- <dd>
- Valgrind gives developers access to information about memory allocations, threads, and other information important to performance. This guide shows how to run Valgrind either on desktop B2G or select phone hardware.</dd>
- <dt>
- <a href="/en-US/docs/Mozilla/Debugging/HTTP_logging#Firefox_OS_phones" title="/en-US/docs/Mozilla/Debugging/HTTP_logging#Firefox_OS_phones">Getting NSPR logs in B2G</a></dt>
- <dd>
- You can use NSPR logs to record HTTP and other networking.</dd>
- <dt>
- <a href="/en-US/docs/Mozilla/Debugging/Debugging_OpenGL" title="/en-US/docs/Mozilla/Debugging/Debugging_OpenGL">Debugging OpenGL</a></dt>
- <dd>
- How to debug OpenGL code on Firefox OS.</dd>
-</dl>
-<h2 id="General_setup_and_information"><strong>General setup and information</strong></h2>
-<p>The following articles provide information on individual aspects of setup for Firefox OS development. The chances are that you won't need these, especially if you are just debugging apps using the App Manager. But we have made them available here in case you do.</p>
-<dl>
- <dt>
- <a href="/en-US/docs/Mozilla/Firefox_OS/Debugging/Developer_settings" title="/en-US/docs/Mozilla/Firefox_OS/Debugging/Developer_settings">Developer settings for Firefox OS</a></dt>
- <dd>
- There are a number of settings options available for developers on Firefox OS. This guide explains what they do and how to take advantage of them.</dd>
- <dt>
- <a href="/en-US/Firefox_OS/Debugging/Installing_ADB">Installing and using ADB</a></dt>
- <dd>
- Many aspects of Firefox OS development require installation of <code>adb</code>, the Android Debug Bridge. This article explains how to do that, and shares some common useful ADB commands.</dd>
- <dt>
- <a href="/en-US/docs/Mozilla/Firefox_OS/Debugging/On-device_console_logging" title="/en-US/docs/Mozilla/Firefox_OS/Debugging/On-device_console_logging">On-device console logging</a></dt>
- <dd>
- How to log to console on a Firefox OS device, and how to access the resulting logs for review on your computer.</dd>
- <dt>
- <a href="/en-US/docs/Mozilla/Firefox_OS/Debugging/Connecting_a_Firefox_OS_device_to_the_desktop" title="/en-US/docs/Mozilla/Firefox_OS/Debugging/Debugging_Firefox_OS_apps_in_desktop_Firefox">Connecting a Firefox OS device to the desktop</a></dt>
- <dd>
- This short guide explains how to set up your Firefox OS device and your desktop so that the desktop can communicate with the device over USB.</dd>
- <dt>
- <a href="/en-US/docs/Mozilla/Firefox_OS/Debugging/Setting_up" title="/en-US/docs/Mozilla/Firefox_OS/Debugging/Setting_up">Setting up to debug Firefox OS code</a></dt>
- <dd>
- Before you can begin using most of the tools integrated into Firefox for debugging code running under Firefox OS, you need to do a little configuration work. This article explains what you need to do.</dd>
-</dl>
diff --git a/files/zh-cn/archive/b2g_os/debugging/taking_screenshots/index.html b/files/zh-cn/archive/b2g_os/debugging/taking_screenshots/index.html
deleted file mode 100644
index a1ca14b2aa..0000000000
--- a/files/zh-cn/archive/b2g_os/debugging/taking_screenshots/index.html
+++ /dev/null
@@ -1,69 +0,0 @@
----
-title: 截屏
-slug: Archive/B2G_OS/Debugging/taking_screenshots
-tags:
- - Firefox OS
- - 截屏
- - 调试
-translation_of: Archive/B2G_OS/Debugging/taking_screenshots
----
-<div class="summary">
- <p><span class="seoSummary">在许多场合下截屏都是非常有用的,例如将你的工作展示给客户端或者在 Marketplace 中发布应用。本文则对在 Firefox OS 手机中如何截屏进行了说明。</span></p>
-</div>
-<div class="note">
- <p><strong>Note</strong>: Android 会觉得非常熟悉。这些步骤都是类似的。</p>
-</div>
-<h2 id="准备你的手机">准备你的手机</h2>
-<ol>
- <li>在手机上到 <a href="/en-US/Firefox_OS/Debugging/Developer_settings">Developer Settings </a> 查看远程调试和终端是否使能</li>
- <li>确保你的手机已经  <a href="/en-US/Firefox_OS/Debugging/Installing_ADB">ADB installed</a> 并且正常工作</li>
- <li>通过 USB 将手机连接到电脑</li>
-</ol>
-<h2 id="截屏">截屏</h2>
-<p>你当前可以有 4 种方式可以实现: 使用终端,在 Eclipse 中使用 DDMS, 在手机上使用手机上的组合按键,或者使用 App Manager。</p>
-<h3 id="终端">终端</h3>
-<p>打开一个终端窗口,依次输入下面 3 个命令:</p>
-<ol>
- <li>使用下面的命令截屏(如果你想要称之为其他的名称,可以修改 <code>screenshot.png</code>)<br>
- <code>adb shell screencap -p /sdcard/screenshot.png</code></li>
- <li>从电脑中获取图片:<br>
- <code>adb pull /sdcard/screenshot.png</code></li>
- <li>在设备中删除截屏图片<br>
- <code>adb shell rm /sdcard/screenshot.png</code></li>
-</ol>
-<p>Alternatively, you can use ffmpeg:</p>
-<ol>
- <li>Make sure you have ffmpeg installed:
- <ol>
- <li>On Mac, if you use MacPorts, you can do this with <code>sudo port install ffmpeg</code>. For homebrew, do <code>brew install ffmpeg</code>.</li>
- <li>On Linux (Ubuntu/Debian), use <code>sudo apt-get install ffmpeg</code>.</li>
- </ol>
- </li>
- <li><code>cd</code> into the <code>B2G/gaia</code> directory.</li>
- <li>Use the <code>make screenshot</code> command to take a screenshot.</li>
- <li>You now have a screenshot called <code>screenshot.png</code>.</li>
-</ol>
-<h3 id="DDMS">DDMS</h3>
-<p>Open Eclipse.</p>
-<ol>
- <li>Open DDMS: <em>Window &gt; Open Perspective &gt; Other &gt; DDMS</em>.</li>
- <li>On the left side panel, in the <em>Devices</em> tab, click the <em>Screen capture</em> button.</li>
- <li>A new window appears with several options; click on <em>Save</em> button to save your screenshot.</li>
-</ol>
-<div class="note">
- <p><strong>Note</strong>: To learn more about DDMS, have a look at the <a href="http://developer.android.com/tools/debugging/ddms.html" title="DDMS documentation">DDMS documentation</a> .</p>
-</div>
-<h3 id="Phone_button_combination">Phone button combination</h3>
-<ol>
- <li>On Firefox OS versions up to 2.0, simultaneously hold down the <em>Home</em> and <em>Power</em> buttons for a few seconds.</li>
- <li>On Firefox OS version 2.1 and beyond, simultaneously hold down the <em>Volume Down</em> and <em>Power</em> buttons for a few seconds.</li>
-</ol>
-<p>This takes a screenshot, which is saved in your Gallery. You can now copy the picture from your SDCard to your computer using whatever method suits you best.</p>
-<div class="note">
- <p><strong>Note</strong>: The button combination change was made because many people feel that <em>Home</em> and <em>Power</em> is more difficult to do that it should be, especially with one hand, plus devices with no hardware <em>Home</em> button are not very well supported (you can't use a software <em>Home</em> button in many places in Gaia, such as the lock screen.)</p>
-</div>
-<h3 id="App_ManagerSimulator">App Manager/Simulator</h3>
-<ol>
- <li>Go to the <a href="https://developer.mozilla.org/en-US/Firefox_OS/Using_the_App_Manager">App Manager</a>, connect to your phone, and navigate to the <strong>Device</strong> tab on the left.</li>
- <li>Click on the <strong>Screenshot</strong> button at the bottom of the page (is at the same place that you startes the simulator).</li>
-</ol>