title: Cloud Function with pubsub trigger topic is not working
body: <p>I have wrote a simple code to print data and context from a pubsub trigger cloud function.</p>
  <p>def main(event, context):
  &quot;&quot;&quot;Background Cloud Function to be triggered by Pub/Sub.
  Args:
  event (dict):  The dictionary with data specific to this type of
  event. The <code>data</code> field contains the PubsubMessage message. The
  <code>attributes</code> field will contain custom attributes if there are any.
  context (google.cloud.functions.Context): The Cloud Functions event
  metadata. The <code>event_id</code> field contains the Pub/Sub message ID. The
  <code>timestamp</code> field contains the publish time.
  &quot;&quot;&quot;
  import base64</p>
  <pre><code>print(&quot;&quot;&quot;This Function was triggered by messageId {} published at {}
  &quot;&quot;&quot;.format(context.event_id, context.timestamp))
  
  if 'data' in event:
      name = base64.b64decode(event['data']).decode('utf-8')
  else:
      name = 'World'
  print('Hello {}!'.format(name))
  </code></pre>
  <p>Cloud function is deployed successfully but whenever I publish a message to the trigger topic in logs I cannot see any function execution statement.</p>
  <p>I have already verified that I am calling main function only and publishing to a right pubsub topic.</p>
  <p>I cannot see any error statement so I am not able to debug.</p>
  <p>Any Suggestion will be helpful</p>