Sophie

Sophie

distrib > Mageia > 7 > armv7hl > media > core-updates > by-pkgid > 67810d03ada515381702f7b70888f800 > files > 499

tortoisehg-4.9.1-1.mga7.noarch.rpm


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>11. Debugging &#8212; TortoiseHg 4.7.0 documentation</title>
    <link rel="stylesheet" href="_static/tortoisehg.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    <script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
    <script type="text/javascript" src="_static/jquery.js"></script>
    <script type="text/javascript" src="_static/underscore.js"></script>
    <script type="text/javascript" src="_static/doctools.js"></script>
    <script type="text/javascript" src="_static/language_data.js"></script>
    <link rel="index" title="Index" href="genindex.html" />
    <link rel="search" title="Search" href="search.html" />
    <link rel="prev" title="10. Frequently Asked Questions" href="faq.html" />
   
  <link rel="stylesheet" href="_static/custom.css" type="text/css" />
  
  
  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />

  </head><body>
  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          

          <div class="body" role="main">
            
  <div class="section" id="module-debugging">
<span id="debugging"></span><h1>11. Debugging<a class="headerlink" href="#module-debugging" title="Permalink to this headline">¶</a></h1>
<div class="section" id="dialogs">
<h2>11.1. Dialogs<a class="headerlink" href="#dialogs" title="Permalink to this headline">¶</a></h2>
<p>Stderr is being captured to a buffer that is being inspected at program
exit.  If any serious errors (tracebacks, etc) are found in the stderr
buffer the entire contents are sent to the bug report tool so the user
can (should) report a bug.  If you suspect there are errors that are not
being reported, you can set the environment variable <strong>THGDEBUG</strong> to any
value to disable the stderr buffering.</p>
<p>If you have a bit of Python knowledge, you can also use:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">thg</span> <span class="o">--</span><span class="n">debugger</span> <span class="o">&lt;</span><span class="n">command</span><span class="o">&gt;</span>
</pre></div>
</div>
<p>To disable the forking behavior of thg, you can either set an
environment variable <strong>THG_HGTK_SPAWN</strong>, or add the command line
parameter ‘–nofork’.</p>
<div class="section" id="windows">
<h3>11.1.1. Windows<a class="headerlink" href="#windows" title="Permalink to this headline">¶</a></h3>
<p>To debug the changelog viewer, for instance, enter these commands
into a <strong class="command">cmd.exe</strong> window, while inside the repository:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="nb">set</span> <span class="n">THGDEBUG</span><span class="o">=</span><span class="mi">1</span>
<span class="n">thg</span> <span class="o">--</span><span class="n">nofork</span> <span class="n">log</span>
</pre></div>
</div>
</div>
<div class="section" id="linux-macosx">
<h3>11.1.2. Linux/MacOSX<a class="headerlink" href="#linux-macosx" title="Permalink to this headline">¶</a></h3>
<p>To debug the changelog viewer, for instance, enter these commands
into your shell window, while inside the repository:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">export</span> <span class="n">THGDEBUG</span><span class="o">=</span><span class="mi">1</span>
<span class="n">thg</span> <span class="o">--</span><span class="n">nofork</span> <span class="n">log</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="shell-extension">
<h2>11.2. Shell Extension<a class="headerlink" href="#shell-extension" title="Permalink to this headline">¶</a></h2>
<p>The debugging mechanisms depend on your platform.</p>
<div class="section" id="id1">
<h3>11.2.1. Windows<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h3>
<p>See also <a class="reference external" href="https://msdn.microsoft.com/en-us/library/cc144064(VS.85).aspx">https://msdn.microsoft.com/en-us/library/cc144064(VS.85).aspx</a>
for some info bits about Running and Testing Shell Extensions on Windows</p>
<p>The <strong class="command">DbgView</strong> tool from the SysInternals suite will capture
debug messages from the shell extension.  However, the shell
extension does not emit debugging info by default.  It must be enabled
by setting the registry key defined in
<code class="file docutils literal notranslate"><span class="pre">win32/shellext/DebugShellExt.reg</span></code> in the TortoiseHg source
repository.  You can double-click on this file to load the key into your
registry.</p>
<p>Another option is to exit the <strong class="command">TortoiseHgOverlayServer</strong> system tray
application and start it from the command line.  It will emit some debug
information to the console.</p>
</div>
<div class="section" id="nautilus">
<h3>11.2.2. Nautilus<a class="headerlink" href="#nautilus" title="Permalink to this headline">¶</a></h3>
<p>Debugging is done via the environment variable DEBUG_THG</p>
<ul>
<li><p class="first">to test in a separate process:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">DEBUG_THG</span><span class="o">=</span><span class="n">Ne</span> <span class="n">TMPDIR</span><span class="o">=/</span><span class="n">tmp</span><span class="o">/</span><span class="n">anydir</span><span class="o">/</span> <span class="o">--</span><span class="n">no</span><span class="o">-</span><span class="n">desktop</span> <span class="n">nautilus</span> <span class="p">[</span><span class="n">path</span><span class="p">]</span>
</pre></div>
</div>
</li>
<li><p class="first">to test in the main instance:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">nautilus</span> <span class="o">-</span><span class="n">q</span>
<span class="n">DEBUG_THG</span><span class="o">=</span><span class="n">NOe</span> <span class="n">nautilus</span>
</pre></div>
</div>
</li>
<li><p class="first">permanent debugging, set DEBUG_THG in a file which is read on session
start (~/.profile, ~/.xprofile)</p>
</li>
</ul>
<p>Upper case characters in DEBUG_THG specify modules.  Only <em>O</em> and <em>N</em>
for <em>OverlayCache</em> and <em>Nautilus</em>, respectively, are supported module
names.  Lower case characters imply parts. Only <em>e</em> is supported,
implying <em>error</em> messages.</p>
<p>To restart nautilus, chose either</p>
<ol class="arabic simple">
<li>killall nautilus (the session restarts nautilus automatically, stdin and stdout go to ~/.xsession-errors)</li>
<li>nautilus -q; nautilus (stdin and stdout are on the console)</li>
</ol>
</div>
</div>
</div>


          </div>
          
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
            <p class="logo"><a href="index.html">
              <img class="logo" src="_static/thg_logo_92x50.png" alt="Logo"/>
            </a></p>
<h1 class="logo"><a href="index.html">TortoiseHg</a></h1>








<h3>Navigation</h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="preface.html">1. Preface</a></li>
<li class="toctree-l1"><a class="reference internal" href="intro.html">2. Introduction</a></li>
<li class="toctree-l1"><a class="reference internal" href="whatsnew.html">3. What’s New</a></li>
<li class="toctree-l1"><a class="reference internal" href="quick.html">4. A Quick Start Guide to TortoiseHg</a></li>
<li class="toctree-l1"><a class="reference internal" href="daily.html">5. TortoiseHg in daily use</a></li>
<li class="toctree-l1"><a class="reference internal" href="settings.html">6. Settings</a></li>
<li class="toctree-l1"><a class="reference internal" href="patches.html">7. Patches</a></li>
<li class="toctree-l1"><a class="reference internal" href="extensions.html">8. Extensions</a></li>
<li class="toctree-l1"><a class="reference internal" href="nonhg.html">9. Use with other VCS systems</a></li>
<li class="toctree-l1"><a class="reference internal" href="faq.html">10. Frequently Asked Questions</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">11. Debugging</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#dialogs">11.1. Dialogs</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#windows">11.1.1. Windows</a></li>
<li class="toctree-l3"><a class="reference internal" href="#linux-macosx">11.1.2. Linux/MacOSX</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#shell-extension">11.2. Shell Extension</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#id1">11.2.1. Windows</a></li>
<li class="toctree-l3"><a class="reference internal" href="#nautilus">11.2.2. Nautilus</a></li>
</ul>
</li>
</ul>
</li>
</ul>

<div class="relations">
<h3>Related Topics</h3>
<ul>
  <li><a href="index.html">Documentation overview</a><ul>
      <li>Previous: <a href="faq.html" title="previous chapter">10. Frequently Asked Questions</a></li>
  </ul></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
  <h3>Quick search</h3>
    <div class="searchformwrapper">
    <form class="search" action="search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    </div>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>








        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="footer">
      &copy;2010-2019, Steve Borho and others.
      
      |
      Powered by <a href="http://sphinx-doc.org/">Sphinx 1.8.4</a>
      &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.12</a>
      
      |
      <a href="_sources/debugging.txt"
          rel="nofollow">Page source</a>
    </div>

    

    
  </body>
</html>