WebIDE is an online integrated development environment (IDE) provided by Function Compute. It offers a cloud-based development experience similar to native VS Code. You can write, debug, and deploy code directly online without installing a complex local development environment. This topic describes WebIDE features, provides an overview, and explains how to configure WebIDE in the Function Compute console.
Limits
-
WebIDE currently supports only Python, Node.js, PHP, and custom runtimes. It does not support online editing for Java, Go, or C# runtimes. For these runtimes, you can only upload compiled ZIP files or binary files.
-
Each user receives 5 GB of storage space in WebIDE. Write operations will fail once this limit is exceeded. Clean up your space promptly.
-
Opening WebIDE for a function automatically starts an instance. This instance is equivalent to a container with 1 vCPU and 1.5 GB of memory.
-
The WebIDE instance uses the same runtime environment as your function. However, it cannot load your custom layers or mounted NAS or OSS resources, and it cannot access the VPC environment configured for your function. If you require these capabilities, deploy your code first and then invoke the function, or use Dedicated WebIDE.
-
Dedicated WebIDE is available only in the following regions: China (Hangzhou), China (Shanghai), China (Beijing), China (Zhangjiakou), China (Hohhot), China (Shenzhen), China (Hong Kong), Singapore, Japan (Tokyo), Germany (Frankfurt), and US (Virginia). To use Dedicated WebIDE in other regions, join the DingTalk user group (DingTalk group ID: 64970014484) and request access.
WebIDE interface overview
In full-screen mode, the WebIDE interface consists of four areas: Resource Manager, File Editor, Function Operations, and Command Line Terminal.
-
Resource Manager: View your code structure, including source files and dependencies.
-
File Editor: Edit your function code. After editing, click the
button in the top-right corner to debug your code. To ensure consistency between your local terminal and the production environment, click Deploy in the Function Operations area. -
Function Operations: Deploy and test your function code. After exiting full-screen mode, this area appears in the top-left corner of the WebIDE interface.
-
Command Line Terminal: Open the terminal by selecting from the toolbar at the top of the WebIDE. Use the terminal to debug code or install third-party dependencies.
Configure WebIDE in the console
Prerequisites
You have created a function. For more information, see Create a function.
Procedure
Log on to the Function Compute console. In the left-side navigation pane, click Functions.
In the top navigation bar, select a region. On the Functions page, click the function that you want to manage.
-
Optional: On the Code tab of the function details page, click Configure WebIDE in the top-right corner. In the Configure WebIDE panel, select a WebIDE type.
You can choose either Serverless WebIDE or Dedicated WebIDE.
-
Serverless Edition
This is the default version. It is free to use but does not support accessing resources within a VPC or mounting NAS or OSS.
-
Dedicated Edition
Choose Dedicated WebIDE if your instance needs to load custom layers, mount NAS or OSS, or access the VPC environment configured for your service. Set the following configuration items:
-
Instance type plan
-
Execution Timeout Period
If you select Dedicated WebIDE, Function Compute reuses or automatically creates a VPC, a vSwitch, and a General-purpose NAS file system based on the VPC setup in your function’s region. For pricing details about automatically created resources, see General-purpose NAS billing.
-
-
-
In the WebIDE interface, write, test, and install third-party dependencies for your function code as needed.
For details about WebIDE interface areas, see WebIDE interface overview.
If you select Dedicated WebIDE, ensure your function runs correctly. Otherwise, WebIDE may fail to start.
FAQ
What should I do if WebIDE fails to load?
What is Dedicated WebIDE?
Why does my function succeed in the terminal but fail when I click Test Function?
How do I quickly reset the WebIDE environment variables, runtime, and layers for a function?
How long does Serverless WebIDE retain my workspace?
Can I debug code in WebIDE?
When I modify a function, the Git plugin shows code differences. Does this mean WebIDE hosts my function code?
Two RAM users under the same Alibaba Cloud account open the same function but see different code. Why?
What should I do if the WebIDE terminal opens slowly or fails to open?
References
-
You can also use the WebIDE terminal to package third-party dependencies for your function. For more information, see Package third-party dependencies for a function using WebIDE.
-
If your function code or third-party dependency packages are large, extract dependencies into a layer or use an official public layer from Function Compute to reduce code size. For more information, see Create a custom layer.
-
You can also test functions locally using the local debugging feature in Serverless Devs. For more information, see Local debugging.