Debugging method and device of low-code platform, storage medium and electronic equipment
By starting the low-code engine in the local environment and using the traffic forwarding component and target interface for breakpoint debugging, the problem of low debugging efficiency of modified code segments in the low-code platform is solved, and efficient and accurate debugging results are achieved.
Patent Information
- Application Number
- CN202511665464.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-13
- Publication Date
- 2026-02-10
AI Technical Summary
Debugging efficiency is low when modifying the original low-code segment in a low-code platform, and existing technologies lack effective solutions.
Start the low-code engine in the local environment, obtain request traffic data through the traffic forwarding component and perform breakpoint debugging operations, and debug in conjunction with the target interface to realize interface debugging and configurable switching of front-end traffic.
It improves the debugging accuracy and efficiency of modified code segments on low-code platforms, and enables efficient debugging in a local environment.
Smart Images

Figure CN121501638A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the computer field, in particular, to a debugging method and device of a low-code platform, a storage medium and an electronic device. BACKGROUND
[0002] When a developer needs to modify and debug those code segments originally generated or encapsulated by a low-code platform, due to the high encapsulation of the low-code platform and the limited debugging tools, such as relying on a log system for problem tracking, this often leads to a time-consuming and imprecise debugging process. Although logs can provide some information, when facing complex logic or second-opening code (i.e., code that provides new functions or optimizes the original low-code segment after modification), the feedback information is often insufficient to accurately locate the problem, affecting the developer's efficient debugging in the local environment.
[0003] In summary, there is a technical problem of low debugging efficiency in the prior art when debugging the modified original low-code segment in the low-code platform.
[0004] In view of the above problems, no effective solution has been proposed so far. SUMMARY
[0005] The embodiments of the present application provide a debugging method and device of a low-code platform, a storage medium and an electronic device to at least solve the technical problem of low debugging efficiency when debugging the modified original low-code segment in the low-code platform.
[0006] According to an aspect of an embodiment of the present application, a debugging method of a low-code platform is provided, comprising: starting a low-code engine in a local environment, wherein the low-code engine is used to call target code to provide low-code platform services, and the target code represents a modified original low-code segment; in the case that the target code is used to modify a front-end service, obtaining request traffic data through a traffic forwarding component, performing a breakpoint debugging operation based on the request traffic data, and obtaining a debugging result, wherein the request traffic data is used to indicate an interaction request obtained from the front-end page, and the traffic forwarding component is used to control the request traffic data to be forwarded from a test environment to the local environment; in the case that the target code modifies a back-end service, performing the breakpoint debugging operation using a target interface, and obtaining the debugging result, wherein the target interface is used to debug the target code in the local environment.
[0007] According to another aspect of the embodiments of the present application, a debugging device of a low-code platform is also provided, comprising: a starting module configured to start a low-code engine in a local environment, wherein the low-code engine is configured to call target code to provide low-code platform services, and the target code represents modified original low-code segments; a first debugging module configured to, in a case where the target code is used to modify front-end services, acquire request traffic data through a traffic forwarding component, perform a breakpoint debugging operation based on the request traffic data, and obtain a debugging result, wherein the request traffic data is used to indicate an interaction request acquired from the front-end page, and the traffic forwarding component is used to control the request traffic data to be forwarded from a test environment to the local environment; and a second debugging module configured to, in a case where the target code is used to modify back-end services, perform the breakpoint debugging operation using a target interface, and obtain the debugging result, wherein the target interface is used to debug the target code in the local environment.
[0008] In one example embodiment, the device is configured to start the low-code engine in the local environment by: encapsulating low-code engine capabilities into a target plug-in; and configuring the target plug-in in the local environment through a project build tool to start the low-code engine in the local environment.
[0009] In one example embodiment, the device is configured to, in a case where the target code is used to modify front-end services, acquire request traffic data through a traffic forwarding component, perform a breakpoint debugging operation based on the request traffic data, and obtain a debugging result, by: enabling the traffic forwarding component in the case where the target code is used to modify front-end services; determining the request traffic data according to the interaction request and performing a redirection operation on the request traffic data to forward the request traffic data from a test environment to the local environment in a case where the traffic forwarding component identifies the interaction request; and performing the breakpoint debugging operation based on the request traffic data to obtain the debugging result.
[0010] In one example embodiment, the device is configured to perform a breakpoint debugging operation based on the request traffic data and obtain a debugging result by: setting a breakpoint in the target code; triggering the breakpoint when a code execution state of the local environment indicates that the request traffic data arrives; switching the target code from an execution mode to a debugging mode to determine first debugging information, wherein the first debugging information includes at least one of a variable value, a code execution path, error information, runtime environment information, and call stack information; and generating the debugging result according to the first debugging information.
[0011] In an example embodiment, the apparatus is configured to perform the breakpoint debugging operation using the target interface to obtain the debugging result by: generating an interface calling command using a Swagger tool in the case of the target code refactoring backend service; determining the target interface based on the interface calling command and obtaining interface request data through the target interface; and performing the breakpoint debugging operation using the target interface to obtain the debugging result.
[0012] In an example embodiment, the apparatus is configured to perform the breakpoint debugging operation using the target interface to obtain the debugging result by: setting a breakpoint in the target code; triggering the breakpoint when the target code executes to a target position indicated by the interface request data; switching the target code from an execution mode to a debugging mode to determine second debugging information, wherein the second debugging information includes at least one of a variable value, a code execution path, error information, runtime environment information, and call stack information; and generating the debugging result according to the second debugging information.
[0013] According to another aspect of the embodiments of the present application, a computer readable storage medium is provided, and the computer readable storage medium stores a computer program. The computer program is configured to perform the debugging method of the low-code platform when executed.
[0014] According to another aspect of the embodiments of the present application, a computer program product or a computer program is provided, and the computer program product or the computer program includes computer instructions stored in a computer readable storage medium. A processor of a computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions to enable the computer device to perform the debugging method of the low-code platform.
[0015] According to another aspect of the embodiments of the present application, an electronic device is provided, and the electronic device includes a memory and a processor. The memory stores a computer program, and the processor is configured to perform the debugging method of the low-code platform by executing the computer program.
[0016] In the embodiment of the present application, the low-code engine is started in the local environment, wherein the low-code engine is used to call the target code to provide low-code platform services, and the target code represents the modified original low-code segment; in the case of using the target code to modify the front-end service, the request traffic data is obtained through the traffic forwarding component, the breakpoint debugging operation is performed based on the request traffic data, and the debugging result is obtained, wherein the request traffic data is used to indicate the interaction request obtained from the front-end page, and the traffic forwarding component is used to control the request traffic data to be forwarded from the test environment to the local environment; in the case of using the target code to modify the back-end service, the breakpoint debugging operation is performed using the target interface, and the debugging result is obtained, wherein the target interface is used to debug the target code in the local environment, and through the configuration switching of the interface debugging and the front-end traffic, the purpose of improving the code debugging accuracy and efficiency is achieved, thereby realizing the technical effect of efficiently debugging the low-code platform in the local environment, and further solving the technical problem of low debugging efficiency when debugging the modified original low-code segment in the low-code platform. BRIEF DESCRIPTION OF DRAWINGS
[0017] The drawings described herein are used to provide further understanding of the present application, and form a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application, and do not constitute an improper limitation on the present application. In the drawings:
[0018] Figure 1 is a schematic diagram of an application environment of an optional low-code platform debugging method according to an embodiment of the present application;
[0019] Figure 2 is a flowchart of an optional low-code platform debugging method according to an embodiment of the present application;
[0020] Figure 3 is a schematic diagram of an architecture of an optional low-code platform according to an embodiment of the present application;
[0021] Figure 4 is a processing flowchart of an optional low-code platform debugging method according to an embodiment of the present application;
[0022] Figure 5 is a structural schematic diagram of an optional low-code platform debugging device according to an embodiment of the present application;
[0023] Figure 6 is a structural schematic diagram of an optional electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0024] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0025] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0026] It should be noted that the collection, storage, use, processing, transmission, provision, and disclosure of financial data or user data involved in the technical solution of this application all comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0027] It should be noted that in the embodiments of this application, certain software, components, models and other existing solutions in the industry may be mentioned. These should be regarded as exemplary and are only intended to illustrate the feasibility of implementing the technical solution of this application. However, it does not mean that the applicant has used or necessarily used the solution.
[0028] The present application will be described below with reference to embodiments:
[0029] According to one aspect of the embodiments of this application, a debugging method for a low-code platform is provided.
[0030] Optionally, in this embodiment, the debugging method for the low-code platform described above can be applied to fields such as enterprise software development, internet application construction, financial system upgrades, and Internet of Things (IoT) solutions. Specifically, it can be used in areas such as... Figure 1 The debugging method of the low-code platform described above is applied in the hardware environment consisting of server 101 and terminal device 103.
[0031] Furthermore, combined Figure 1As shown, the debugging method of the low-code platform described above can be implemented by the terminal device 103 or the server 101 respectively, or by the terminal device 103 and the server 101 together. This application embodiment does not limit this.
[0032] It should be noted that the aforementioned server 101 is connected to the terminal device 103 via a network and can be used to provide services for the terminal device or the application 107 installed on the terminal device to implement the aforementioned low-code platform debugging method. A database 105 can also be set up on or independently of the server 101 to provide data storage services for implementing the aforementioned low-code platform debugging method. Specifically:
[0033] The aforementioned server 101 and terminal device 103 can be any node in a distributed system, such as a blockchain system. This blockchain system can be formed by connecting multiple nodes through network communication. The nodes can form any type of network, and any type of computing device, such as any electronic device, can become a node in this distributed system by joining the network formed between the nodes.
[0034] The aforementioned server 101 can be a single server, a server cluster consisting of multiple servers, or a cloud server.
[0035] The aforementioned networks may include, but are not limited to, wired networks and wireless networks. The wired networks include local area networks (LANs), metropolitan area networks (MANs), and wide area networks (WANs). The wireless networks include Bluetooth, Wi-Fi, and other networks that enable wireless communication.
[0036] The aforementioned terminal device 103 may be a terminal configured with an application, and may include, but is not limited to, at least one of the following: mobile phones (such as Android phones, iOS phones, etc.), laptops, tablets, handheld computers, MID (Mobile Internet Devices), PADs, desktop computers, smart TVs, smart voice interaction devices, smart home appliances, vehicle terminals, aircraft, virtual reality (VR) terminals, augmented reality (AR) terminals, mixed reality (MR) terminals, and other computer devices.
[0037] Alternatively, as an alternative implementation method,
[0038] S202, Start the low-code engine in the local environment. The low-code engine is used to call the target code to provide low-code platform services. The target code represents the modified original low-code segment.
[0039] Optionally, in the embodiments of this application, a low-code engine refers to a software module capable of parsing and executing low-code models, including but not limited to parsing drag-and-drop constructed models, executing secondary development code (i.e., the aforementioned target code), and managing the model lifecycle.
[0040] It should be noted that there are various ways to set up a local environment, such as using a virtual machine, a Docker container, or directly on the developer's local machine, depending on the developer's preferences and resource conditions. This application does not impose any restrictions on this. Furthermore, the target code can cover a variety of scenarios, including but not limited to adding new features, optimizing existing logic, and fixing known bugs, aiming to improve the performance and functionality of low-code applications.
[0041] S204. When the target code is used to modify the front-end service, the request traffic data is obtained through the traffic forwarding component. The breakpoint debugging operation is performed based on the request traffic data to obtain the debugging results. The request traffic data is used to indicate the interactive request obtained from the front-end page, and the traffic forwarding component is used to control the forwarding of the request traffic data from the test environment to the local environment.
[0042] Optionally, in the embodiments of this application, the traffic forwarding component can be implemented in various ways, including but not limited to using a proxy server, a network load balancer, or a specially designed microservice gateway.
[0043] For example, proxy servers are used for scenarios that require a high degree of customization and control; while network load balancers are used for large-scale distributed systems.
[0044] It should be noted that, regardless of the specific technology used, the core objective is to ensure that request traffic data can flow seamlessly and efficiently between the test environment and the local environment, and this application does not limit this.
[0045] In addition, the traffic forwarding component can quickly adjust forwarding rules, such as specifying a particular URL path, method type, or request header information as the basis for traffic switching.
[0046] Specifically, when performing breakpoint debugging, developers can set breakpoints in the target code and, in conjunction with the IDE's debugging tools, execute the target code step by step, observe the variable states, analyze the program flow, and eventually locate the specific code behavior problem.
[0047] S206. When modifying the backend service with target code, use the target interface to perform breakpoint debugging operations and obtain debugging results. The target interface is used to debug the target code in the local environment.
[0048] Optionally, in the embodiments of this application, the target interface refers to the interface defined in the localized microservice framework, including but not limited to RESTful API, RPC remote procedure call interface, etc. These interfaces allow developers to perform in-depth debugging of the application's backend logic in the local environment, thereby more accurately locating and fixing code problems.
[0049] It should be noted that breakpoint debugging is not limited to using the target interface. In some embodiments, breakpoints can also be set directly on lines of code using the IDE's built-in debugging function. When a request is received, execution will automatically pause, allowing for detailed step-by-step execution and variable state checks, thereby improving debugging efficiency and the accuracy of problem solving.
[0050] Furthermore, there is no single way to obtain debugging results. In addition to displaying them directly in the IDE's debugging console, they can also be collected through various means such as logging and performance analysis tools to meet the debugging needs and habits of different developers. This application does not limit this.
[0051] In one exemplary embodiment, taking the application scenario of modifying backend services as an example:
[0052] S1. A developer discovers a backend functionality anomaly in a low-code platform, requiring debugging and fixing. At this point, the developer has already written target code, which is custom code that further develops certain functions of the low-code platform, designed to enhance or modify the platform's native functionality.
[0053] In S2, developers start the low-code engine plugin module in their local environment. This module is packaged using Maven and can be recognized and referenced by the microservice framework. The engine plugin module is loaded into the developer's local development environment, ready to call the modified target code to provide low-code platform services.
[0054] In S3, to more accurately pinpoint the problem, the developers adjusted the configuration of the traffic forwarding module, forwarding request traffic from front-end pages (such as web applications) in the test environment to the back-end service in the local environment. The traffic forwarding module identifies the traffic of specific applications based on the configuration and redirects it to the local service, ensuring that the local environment can receive real request data.
[0055] In S4, the developer sets a breakpoint in the target code of the local service, preparing for step-by-step debugging. When the front-end page in the test environment initiates an interactive request, the request traffic data is forwarded to the developer's local environment through the traffic forwarding component, triggering the target code where the breakpoint is set.
[0056] S5: After a breakpoint is triggered, developers begin debugging the target code, tracing the code execution flow step by step, analyzing variable states, and locating the specific problematic code segment. During this process, developers can utilize the debugging features provided by development tools (such as IDEs), such as single-stepping, viewing variable values, and call stacks, to gain a deeper understanding of the code execution details.
[0057] S6: After the problem was located, the developers directly modified the target code in their local environment to fix the issue. After the modification was completed, the developers restarted the local service and performed breakpoint debugging again to verify whether the problem had been successfully resolved.
[0058] S7. After the problem is fixed and verified to be correct, the developers package the modified code and then redeploy it through the test environment to ensure that the modified code also runs normally in the test environment.
[0059] After the S8 test environment deployment and verification are successful, the developers will officially deploy the modified code to production, that is, update the backend service in the production environment to ensure that the fixed functions can stably serve end users.
[0060] This application's embodiments employ a method of starting a low-code engine in a local environment. The low-code engine calls target code to provide low-code platform services, where the target code represents the modified original low-code segment. When the target code is used to modify front-end services, request traffic data is obtained through a traffic forwarding component. Breakpoint debugging is then performed based on this request traffic data to obtain debugging results. The request traffic data indicates interactive requests obtained from the front-end page, and the traffic forwarding component controls the forwarding of request traffic data from the test environment to the local environment. When the target code modifies back-end services, breakpoint debugging is performed using the target interface to obtain debugging results. This method of debugging the target code in a local environment, through interface debugging and configurable switching of front-end traffic, improves the accuracy and efficiency of code debugging. This achieves the technical effect of efficient debugging of the low-code platform in a local environment, thus solving the technical problem of low debugging efficiency when debugging modified original low-code segments in a low-code platform.
[0061] As an optional approach, the above-mentioned method of launching the low-code engine in a local environment includes: encapsulating the low-code engine capabilities into a target plugin; configuring the target plugin in the local environment using a project build tool to launch the low-code engine in the local environment.
[0062] Optionally, in the embodiments of this application, the aforementioned target plugin refers to an engine plugin module, including but not limited to components introduced through Maven or other build tools, which enable the microservice framework in the local environment to parse low-code models and execute corresponding services.
[0063] It should be noted that the microservice framework in the local environment can be configured with target plugins, which are not limited to Maven, but can also be other project build tools such as Gradle, as long as the engine plugin can be imported and run. This application does not limit this.
[0064] For example, low-code engine capabilities can be encapsulated into target plugins. This involves modularizing the engine's core functionalities, allowing it to be introduced as a standalone plugin into any framework that supports plugin systems. Configuring the target plugin via the project build tool means adding a dependency on the engine plugin to the project configuration file in the local development environment. For instance, adding the corresponding plugin's repository path and version to the pom.xml file ensures that the local environment can recognize and load the plugin, thereby starting the low-code engine.
[0065] In an exemplary embodiment, taking the application scenario of the engine plugin module as an example:
[0066] S1. During the local development environment initialization phase, developers add the pre-packaged low-code engine plugin to the project configuration using project build tools, such as adding the engine plugin dependency in pom.xml via Maven.
[0067] S2, when the local service starts, the framework reads the configuration, loads and initializes the engine plugin, enabling the local service to parse and execute low-code models.
[0068] Through the embodiments of this application, by encapsulating the low-code engine capabilities into a target plugin and configuring the plugin in the local environment, the technical effect of enhancing the debugging capability of secondary development code in the local environment is achieved, thereby improving development efficiency and problem-solving speed.
[0069] As an optional approach, when the target code is used to modify the front-end service, the above-mentioned method involves obtaining request traffic data through a traffic forwarding component, performing breakpoint debugging based on the request traffic data, and obtaining debugging results. This includes: enabling the traffic forwarding component when the target code is used to modify the front-end service; determining the request traffic data based on the interaction request when the traffic forwarding component identifies the interaction request, performing a redirection operation on the request traffic data to forward the request traffic data from the test environment to the local environment; and performing the breakpoint debugging based on the request traffic data to obtain the debugging results.
[0070] As an optional approach, the above-mentioned breakpoint debugging operation based on the above-mentioned request traffic data to obtain debugging results includes: setting breakpoints in the above-mentioned target code; triggering the above-mentioned breakpoints when the code execution status of the above-mentioned local environment indicates that the above-mentioned request traffic data has arrived; switching the above-mentioned target code from execution mode to debug mode to determine first debugging information, wherein the above-mentioned first debugging information includes at least one of variable values, code execution path, error information, runtime environment information, and call stack information; and generating the above-mentioned debugging results based on the above-mentioned first debugging information.
[0071] Optionally, in this embodiment of the application, when the target code is used to modify the front-end service, the traffic forwarding component is enabled to enable front-end service debugging, ensuring that request traffic data can be accurately obtained and redirected to the local environment for in-depth analysis.
[0072] Optionally, in this embodiment, request traffic data refers to the data generated by the front-end service in the interactive request, including but not limited to user input, HTTP request headers, request body, URL parameters, etc. This data is crucial in the debugging process and can help developers understand the complete context of the request.
[0073] Optionally, in this embodiment of the application, the breakpoint debugging operation refers to setting a breakpoint at a specified location in the target code. When the requested traffic data reaches that location, the code execution is automatically paused and enters the debugging mode so that the developer can check the first debugging information in detail.
[0074] It should be noted that after setting a breakpoint, the breakpoint is triggered when the local environment's code execution status indicator arrives with the request traffic data. At this time, the code automatically switches to debug mode, and the developer can obtain the first debugging information, including but not limited to variable values, code execution path, error messages, runtime environment information, and call stack information. This information helps to quickly locate the problem.
[0075] For example, by setting breakpoints in the target code, when the traffic forwarding component recognizes an interactive request, it determines the request traffic data based on the request and performs a redirection operation to ensure that the request traffic data is accurately forwarded from the test environment to the local environment. When the request traffic data arrives in the local environment, the breakpoint is triggered, the target code enters debug mode, and the developer can obtain detailed debugging information, generate debugging results, and achieve a deep understanding of the code and rapid repair.
[0076] In one exemplary embodiment, taking the application scenario of using the target code for front-end service transformation as an example:
[0077] S1, start the local environment's front-end service and traffic forwarding component, and ensure that the traffic forwarding component can recognize the interaction requests of the front-end service;
[0078] S2, after the front-end service receives the interaction request, the traffic forwarding component determines the requested traffic data and performs a redirection operation to forward the data to the local environment;
[0079] S3, the target code is executed in the local environment, and the breakpoint is triggered when the request traffic data reaches the preset breakpoint;
[0080] S4, the target code enters debug mode, and the developer checks the first debugging information, including variable values, code execution path, etc., to analyze the problem;
[0081] S5 generates debugging results based on the first debugging information, completing the location and repair of the problem.
[0082] Through the embodiments of this application, a traffic forwarding component is used to obtain and redirect request traffic data to the local environment to perform breakpoint debugging operations. This achieves the technical effect of efficiently debugging the target code of the front-end service modification in the local environment, thereby improving development efficiency and problem-solving speed.
[0083] As an optional approach, the above-mentioned debugging operation using the target interface to obtain the above-mentioned debugging results, under the condition that the target code has been modified for the backend service, includes: using the Swagger tool to generate interface call commands; determining the target interface based on the interface call commands, and obtaining interface request data through the target interface; and using the target interface to perform the above-mentioned debugging operation to obtain the above-mentioned debugging results.
[0084] As an optional approach, the above-mentioned breakpoint debugging operation performed using the target interface to obtain the debugging result includes: setting breakpoints in the target code; triggering the breakpoints when the interface requests data indicating that the target code has been executed to the target location; switching the target code from execution mode to debug mode to determine second debugging information, wherein the second debugging information includes at least one of variable values, code execution path, error information, runtime environment information, and call stack information; and generating the debugging result based on the second debugging information.
[0085] Optionally, in this embodiment, target code modification refers to using specific technical means, such as encapsulating engine capabilities and integrating them as plugins into the microservice framework, so that the local environment can support secondary code debugging of the low-code platform. This includes, but is not limited to, using the Maven packaging engine service as a JAR package, which the microservice framework can reference through the POM file, thereby enabling the ability to parse and execute low-code model services in the local environment.
[0086] It should be noted that the specific implementation methods for switching traffic to local services can vary, such as dynamically adjusting the service address through configuration files or using a proxy server for request redirection. This application does not limit these methods, as long as the goal of accurately importing traffic from remote or production environments into the local debugging environment is achieved.
[0087] For example, the Swagger tool is used in a local environment to generate API call commands. Based on these commands, the target API is determined, and API request data is captured through the target API. When a request arrives and the target code executes to a pre-set breakpoint, the system automatically triggers the breakpoint, switching the target code from execution mode to debug mode. In this mode, developers can obtain detailed secondary debugging information, such as variable values, code execution paths, error messages, runtime environment information, and call stack information, thereby generating debugging results for problem analysis and repair.
[0088] In one exemplary embodiment, taking the application scenario of local debugging of low-code secondary development code as an example:
[0089] S1, the developer sets breakpoints at key locations in the target code in the local environment, ready to start debugging;
[0090] S2: Developers use the Swagger tool to generate the call commands for the target interface and configure traffic forwarding to the local service in the test environment;
[0091] S3 triggers the relevant function, causing the interface request data to flow to the local service and execute until the breakpoint is reached;
[0092] S4, the target code automatically enters debug mode, and the system automatically captures and displays the second debugging information;
[0093] S5, the developers analyze the problem based on the second debugging information and make code corrections;
[0094] S6 was corrected and redeployed to the test environment to verify the validity of the debugging results.
[0095] Through the embodiments of this application, by setting breakpoints in the local environment and using Swagger to generate interface call commands, the technical effect of efficiently and accurately debugging low-code platform secondary development code is achieved locally, which significantly improves development efficiency and speed of problem location.
[0096] In an exemplary embodiment, taking the platform debugging of a certain low-code platform as an example, its architecture is shown as follows: Figure 3 For example, including but not limited to:
[0097] The engine plugin module encapsulates engine capabilities, abstracting them into a plugin that can be imported into the microservice framework via the pom.xml file. It's responsible for parsing low-code model services and allows other layers within the framework to call them in source code mode. The engine itself is an independent service, primarily providing a unified interface that dynamically loads model services via reflection and executes corresponding methods based on request parameters, returning results. This engine plugin module can be packaged into a JAR file using Maven and pushed to a repository, allowing the microservice framework to reference it locally via the pom.xml file, enabling the framework to utilize the engine's capabilities to support low-code application service calls.
[0098] Traffic forwarding module: This module is responsible for forwarding requests from the application frontend to a custom service. Since the platform and engine are shared, the traffic forwarding module needs to be able to distinguish between traffic from different applications. Furthermore, for ease of debugging, traffic switching is configurable, allowing users to easily route traffic to the desired destination with simple configuration adjustments.
[0099] External calling module: Integrates Swagger debugger functionality. The framework has an embedded Swagger documentation tool that can generate API call commands through the Swagger interface, making it convenient for API debugging; real-world page-level debugging allows you to trace each line of code step by step during actual use.
[0100] For example, set up the application in the test environment, including front-end and back-end services, and ensure the application runs normally. Start the back-end service locally, ensuring the code is consistent with the application's back-end code. When an application problem is found, adjust the configuration to redirect front-end traffic to the locally started back-end service. Add breakpoints in the appropriate parts of the code; when the interface triggers, you can step through the code to debug, find, and fix the problem. After fixing the problem, repackage and deploy to the test environment. Once verified, release it to production.
[0101] Furthermore, with Figure 4 Taking the following processing flow as an example: Business personnel write secondary development code and start it locally, using the necessary external services in the test environment; if there is a front-end page, the traffic of the front-end page is switched to the local service through configuration; by clicking the relevant functions on the page, the request traffic is redirected to the local code (the target code mentioned above); the local code is debugged by adding breakpoints to fix any problems encountered; if a problem is found, the code is fixed on-site, restarted, and the above steps are repeated. For pure backend services without a page, the Swagger page is opened, the specific interface is found for debugging, and breakpoint debugging is implemented.
[0102] This application provides a local-launchable secondary code framework, completely changing the way existing low-code code is used. It allows for local startup and debugging of low-code secondary code, just like high-code code. It also provides Swagger and page-level debugging capabilities, greatly improving development efficiency.
[0103] It is understood that in the specific embodiments of this application, data such as user information are involved. When the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0104] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0105] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method.
[0106] Based on this understanding, the technical solution of this application, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as read-only memory (ROM) / random access memory (RAM), magnetic disk, optical disk), and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0107] According to another aspect of the embodiments of this application, a debugging apparatus for a low-code platform is also provided for implementing the debugging method of the low-code platform described above. This debugging apparatus for a low-code platform can be used to implement the debugging method of the low-code platform provided in the above embodiments, and details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that implements a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0108] Figure 5 This is a structural block diagram of an optional low-code platform debugging device according to an embodiment of this application, such as... Figure 5 As shown, the debugging apparatus for this low-code platform includes:
[0109] The startup module 502 is used to start the low-code engine in the local environment, wherein the low-code engine is used to call the target code to provide low-code platform services, and the target code represents the modified original low-code segment;
[0110] The first debugging module 504 is used to obtain request traffic data through a traffic forwarding component when the target code is used to modify the front-end service, and to perform breakpoint debugging operations based on the request traffic data to obtain debugging results. The request traffic data is used to indicate the interaction request obtained from the front-end page, and the traffic forwarding component is used to control the forwarding of the request traffic data from the test environment to the local environment.
[0111] The second debugging module 506 is used to perform the breakpoint debugging operation using the target interface when the target code modifies the backend service, and obtain the debugging result, wherein the target interface is used to debug the target code in the local environment.
[0112] In one exemplary embodiment, the apparatus is configured to launch a low-code engine in a local environment by: encapsulating the low-code engine capabilities into a target plugin; and configuring the target plugin in the local environment using a project build tool to launch the low-code engine in the local environment.
[0113] In an exemplary embodiment, the apparatus is configured to, when the target code is used to modify the front-end service, obtain request traffic data through a traffic forwarding component, perform breakpoint debugging operations based on the request traffic data, and obtain debugging results by: enabling the traffic forwarding component when the target code is used to modify the front-end service; determining the request traffic data based on the interaction request when the traffic forwarding component identifies the interaction request, performing a redirection operation on the request traffic data to forward the request traffic data from the test environment to the local environment; and performing the breakpoint debugging operation based on the request traffic data to obtain the debugging results.
[0114] In an exemplary embodiment, the apparatus is configured to perform breakpoint debugging operations based on the request traffic data in the following manner to obtain debugging results: setting breakpoints in the target code; triggering the breakpoints when the code execution state of the local environment indicates that the request traffic data has arrived; switching the target code from execution mode to debug mode to determine first debugging information, wherein the first debugging information includes at least one of variable values, code execution path, error information, runtime environment information, and call stack information; and generating the debugging results based on the first debugging information.
[0115] In an exemplary embodiment, the apparatus is configured to perform the breakpoint debugging operation using a target interface and obtain the debugging result when the target code modifies the backend service: when the target code modifies the backend service, using the Swagger tool to generate interface call commands; determining the target interface based on the interface call commands and obtaining interface request data through the target interface; and performing the breakpoint debugging operation using the target interface to obtain the debugging result.
[0116] In an exemplary embodiment, the apparatus is configured to perform the breakpoint debugging operation using the target interface in the following manner to obtain the debugging result: setting a breakpoint in the target code; triggering the breakpoint when the interface request data indicates that the target code has been executed to a target location; switching the target code from execution mode to debug mode to determine second debugging information, wherein the second debugging information includes at least one of variable values, code execution path, error information, runtime environment information, and call stack information; and generating the debugging result based on the second debugging information.
[0117] Regarding the apparatus in the above embodiments, the terms "module" or "unit" refer to a computer program or part of a computer program with a predetermined function, which works together with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit. The specific manner in which each module performs its operations has been described in detail in the embodiments relating to the method, and will not be elaborated upon here.
[0118] According to another aspect of the embodiments of this application, an electronic device is provided.
[0119] The electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. The processor is configured to perform the steps in any of the above method embodiments via the computer program. In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor. Specific examples in this embodiment can be found in the examples described in the above embodiments and exemplary implementations, and will not be repeated here.
[0120] According to one aspect of this application, a computer program product is also provided, which includes a computer program.
[0121] The computer program product includes a computer program / instructions containing program code for performing the methods shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via communication section 609, and / or installed from removable media 611. When the computer program is executed by central processing unit 601, it performs various functions provided in the embodiments of this application. The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0122] Figure 6 A schematic block diagram of a computer system architecture for implementing embodiments of the present application is shown. Figure 6 As shown, the computer system 600 includes a Central Processing Unit (CPU) 601, which performs various appropriate actions and processes based on programs stored in ROM 602 or loaded into RAM 603 from storage section 608. Random access memory 603 also stores various programs and data required for system operation. The CPU 601, ROM 602, and RAM 603 are interconnected via bus 604. Input / output (I / O) interface 605 is also connected to bus 604.
[0123] The following components are connected to I / O interface 605: an input section 606 including a keyboard, mouse, etc.; an output section 607 including a cathode ray tube (CRT), liquid crystal display (LCD), and speakers, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card, such as a local area network card or modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to I / O interface 605 as needed. A removable medium 611, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on drive 610 as needed so that computer programs read from it can be installed into storage section 608 as needed.
[0124] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0125] Specifically, according to embodiments of this application, the processes described in the various method flowcharts can be implemented as computer programs / instructions. For example, embodiments of this application include a computer program / instruction comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication component, and / or installed from a removable medium. When the computer program is executed by a central processing unit, it performs various functions defined in the system of this application. In such embodiments, the computer program / instruction can be downloaded and installed from a network via a communication component, and / or installed from a removable medium. When the computer program / instruction is executed by a central processing unit, it performs the aforementioned debugging methods for low-code platforms.
[0126] According to one aspect of this application, a computer-readable storage medium is also provided.
[0127] The processor of the aforementioned electronic device can read the computer instructions from a computer-readable storage medium, and the processor executes the computer instructions, causing the electronic device to perform the debugging methods for the low-code platform provided in the various optional implementations of the debugging aspects of the aforementioned low-code platform.
[0128] Optionally, in this embodiment, the computer-readable storage medium described above may be configured to store methods for performing the embodiments of this application.
[0129] Optionally, in this embodiment, those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing the hardware related to the terminal device. The program can be stored in a computer-readable storage medium, which may include: flash drive, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0130] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0131] If the integrated units in the above embodiments are implemented as software functional units and sold or used as independent products, they can be stored in the aforementioned computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause one or more electronic devices to execute all or part of the steps of the methods described in the various embodiments of this application.
[0132] In the several embodiments provided in this application, it should be understood that the disclosed application can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some interfaces; indirect couplings or communication connections between units or modules may be electrical or other forms.
[0133] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0134] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0135] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A debugging method for a low-code platform, characterized in that, include: Start the low-code engine in the local environment, wherein the low-code engine is used to call the target code to provide low-code platform services, and the target code represents the modified original low-code segment; When the target code is used to modify the front-end service, request traffic data is obtained through a traffic forwarding component, and breakpoint debugging is performed based on the request traffic data to obtain debugging results. The request traffic data is used to indicate the interaction request obtained from the front-end page, and the traffic forwarding component is used to control the forwarding of the request traffic data from the test environment to the local environment. When the target code modifies the backend service, the breakpoint debugging operation is performed using the target interface to obtain the debugging result, wherein the target interface is used to debug the target code in the local environment.
2. The method according to claim 1, characterized in that, The process of starting the low-code engine in the local environment includes: Encapsulate low-code engine capabilities into target plugins; Configure the target plugin in the local environment using the project build tool to launch the low-code engine in the local environment.
3. The method according to claim 1, characterized in that, When the target code is used to modify the front-end service, request traffic data is obtained through a traffic forwarding component, and breakpoint debugging is performed based on the request traffic data to obtain debugging results, including: When the target code is used to modify the front-end service, the traffic forwarding component is enabled; When the traffic forwarding component recognizes the interaction request, it determines the request traffic data based on the interaction request and performs a redirection operation on the request traffic data to forward the request traffic data from the test environment to the local environment; The breakpoint debugging operation is performed based on the requested traffic data to obtain the debugging result.
4. The method according to claim 3, characterized in that, The step of performing breakpoint debugging based on the request traffic data to obtain debugging results includes: Set breakpoints in the target code; The breakpoint is triggered when the code execution status in the local environment indicates that the request traffic data has arrived; The target code is switched from execution mode to debug mode to determine first debugging information, wherein the first debugging information includes at least one of variable values, code execution path, error information, runtime environment information, and call stack information; The debugging result is generated based on the first debugging information.
5. The method according to claim 1, characterized in that, When the target code is used to modify the backend service, the breakpoint debugging operation is performed using the target interface to obtain the debugging results, including: When modifying the backend service using the target code, use the Swagger tool to generate API call commands; The target interface is determined based on the interface call command, and interface request data is obtained through the target interface; The breakpoint debugging operation is performed using the target interface to obtain the debugging result.
6. The method according to claim 5, characterized in that, The step of using the target interface to perform the breakpoint debugging operation and obtaining the debugging result includes: Set breakpoints in the target code; The breakpoint is triggered when the interface request data indicates that the target code has been executed to the target location; The target code is switched from execution mode to debug mode to determine second debugging information, wherein the second debugging information includes at least one of variable values, code execution path, error information, runtime environment information, and call stack information; The debugging result is generated based on the second debugging information.
7. A debugging device for a low-code platform, characterized in that, include: A startup module is used to start a low-code engine in a local environment, wherein the low-code engine is used to call target code to provide low-code platform services, and the target code represents the modified original low-code segment; The first debugging module is used to obtain request traffic data through a traffic forwarding component when the target code is used to modify the front-end service, and to perform breakpoint debugging operations based on the request traffic data to obtain debugging results. The request traffic data is used to indicate the interaction request obtained from the front-end page, and the traffic forwarding component is used to control the forwarding of the request traffic data from the test environment to the local environment. The second debugging module is used to perform the breakpoint debugging operation using the target interface when the target code modifies the backend service, and obtain the debugging result, wherein the target interface is used to debug the target code in the local environment.
8. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the method according to any one of claims 1 to 6.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.
Citation Information
Cited By
Execution method and device for front-end and rear-end debugging nodes of low-code platform
CN121919095A
