aboutsummaryrefslogtreecommitdiff
path: root/files/pt-pt/tools/remote_debugging/debugging_firefox_desktop/index.html
blob: 0099b3a81d6262e8272362695859dafcbd434ee8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
---
title: Depurar Firefox para PC
slug: Tools/Remote_Debugging/Debugging_Firefox_Desktop
tags:
  - Depuração
  - Ferramentas
  - Guía
translation_of: Tools/Remote_Debugging/Debugging_Firefox_Desktop
---
<p>{{draft}}</p>

<p>{{ToolsSidebar}}</p>

<p>This guide explains how you can use the Firefox Developer Tools to debug a different instance of desktop Firefox running on the same machine. In this guide, the instance of Firefox being debugged is called the <em>debuggee</em>, and the instance of Firefox doing the debugging is called the <em>debugger</em>.</p>

<h2 id="Enable_remote_debugging">Enable remote debugging</h2>

<p>First, you'll need to ensure that both debugger and debuggee have the "Enable browser chrome and add-on debugging toolboxes" and "Enable remote debugging" settings checked in the <a href="/en-US/docs/Tools/Tools_Toolbox#Settings">Developer Tools Settings</a>. If you're using <a href="/en-US/Firefox/Developer_Edition">Firefox Developer Edition</a>, they are checked by default.</p>

<p><img alt="" src="https://mdn.mozillademos.org/files/16905/remote_debug_settings.png" style="border: 1px solid black; display: block; margin: 0 auto;"></p>

<p>You only need to do this once: the setting values persist across restarts.</p>

<h2 id="Start_the_debugger_server">Start the debugger server</h2>

<p>Next, you need to start the debugger server in the debuggee.</p>

<p>Run the debuggee from the command line, passing it the <code>--start-debugger-server</code> option:</p>

<pre>/path/to/firefox --start-debugger-server</pre>

<p>Passed with no arguments, --start-debugger-server makes the debugger server listen on port 6000. To use a different port, pass the desired port number:</p>

<pre>/path/to/firefox --start-debugger-server 1234</pre>

<p>Note: in Windows, the <code>start-debugger-server</code> call will only have one dash:</p>

<pre>firefox.exe -start-debugger-server 1234</pre>

<div class="note">
<p><strong>Note</strong>: By default, and for security reasons, the <code>devtools.debugger.force-local</code> option is set. If you want to debug a Firefox instance from an external machine, you can change this option, but only do this on a trusted network or set a strong firewall rule to lock down which machines can access it.</p>
</div>