title: Razor in VSCode | How to automate the search and collection of all variables within a .cshtml file, before compilation to HTML?
body: <p>Let's say I have a Razor file (<em>example.cshtml</em>) containing the following lines of code, and that <strong>I can only work on VSCode without access to debugging tools</strong>:</p>
  <pre><code>@{ string testString = &quot;test1&quot;;
     bool testBool = false;
  }
  </code></pre>
  <p>Is there any way I can &quot;scan&quot; the file and collect all the manually declared variables (testString and testBool in this case) and their values (&quot;test1&quot; and false in this case), so that I can then display them? I know I can do this manually and see the values once the HTML is compiled:</p>
  <pre><code>@testString @testBool
  </code></pre>
  <p>But I'd like this (the scan and collection of variables) to be automated.</p>