title: firebase serve and debugging functions?
body: <p>I ran </p>
  
  <blockquote>
    <p>firebase serve --only-functions</p>
  </blockquote>
  
  <p>Then ran </p>
  
  <blockquote>
    <p>functions inspect addMessage</p>
  </blockquote>
  
  <p>So I could debug the addMessage function. Debugging however did not work.</p>
  
  <p>Running</p>
  
  <blockquote>
    <p>firebase deploy addMessage --trigger-http
     firebase inspect addMessage</p>
  </blockquote>
  
  <p>Did work and allow me to debug but it doesn't seem to support hot reloading.</p>
  
  <p>Is it possible to have hot reloading and debugging working at the same time?</p>
  
  <p>My index.js:</p>
  
  <pre><code>const functions = require('firebase-functions');
  
  // The Firebase Admin SDK to access the Firebase Realtime Database.
  const admin = require('firebase-admin');
  admin.initializeApp();
  
  exports.addMessage = functions.https.onRequest((req, res) =&gt; {
      // Grab the text parameter.
      const original = "123";//req.query.text;
      // Push the new message into the Realtime Database using the Firebase Admin SDK.
      return admin.database().ref('/messages').push({original: original}).then((snapshot) =&gt; {
        // Redirect with 303 SEE OTHER to the URL of the pushed object in the Firebase console.
        return res.redirect(303, snapshot.ref.toString());
      });
    });
  </code></pre>