<p dir="auto"><strong>Context:</strong></p>
<ul dir="auto">
<li>Playwright Version:
<ul dir="auto">
<li>NuGet: 1.17.3 (installed in the project)</li>
<li>microsoft.playwright.cli: 1.2.2 (from <code class="notranslate">dotnet tool list -g</code>)</li>
<li>Installed on machine: 1.17.1 (<code class="notranslate">playwright -V</code>)</li>
</ul>
</li>
<li>Operating System: Windows</li>
<li>.NET version: .NET 6</li>
<li>Browser: All</li>
</ul>
<p dir="auto"><strong>Describe the bug</strong></p>
<p dir="auto">When <code class="notranslate">PWDEBUG</code> is set to 0, Playwright Inspector appears when tests are ran [incorrect behaviour, I believe].</p>
<p dir="auto">When set to an empty string (PowerShell: <code class="notranslate">$env:PWDEBUG=''</code>, then Inspector is not running [correct behaviour].</p>
<p dir="auto">Solution:</p>
<ul dir="auto">
<li>Disable running Inspector when <code class="notranslate">PWDEBUG</code> environment variable is set to 0.</li>
<li>Update <a href="https://playwright.dev/dotnet/docs/inspector" rel="nofollow">documentation</a>.</li>
</ul>
<p dir="auto"></p><div class="Box Box--condensed my-2">
  <div class="Box-header f6">
    <p class="mb-0 text-bold">
      <a href="https://github.com/microsoft/playwright/blob/c510819407d91975340bee1249502c51c6a3bde9/packages/playwright-core/src/utils/utils.ts#L324">playwright/packages/playwright-core/src/utils/utils.ts</a>
    </p>
    <p class="mb-0 color-fg-muted">
         Line 324
      in
      <a data-pjax="true" class="commit-tease-sha" href="/microsoft/playwright/commit/c510819407d91975340bee1249502c51c6a3bde9">c510819</a>
    </p>
  </div>
  <div itemprop="text" class="Box-body p-0 blob-wrapper blob-wrapper-embedded data">
    <table class="highlight tab-size mb-0 js-file-line-container" data-tab-size="8" data-paste-markdown-skip="">

        <tbody><tr class="border-0">
          <td id="L324" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="324"></td>
          <td id="LC324" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">const</span> <span class="pl-s1">debugEnv</span> <span class="pl-c1">=</span> <span class="pl-en">getFromENV</span><span class="pl-kos">(</span><span class="pl-s">'PWDEBUG'</span><span class="pl-kos">)</span> <span class="pl-c1">||</span> <span class="pl-s">''</span><span class="pl-kos">;</span> </td>
        </tr>
    </tbody></table>
  </div>
</div>
<p></p>
<p dir="auto"><a href="https://playwright.dev/docs/next/debug#run-in-debug-mode" rel="nofollow">the docs</a> say setting <code class="notranslate">PWDEBUG</code> to <code class="notranslate">1</code> enables the playwright inspector, so one would assume setting it to <code class="notranslate">0</code> disables it</p>