After writing a function, you must debug the function to verify the correctness of code. Actually, when a Message Service (MNS) topic receives a message, the function is automatically triggered. This topic describes how to debug a function by simulating a trigger event in the Function Compute console.


  1. Log on to the Function Compute console.
  2. In the top navigation bar, select a region.
  3. In the left-side navigation pane, click Service/Function.
  4. Locate the target function in the target service and click the function name.
  5. In Code tab, click Event.
  6. Write events in the code editor as the event format. For more information, see Event format. Click OK.
  7. In Code tab, click Invoke.


You can see a success message in Code tab.result