title: VSCode debugger freezes
body: <p>I am trying to debug a C++ file in VSCode. The debugger works fine while it is in the <code>main()</code> function, but as soon as it enters a function, the debugger freezes and the control panel no longer works(except the stop button). In the left bar, it shows the loading icon next to &quot;Local&quot; variables, which loads perpetually.</p>
  <p>I am on macOS 11.3.1, and VSCode Version: 1.58.2 (Universal).</p>
  <p>Here are my files: <code>debug.cpp</code></p>
  <pre><code>#include&lt;iostream&gt; 
  #include&lt;queue&gt; 
  #include&lt;vector&gt;
  #include&lt;map&gt; 
  #include&lt;stack&gt; 
  #include&lt;unordered_map&gt;
  #include&lt;string&gt;
  using namespace std;
  
  int longestConsecutive(vector&lt;int&gt;&amp; nums) {
  
      unordered_map&lt;int, bool&gt; hash;
      for(int i = 0; i&lt;nums.size(); i++){
          hash[nums[i]] = true;
      }
  
      int max_range = 0;
      for(int i = 1; i&lt;nums.size()-1; i++){
          if(hash[nums[i]]){
              hash[nums[i]] = false;
              int j = i-1;
              int leftRange = 0;
              while(hash[nums[j]] &amp;&amp; j&gt;=0){
                  hash[nums[j]] = false;
                  leftRange++;
                  j--;
              }
              int k = i+1;
              int rightRange = 0;
              while(hash[nums[k]] &amp;&amp; k&lt;nums.size()){
                  hash[nums[k]] = false;
                  rightRange++;
                  k++;
              }
              if(leftRange+rightRange+1 &gt; max_range){
                  max_range = leftRange+rightRange+1;
              }
          }
      }
      return max_range;
  
  }
  
  int main(){
      vector&lt;int&gt; vec;
      vec.push_back(100);
      vec.push_back(4);
      vec.push_back(200);
      vec.push_back(1);
      vec.push_back(3);
      vec.push_back(2);
  
      int ans = longestConsecutive(vec);
  
      cout&lt;&lt;ans&lt;&lt;endl;
  }
  </code></pre>
  <p><code>launch.json</code></p>
  <pre><code>{
      // Use IntelliSense to learn about possible attributes.
      // Hover to view descriptions of existing attributes.
      // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
      &quot;version&quot;: &quot;0.2.0&quot;,
      &quot;configurations&quot;: [
          {
              &quot;name&quot;: &quot;clang++ - Build and debug active file&quot;,
              &quot;type&quot;: &quot;cppdbg&quot;,
              &quot;request&quot;: &quot;launch&quot;,
              &quot;program&quot;: &quot;${fileDirname}/${fileBasenameNoExtension}&quot;,
              &quot;args&quot;: [],
              &quot;stopAtEntry&quot;: false,
              &quot;cwd&quot;: &quot;${fileDirname}&quot;,
              &quot;environment&quot;: [],
              &quot;externalConsole&quot;: false,
              &quot;MIMode&quot;: &quot;lldb&quot;,
              &quot;preLaunchTask&quot;: &quot;C/C++: clang++ build active file&quot;
          }
      ]
  }
  </code></pre>
  <p>A thing to note, when I change my <code>longestConsecutive</code> function in <code>debug.cpp</code>, and make it something entirely random like:</p>
  <pre><code>int temp;
  temp = 100;
  return temp;
  </code></pre>
  <p>then the debugger works fine. Is there something wrong with the code I wrote?</p>
  <p>Thanks in advance!</p>