Skip to main content

Online Cloud Function Development

Cloud Development Platform provides the capability for online cloud function development without configuring a local development environment, enabling online development, debugging, and deployment of cloud functions.

Enter the Online Development Environment

By clicking the 'Online Development' button on the Cloud Function Service details page, you can enter the online development environment.

goto-develop-online

Cloud environment preparation may be required before entering the environment.

cloudstudio-init

Workspace Introduction

Upon entering the online development environment, you will arrive at a workspace similar to the following. The editor interface of this workspace environment is identical to VSCode, supporting functions such as code editing, debugging, and terminal.

The following figure describes the main content of the File Browser Area:

cs-workspace-intro

cloudrunfunctions Directory

The function code storage directory for Function Cloud Hostingiscloudrunfunctions. Right-click on this directory to perform operations such as CreateandSynchronize ListforFunction Cloud Hosting`.

cs-workspace-cloudrunfunctions

Synchronize List

Click the [Function Cloud Hosting] Synchronize List button to synchronize the cloud function list. After synchronization is complete, the synchronization status information will be displayed below.

cs-workspace-sync-cbrf

Create Cloud Function

Click the [Function Cloud Hosting] Create button to pop up a dialog box. Enter the cloud function name to create the cloud function.

cs-workspace-create-cbrf

cloudrunfunctions/{function_name} Directory

The function code storage directory for Function Cloud Hostingiscloudrunfunctions/{function_name}. Under this directory, you can perform operations such as DebugandDeploy`.

cs-workspace-cbrf-op

Debug Cloud Function

After writing the function code, click the [Function Cloud Hosting] Debug button to start debugging.

cs-workspace-debug-cbrf

If an error occurs when starting debugging, you can check the error cause through the console output and fix it.

After debugging is completed, you can proceed with the deployment of the cloud function.