Web Integrated Development Environment (WebIDE) is an online IDE that is provided by Alibaba Cloud Function Compute. WebIDE provides cloud development experience that is similar to that of Visual Studio Code (VS Code). You can directly write, debug, and deploy code online without the need to install a complex local development environment. This topic describes the features and user interface (UI) of WebIDE and how to configure WebIDE in the Function Compute console.
Usage limits
WebIDE supports only Python, Node.js, PHP, and custom runtimes. Online coding is not supported for Java, Go, and C# runtimes. You can upload compiled and packaged ZIP or binary files in these runtimes.
WebIDE provides each user with 5 GB of storage capacity. Data fails to be written if the capacity is used up. We recommend that you periodically clear your storage.
When you open WebIDE of a function, an instance (hereinafter referred to as the WebIDE-related instance) is automatically started. This WebIDE-related instance is approximately equivalent to a container instance with 1 vCPU and 1.5 GB of memory.
The environment of the WebIDE-related instance is the same as the runtime environment of your function. However, the instance cannot load custom layers or mounted File Storage NAS (NAS) and Object Storage Service (OSS) resources. Additionally, the WebIDE-related instance cannot access the virtual private cloud (VPC) configured for your function. If you want to use the preceding features, use dedicated WebIDE or invoke the function after you deploy code.
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). If you want to use dedicated WebIDE in other regions, join the DingTalk group (group ID: 64970014484) for technical support.
WebIDE UI
This topic describes WebIDE UI in full-screen mode. The WebIDE UI consists of the following areas: resource manager (1), file editor (2), operation bar (3), and CLI terminal (4). The following figure shows an example.
Resource manager: You can view code structure, including code files and dependencies.
② File editor: You can edit function code. After you edit code, you can click the
button in the upper-right corner to debug your code. If you want the online code to be the same as the code in the terminal, click Deploy in the operation bar. Operation bar: You can perform operations in this area to deploy code and test your function. After you click Exit Fullscreen, the operation bar is located in the upper-left corner above the WebIDE UI.
CLI terminal: In the WebIDE navigation bar, choose to launch a CLI terminal. You can debug your code and install third-party dependencies in the CLI terminal.
Configure WebIDE in the Function Compute console
Prerequisite
A function is created. For more information, see the "Create a function" section in Manage functions.
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 upper-right corner above the WebIDE UI. In the Configure WebIDE panel, select the type of WebIDE that you want to use.
You can select Serverless or Dedicated.
Serverless
The default version. It is free to use and does not support accessing resources in a VPC or mounting NAS or OSS resources.
Dedicated
If you want instances to load your custom layers and mounted NAS and OSS resources, or you want to access the configured VPCs, you can select Dedicated WebIDE and configure the following parameters:
Instance Specifications
Execution Timeout Period
If you use dedicated WebIDE, Function Compute can reuse or automatically create a VPC, a vSwitch, and a General-purpose NAS file system based on the VPC of the region where your function resides. For information about billing, see Billing of General-purpose NAS file systems.
On the WebIDE UI, you can perform operations, such as writing function code, installing third-party dependencies, and performing tests, based on your business requirements.
For more information about the WebIDE UI, see WebIDE UI.
If you use dedicated WebIDE, make sure that your function can run as expected. Otherwise, WebIDE may fail to be launched.
FAQ
What do I do if WebIDE throws an exception during loading?
What is dedicated WebIDE?
Why does my function fail to run after I click Test Function even though it runs as expected in the WebIDE terminal?
How do I reset the environment variables, runtime, and layers of WebIDE?
How long is data of serverless WebIDE retained?
Can I debug code in WebIDE?
When I modify function code, git displays code differences. Is this because function code is hosted by WebIDE?
Why is the code of a function is different when I log on to Function Compute as different RAM users of the same Alibaba Cloud account?
What do I do if the WebIDE terminal opens slowly or cannot be opened?
More information
You can also use the WebIDE terminal to package third-party dependencies of your function. For more information, see Use WebIDE to package third-party dependencies of a function.
If your function code or third-party dependencies that you want to install are large, you can put the dependencies into layers or use a public layer of Function Compute to reduce the size of your code package. For more information, see Create a custom layer.
You can also use the local debugging feature of Serverless Devs to test functions. For more information, see Local commands.
