Code debugging method based on low-code platform

By setting up listener modules and splitting debug threads on low-code platforms, precise debugging on low-code platforms is achieved, solving the problem of incompatibility with debugging tools and improving development efficiency and performance.

CN121636327APending Publication Date: 2026-03-10广州市玄瞳科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511594668.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-03
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

Existing debugging tools for low-code platforms are not compatible with their unique syntax, which greatly increases the difficulty of code debugging and reduces development efficiency.

Method used

By setting up a listener module on a low-code platform to listen for the clearing event of the debug flag, adding a blocking flag and replacing it with the corresponding blocking code in the low-code language, the debugging thread and the user operation thread are separated, enabling precise pausing and resource reclamation.

Benefits of technology

It improves the performance of the debugging process, solves thread safety issues, breaks through the debugging limitations of low-code platforms, and significantly improves development and testing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121636327A_ABST
    Figure CN121636327A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of code debugging, and discloses a code debugging method based on a low-code platform, according to the code debugging method based on the low-code platform, a monitor module is arranged, a debugging mark clearing event is monitored in real time, a thread is interrupted in time when debugging is stopped, resources are recycled, resource occupation is avoided, and the debugging efficiency is improved. The overall performance of the debugging process is improved; meanwhile, a code injection module is used for adding a blocking mark and replacing the blocking mark with a blocking code, so that the code can be accurately paused when running to a breakpoint line, and the limitation that a low-code platform cannot perform line-level debugging is broken through; the debugging thread and the user operation thread are split and managed by the debugging thread module and the debugging operation thread module respectively, decoupling of user operation and code execution is achieved, the thread safety problem in the debugging process is effectively solved, and meanwhile the code execution performance is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of code debugging technology, specifically a code debugging method based on a low-code platform. Background Technology

[0002] Low-code development is a development model distinct from traditional code development. Business and technical personnel, even those with no programming knowledge or only basic programming skills, can leverage low-code platforms to develop and implement required business functions, modules, and subsystems. This model lowers the technical barrier for enterprises, saves time in business implementation, reduces system investment costs, and increases the flexibility of business changes.

[0003] However, the language syntax used by low-code platforms is mostly based on extensions of common high-level languages ​​and has independent syntax rules, making it difficult for existing debugging tools to adapt and debug their code. When developing complex business logic involving code implementation, the debugging difficulty increases significantly, which in turn reduces development efficiency. This problem has become a pain point that urgently needs to be solved in the low-code development field. In view of this, we propose a code debugging method based on low-code platforms. Summary of the Invention

[0004] The purpose of this invention is to provide a code debugging method based on a low-code platform to solve the problems mentioned in the background art.

[0005] To achieve the above objectives, the present invention provides the following technical solution: a code debugging method based on a low-code platform, comprising the following steps:

[0006] S1. When starting debugging, control the low-code platform to generate a unique debugging identifier and set a listener to listen for the clearing event of this debugging identifier;

[0007] S2. Control the low-code platform to identify user-set breakpoint lines in the code, add different blocking markers according to the code block type, and then replace the blocking markers with the blocking code corresponding to the low-code language.

[0008] S3. The background service executes the code to be debugged based on the unique debug identifier. During the process, it calculates the values ​​of the variables to be observed and highlights the current line of code to be executed when a specific line of code is reached.

[0009] S4. Respond to user operations and execute corresponding debugging actions, including observing variables, continuing execution, step-by-step execution, step-in, step-out, stopping debugging, and restarting debugging.

[0010] S5. When the stop debugging operation is executed, the control low-code platform clears the debugging flags, the listener interrupts the debugging thread and reclaims related resources.

[0011] Optionally, when responding to user observation of variables, the low-code platform is controlled to recalculate all values ​​of the variables to be observed, display a table of variable names and corresponding values, and remain on the current line of code.

[0012] Optionally, when the user continues to perform the operation, the low-code platform is controlled to execute the code line by line until the next line of code with a breakpoint is encountered and then blocked.

[0013] Optionally, when responding to the user's step-by-step execution of the operation, the initial code execution call stack depth is first recorded as the target call stack depth, and then the code is executed line by line. When the number of code line call stack layers is consistent with the target call stack depth or when the breakpoint line is reached, the execution is blocked.

[0014] Optionally, when responding to a user's step-by-step operation, the low-code platform is controlled to execute the code line by line, and the execution is blocked and paused when the next line of code is reached.

[0015] Optionally, when responding to a user's step-out operation, the initial code execution call stack depth minus 1 is recorded as the target call stack depth, and then the code is executed line by line. When the number of call stack layers of a code line is consistent with the target call stack depth or when the breakpoint line is reached, the execution is blocked.

[0016] Optionally, when responding to a user's restart debugging operation, the debugging stop operation is executed first, and then a new debugging process is initiated.

[0017] Optionally, the method is based on a debugging device, which includes a listener module, a code injection module, a debugging thread module, and a debugging operation thread module.

[0018] The listener module is used to listen for the clearing event of the debug unique identifier, and interrupt the debugging thread and reclaim resources when the debug marker is cleared;

[0019] The code injection module is used to identify breakpoint lines of code, add blocking markers, and replace them with blocking code.

[0020] The debugging thread module is used to execute the code to be debugged according to the unique debugging identifier, calculate the value of the observed variable, and highlight the current line of code to be executed.

[0021] The debugging operation thread module is used to respond to user debugging operations and execute corresponding debugging actions.

[0022] Compared with existing technologies, the present invention provides a code debugging method based on a low-code platform, which has the following beneficial effects:

[0023] 1. This code debugging method based on a low-code platform uses a listener module to monitor debug flag clearing events in real time. When debugging stops, it interrupts the thread and reclaims resources in a timely manner to avoid resource occupation and improve the overall performance of the debugging process. At the same time, it uses a code injection module to add blocking flags and replace them with blocking code, so that the code can be precisely paused when it reaches the breakpoint line, breaking through the limitation of low-code platforms that cannot perform line-level debugging.

[0024] 2. This code debugging method based on a low-code platform separates the debugging thread and the user operation thread, which are managed by the debugging thread module and the debugging operation thread module respectively. This decouples user operation from code execution, effectively solves thread safety issues during debugging, and improves code execution performance. It also provides a general debugging technology solution that is not restricted by the special syntax of the low-code platform, solves the core pain point of debugging difficulties on the low-code platform, and significantly improves development and testing efficiency. Attached Figure Description

[0025] Figure 1 This is a schematic diagram of the debugging device of the present invention;

[0026] Figure 2 This is a flowchart of the debugging method of the present invention. Detailed Implementation

[0027] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0028] like Figures 1-2 As shown, the present invention provides a technical solution: a code debugging method based on a low-code platform, comprising the following steps:

[0029] S1. When starting debugging, control the low-code platform to generate a unique debugging identifier and set a listener to listen for the clearing event of this debugging identifier;

[0030] S2. Control the low-code platform to identify user-set breakpoint lines in the code, add different blocking markers according to the code block type, and then replace the blocking markers with the blocking code corresponding to the low-code language.

[0031] S3. The background service executes the code to be debugged based on the unique debug identifier. During the process, it calculates the values ​​of the variables to be observed and highlights the current line of code to be executed when a specific line of code is reached.

[0032] S4. Respond to user operations and execute corresponding debugging actions, including observing variables, continuing execution, stepping through, stepping in, stepping out, stopping debugging, and restarting debugging. When responding to user operations to observe variables, control the low-code platform to recalculate the values ​​of all variables to be observed, display a table of variable names and corresponding values, and remain on the current line of code.

[0033] When responding to a user's request to continue an operation, the low-code platform executes the code line by line until it encounters the next line of code with a breakpoint, at which point it blocks. When responding to a user's request to execute an operation step by step, the initial call stack depth is recorded as the target call stack depth. Then, the code is executed line by line, blocking when the call stack depth of a line of code matches the target call stack depth or when the breakpoint line is reached.

[0034] When responding to a user's step-in command, the low-code platform executes code line by line, blocking and pausing upon reaching the next line. When responding to a user's step-out command, the initial call stack depth is recorded minus 1 as the target call stack depth. Code is then executed line by line, blocking when the call stack depth matches the target depth or when a breakpoint line is reached. When responding to a user's restart debugging command, debugging is stopped first, and then a new debugging process is initiated.

[0035] S5. When the stop debugging operation is executed, the control low-code platform clears the debugging flags, the listener interrupts the debugging thread and reclaims related resources.

[0036] The above method is based on the use of a debugging device, which includes a listener module, a code injection module, a debugging thread module, and a debugging operation thread module;

[0037] The listener module is used to listen for the clearing event of the debug unique identifier, interrupt the debugging thread and reclaim resources when the debug flag is cleared;

[0038] The code injection module is used to identify breakpoint lines of code, add blocking markers, and replace them with blocking code;

[0039] The debug thread module is used to execute the code to be debugged based on the unique debug identifier, calculate the values ​​of observed variables, and highlight the current line of code to be executed;

[0040] The debug operation thread module is used to respond to user debug operations and execute corresponding debug actions.

[0041] The implementation involves deploying a listener module, a code injection module, a debug thread module, and a debug operation thread module on a low-code platform, ensuring normal communication between the modules and enabling data interaction and instruction transmission.

[0042] As one application of this embodiment:

[0043] During actual debugging, developers write business logic on the low-code platform and set breakpoints at key logic points. Clicking the "Start Debugging" button generates a unique debug identifier "DEBUG_20250101_001" on the platform, and simultaneously starts a listener to monitor for the clearing event of this identifier.

[0044] The code injection module scans the code and identifies breakpoint lines "Line50" and "Line120". Based on the type of the loop code block to which "Line50" belongs, it adds the "BLOCK_CYCLE" flag, and based on the type of the conditional code block to which "Line120" belongs, it adds the "BLOCK_CONDITION" flag. Then, it replaces the flags with low-code blocking code "WAIT_CYCLE" and "WAIT_CONDITION" respectively.

[0045] The debug thread module initiates code execution based on the identifier "DEBUG_20250101_001" and calculates the values ​​of variables "userCount" and "orderTotal". When execution reaches "Line 30", the platform highlights that line of code.

[0046] The developer clicks "Observe Variables", enters "userCount", and the platform recalculates the variable value to "150", displays it in a table format as "Variable Name: userCount, Value: 150", and stops at "Line 30".

[0047] Click "Continue Execution" to run the code line by line until "Line 50" triggers the "WAIT_CYCLE" blocking code, pausing execution. Developers can then choose to "Step Through" or "Step In" as needed. After debugging is complete, click "Stop Debugging." The platform will clear the "DEBUG_20250101_001" flag, the listener will interrupt the debugging thread, and memory, CPU, and other resources will be reclaimed.

[0048] To restart debugging, click the "Restart Debugging" button. The platform will first execute the stop debugging process, then regenerate a new debugging identifier "DEBUG_20250101_002", and repeat the above debugging steps.

[0049] The present invention has been described in detail above. However, modifications or improvements can be made to it, which will be obvious to those skilled in the art. Therefore, any modifications or improvements that do not depart from the spirit of the present invention are within the scope of protection of the present invention.

Claims

1. A code debugging method based on a low-code platform, characterized in that, The method comprises the following steps: S1, when starting debugging, the low-code platform generates a unique debugging identifier and sets a listener to monitor the clearing event of the debugging identifier; S2, the low-code platform identifies the breakpoint code line set by the user in the code, adds different blocking marks according to the code block type, and then replaces the blocking marks with the blocking code corresponding to the low-code language; S3, the background service executes the code to be debugged according to the unique debugging identifier, calculates the variable values to be observed during the execution, and highlights the current code line to be executed when executing to a specific code line; S4, in response to user operations, corresponding debugging actions are performed, including observing variables, continuing execution, step-by-step execution, single-step jump-in, single-step jump-out, stopping debugging, and restarting debugging; S5, when the stop debugging operation is performed, the low-code platform clears the debugging marks, the listener interrupts the debugging thread, and the related resources are recycled.

2. The method of claim 1, wherein, When the user observes variables, the low-code platform recalculates the values of all variables to be observed, displays a table of variable names and corresponding values, and remains on the current code line.

3. The method of claim 1, wherein, When the user continues to execute, the low-code platform executes the code line by line until it encounters the next breakpoint code line.

4. The method of claim 1, wherein, When the user performs step-by-step execution, the starting code execution call stack depth is recorded as the target call stack depth, and then the code is executed line by line. When the code line call stack depth is consistent with the target call stack depth or the breakpoint line is executed, the execution is blocked.

5. The method of claim 1, wherein, When the user performs single-step jump-in, the low-code platform executes the code line by line, and the execution is blocked when the next line of code is executed.

6. The method of claim 1, wherein, When the user performs single-step jump-out, the starting code execution call stack depth minus 1 is recorded as the target call stack depth, and then the code is executed line by line. When the code line call stack depth is consistent with the target call stack depth or the breakpoint line is executed, the execution is blocked.

7. The method of claim 1, wherein, When the user restarts the debugging operation, the stop debugging operation is performed first, and then a new debugging process is initiated.

8. The method of claim 1, wherein, The method is based on a debugging device, which comprises a listener module, a code injection module, a debugging thread module, and a debugging operation thread module; The listener module is used to monitor the clearing event of the unique debugging identifier, interrupt the debugging thread when the debugging marks are cleared, and recycle the resources; The code injection module is used to identify the breakpoint code line, add the blocking mark, and replace it with the blocking code; The debugging thread module is used to execute the code to be debugged according to the unique debugging identifier, calculate the observed variable values, and highlight the current code line to be executed; The debugging operation thread module is used to respond to user debugging operations and perform corresponding debugging actions.