title: Output console logs from page.evaluate to local terminal?
body: <p>How can I output console logs from page.evaluate to local terminal?</p>
  
  <pre><code>await page.evaluate(() =&gt; {
      console.log("test"); // &lt;-- I want this message to show in my local terminal
  </code></pre>
  
  <p>I am running my code locally on a MacOS computer.</p>
  
  <p>The following solutions I have found in github issues have not worked:</p>
  
  <p>solution 1</p>
  
  <pre><code>const browser = await puppeteer.launch({
      'args': ['--disable-dev-shm-usage', '--disable-software-rasterizer'],
      dumpio: true
  });
  
  // output:
  // ERROR:gpu_process_transport_factory.cc(967)] Lost UI shared context.
  </code></pre>
  
  <p>solution 2</p>
  
  <pre><code>const browser = await puppeteer.launch({
      'args': ['--disable-dev-shm-usage', '--disable-software-rasterizer']
  });
  
  page.on('console', msg =&gt; {
      for (let i = 0; i &lt; msg.args.length; ++i)
          console.log(`${i}: ${msg.args[i]}`);
  });
  
  // output:
  // nothing
  </code></pre>