A program debugging method and program debugging device for a code-free development platform

By adding breakpoint statements to the program code of the codeless development platform and receiving debugging instructions on the browser and server side, statement-level debugging is implemented, and software debugging problems in the B/S architecture platform are solved and error detection is improved. and debug flexibility.

CN114968751BActive Publication Date: 2024-11-05CHINA UNITED NETWORK COMM GRP CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110206336.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-02-24
Publication Date
2024-11-05
Estimated Expiration
2041-02-24

AI Technical Summary

Technical Problem

When debugging software, the existing methods can only use the complete interface as the minimum testing unit, and cannot effectively detect errors in the software, affecting the normal operation of the software.

Method used

By adding breakpoint statements to the program code, statement-level debugging is realized, allowing users to receive debugging instructions on the browser and server side, perform breakpoint debugging, single-sentence debugging and execution until the end or stop debugging, overcoming the cross-platform debugging problem .

Benefits of technology

It realizes accurate positioning of error information, enhances the flexibility and accuracy of program debugging, and solves the problem of ineffective error detection in existing methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114968751B_ABST
    Figure CN114968751B_ABST
Patent Text Reader

Abstract

The present application proposes a program debugging method and a program debugging device for a codeless development platform. In the technical solution proposed in the present application, the browser side receives breakpoint indication information indicating the breakpoint position and the first debugging instruction indicating the debugging input by the user, and adds a breakpoint statement after the statement at the specified breakpoint position according to the breakpoint indication information to obtain the second program code; then sends the first debugging instruction and the second program code to the server side, so that the server side can debug the second program code including the breakpoint statement according to the first debugging instruction. This method can realize breakpoint debugging at any position of the program developed by the codeless development platform, thereby realizing statement-level debugging, and further, can realize accurate positioning of error information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of Internet technology, and in particular to a program debugging method and a program debugging device for a code-free development platform. Background Art

[0002] The codeless development platform based on the browser / server (B / S) architecture is a new software development method. Similar to software products developed based on traditional development platforms, software development based on the codeless development platform based on the B / S architecture also requires software debugging to ensure the normal operation of the developed software when it is put online.

[0003] At present, when debugging software on a codeless development capability platform based on a B / S architecture, debugging can only be completed using the complete interface provided by the codeless development capability platform as the minimum test unit. This debugging method cannot effectively detect errors in the software, thus affecting the normal operation of the software. Summary of the invention

[0004] The present application provides a program debugging method and a program debugging device for a codeless development platform, which can perform statement-level debugging on the program, thereby achieving accurate positioning of error codes.

[0005] In a first aspect, the present application provides a program debugging method for a codeless development platform, wherein the codeless development platform is a development platform based on a browser-side and server-side architecture, and the method is executed by the browser-side.

[0006] The method comprises: obtaining a first program code, wherein the first program comprises a plurality of statements; receiving breakpoint indication information input by a user, wherein the breakpoint indication information is used to indicate a breakpoint position when breakpoint debugging is performed on the first program code; adding a breakpoint statement after each statement in at least one statement in the first program code to obtain a second program code, wherein the at least one statement comprises a statement indicated by a breakpoint position; sending the second program code to a server end; receiving a first debugging instruction input by a user, wherein the first debugging instruction is used to instruct the server end to perform breakpoint debugging on the second program code; and sending the first debugging instruction to the server end.

[0007] The program debugging method provided in the embodiment of the present application adds a breakpoint statement after each statement in at least one statement in the first program code, and the at least one statement includes a statement that needs breakpoint debugging, so that when the program's breakpoint statement is reached, the program can be stopped and the debugging result can be obtained. Compared with the debugging method of the complete interface, the technical solution of the present application can locate the statements in the interface, thereby realizing statement-level debugging, so that the error information can be accurately located.

[0008] In addition, by sending the second debugging code and the first debugging instruction from the browser to the server, and sending the debugging result information from the server to the browser, the problem of cross-platform debugging between the browser and the server is overcome.

[0009] In combination with the first aspect, in a possible implementation, the at least one statement includes all statements in the first program code; the method also includes: receiving a second debugging instruction input by a user, the second debugging instruction is used to instruct the server side to perform single-sentence debugging on the second program code; and sending the second debugging instruction to the server side.

[0010] The program debugging method provided in the embodiment of the present application adds breakpoint statements after all statements in the first program code, so that the running of the program can be stopped after each statement is executed.

[0011] In combination with the first aspect or any possible implementation manner described above, the method further includes: receiving a third debugging instruction input by a user, wherein the third debugging instruction is used to instruct the server to execute the second program code to completion; and sending the third debugging instruction to the server.

[0012] The program debugging method provided in the embodiment of the present application controls the server side to debug the second program code through the third debugging instruction. After receiving the third debugging instruction, the server side will skip the breakpoint statement and run to the last statement regardless of whether the second program code includes a breakpoint statement, thereby increasing the flexibility of the program debugging process.

[0013] In combination with the first aspect or any one of the above possible implementations, the method further includes: receiving a fourth debugging instruction input by a user, wherein the fourth debugging instruction is used to instruct the server to stop executing the second program code; and sending the fourth debugging instruction to the server.

[0014] In a second aspect, the present application provides a program debugging method for a codeless development platform, wherein the codeless development platform is a development platform based on a browser-side and server-side architecture, and the method is executed by the server-side.

[0015] The method comprises: receiving a second program code sent by a browser, the second program code comprising a program code for adding a breakpoint statement after each statement in at least one statement in a first program code, the at least one statement comprising a statement indicated by a breakpoint position, and the first program comprising a plurality of statements; receiving a first debugging instruction sent by a browser, the first debugging instruction being used to instruct the server to perform breakpoint debugging on the second program code; and debugging the second program code according to the first debugging instruction.

[0016] In combination with the second aspect, in a possible implementation, the at least one statement includes all statements in the first program code; the method also includes: receiving a second debugging instruction sent by the browser, the second debugging instruction is used to instruct the server to perform single-sentence debugging on the second program code; and debugging the second program code according to the second debugging instruction.

[0017] In combination with the second aspect or any one of the above possible implementations, the method further includes: receiving a third debugging instruction sent by the browser, wherein the third debugging instruction is used to instruct the server to execute the second program code to completion; and debugging the second program code according to the third debugging instruction.

[0018] In combination with the second aspect or any one of the above possible implementations, the method further includes: receiving a fourth debugging instruction sent by the browser, wherein the fourth debugging instruction is used to instruct the server to stop executing the second program code; and debugging the second program code according to the fourth debugging instruction.

[0019] In a third aspect, the present application provides a program debugging device for a codeless development platform, wherein the codeless development platform is a development platform based on a browser-side and server-side architecture, and the debugging device is applied to the browser side, and the debugging device includes: an acquisition module, used to acquire a first program code and a first debugging instruction input by a user, wherein the first program includes multiple statements; a receiving module, used to receive breakpoint indication information and a first debugging instruction input by a user, wherein the breakpoint indication information is used to indicate a breakpoint position when breakpoint debugging is performed on the first program code, and the first debugging instruction is used to instruct the server side to perform breakpoint debugging on the second program code; a breakpoint processing module, used to add a breakpoint statement after each statement in at least one statement in the first program code to obtain a second program code, wherein the at least one statement includes a statement indicated by the breakpoint position; and a sending module, used to send the second program code and the first debugging instruction to the server side.

[0020] In combination with the third aspect, in a possible implementation, the receiving module is also used to: receive a second debugging instruction input by a user, wherein the second debugging instruction is used to instruct the server to perform single-sentence debugging on the second program code; and the sending module is also used to: send the second debugging instruction to the server.

[0021] In combination with the third aspect or any one of the above possible implementation methods, the receiving module is also used to: receive a third debugging instruction input by a user, and the third debugging instruction is used to instruct the server to execute the second program code to end; the sending module is also used to: send the third debugging instruction to the server.

[0022] In combination with the third aspect or any one of the above possible implementation methods, the receiving module is also used to: receive a fourth debugging instruction input by the user, and the fourth debugging instruction is used to instruct the server to stop executing the second program code; the sending module is also used to: send the fourth debugging instruction to the server.

[0023] In a fourth aspect, the present application provides a program debugging device for a codeless development platform, wherein the codeless development platform is a development platform based on a browser-side and server-side architecture, and the debugging device is applied to the server-side, and the debugging device includes: a receiving module, used to receive a second program code and a first debugging instruction sent by the browser side, the second program code includes a program code for adding a breakpoint statement after each statement in at least one statement in the first program code, the at least one statement includes a statement indicated by a breakpoint position, the first program includes multiple statements, and the first debugging instruction is used to instruct the server-side to perform breakpoint debugging on the second program code; a debugging module, used to debug the second program code according to the first debugging instruction.

[0024] In combination with the fourth aspect, in a possible implementation method, the at least one statement includes all statements in the first program code; the receiving module is also used to: receive a second debugging instruction sent by the browser, the second debugging instruction is used to instruct the server to perform single-sentence debugging on the second program code; accordingly, the debugging module is also used to: debug the second program code according to the second debugging instruction.

[0025] In combination with the fourth aspect or any one of the possible implementation methods mentioned above, the receiving module is also used to: receive a third debugging instruction sent by the browser side, and the third debugging instruction is used to instruct the server side to execute the second program code to completion; accordingly, the debugging module is also used to: debug the second program code according to the third debugging instruction.

[0026] In combination with the fourth aspect or any one of the above possible implementation methods, the receiving module is also used to: receive a fourth debugging instruction sent by the browser side, and the fourth debugging instruction is used to instruct the server side to stop executing the second program code; accordingly, the debugging module is also used to debug the second program code according to the fourth debugging instruction.

[0027] In a fifth aspect, the present application provides a chip comprising at least one processor and a communication interface, wherein the communication interface and the at least one processor are interconnected via a line, and the at least one processor is used to run a computer program or instruction to execute the program debugging method of the codeless development platform as described in the first aspect or the second aspect or any possible implementation method thereof.

[0028] In a sixth aspect, the present application provides a computer-readable medium storing a program code for execution by a device, wherein the program code includes a program debugging method for executing a codeless development platform as described in the first aspect or the second aspect or any possible implementation method thereof.

[0029] In a seventh aspect, the present application provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute a program debugging method for a codeless development platform as described in the first aspect or the second aspect or any possible implementation thereof.

[0030] In an eighth aspect, the present application provides a program debugging device for a codeless development platform, comprising a processor coupled to a memory, the memory being used to store program code, and the processor being used to execute the program code to implement the program debugging method for the codeless development platform as described in the first aspect or the second aspect or any possible implementation method therein.

[0031] Optionally, the device may further include the memory. Optionally, the device may further include a communication interface.

[0032] In a ninth aspect, the present application provides a computing device comprising a processor coupled to a memory, the memory being used to store program code, and the processor being used to execute the program code to implement a program debugging method for a codeless development platform as described in the first aspect or the second aspect or any possible implementation method therein.

[0033] Optionally, the computing device may further include the memory. Optionally, the apparatus may further include a communication interface.

[0034] In the tenth aspect, the present application provides a program debugging system for a codeless development platform, including a storage and a processor, the memory being used to store program code, and the processor being used to execute the program code to implement the program debugging method for the codeless development platform as described in the first aspect or the second aspect or any possible implementation method therein. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 A schematic diagram of a program debugging system of a codeless development platform provided in one embodiment of the present application;

[0036] Figure 2 A schematic flow chart of a program debugging method for a codeless development platform provided in one embodiment of the present application;

[0037] Figure 3 A schematic flow chart of generating a first debugging instruction provided in another embodiment of the present application;

[0038] Figure 4 A schematic diagram of the structure of a program debugging device for a code-free development platform provided in one embodiment of the present application;

[0039] Figure 5 A schematic diagram of the structure of a program debugging device for a code-free development platform provided in one embodiment of the present application;

[0040] Figure 6 A schematic diagram of the structure of a program debugging device for a code-free development platform provided in another embodiment of the present application. DETAILED DESCRIPTION

[0041] For the sake of understanding, the relevant terms involved in this application are first explained.

[0042] 1. B / S architecture

[0043] The browser / server (B / S) architecture is a variation or improvement of the client / server (C / S) architecture with the rise of Internet technology. In this architecture, the user interface is implemented through the browser, but the main transaction logic is implemented on the server. The B / S architecture is a network architecture model after the rise of the world wide web (Web). This model unifies the client and concentrates the core part of the system function implementation on the server, simplifying the development, maintenance and use of the system. As long as a browser is installed on the client, such as a web browser (Internet Explorer, IE), and a database such as Oracle or Structured Query Language Server (SQL) is installed on the server, the browser interacts with the database through the Web. This greatly simplifies the client computer load, reduces the cost and workload of system maintenance and upgrades, and reduces the overall cost of users.

[0044] Figure 1 A schematic diagram of a program debugging system of a codeless development platform provided in one embodiment of the present application. Figure 1 As shown, the debugging system 100 includes a browser 110 and a server 120. The browser 110 includes an instruction generator 111, a code processor 112, a communication processor 113 and a result display 114. The server 120 includes a communication processor 121, an instruction and code processor 122, a task scheduler 123 and a debugging executor 124. It is noted that the browser 110 can be any browser, such as IE browser or Google Chrome, and the server 120 can be a server that supports debugging function, which is not limited here.

[0045] for Figure 1 The debugging system shown is a code-free development platform. For users, unlike traditional code writing, they see logical statements one by one. Therefore, users can develop specific business systems by drawing programs on the functional interface included in the browser end 110 without writing specific codes. After the user draws the program, the program needs to be debugged. At this time, the instruction generator 111 receives the user's instructions to generate debugging instruction information, and the code processor 112 can convert the program it draws into a corresponding code program, so that the program can be debugged. Since it is a cross-browser and server-side debugging, the instruction information and the code program are sent to the communication processor 121 on the server side through the communication processor 113 of the browser side 110. When the communication processor 121 on the server side receives the information sent by the communication processor 113, it first analyzes the information sent through the instruction and code processor 122, so that the code to be debugged and the current directive or other parameter information can be obtained, and then the current debugging task is managed through the task scheduler 123 and the debugging work is performed through the debugging executor 124. When debugging is completed by the debugging executor 124, the debugging result information is returned to the communication processor 121, and the communication processor 121 returns the debugging result information to the communication processor 113 of the browser end 110. After receiving the debugging result information, the communication processor 113 sends it to the result display 114 of the browser end so that the user can view and analyze the debugging results.

[0046] at present, Figure 1 The debugging method shown is mainly to configure the hypertext markup language (HTML) code structure of the form items according to the actual situation of the project; specify the form initialization interface address or input the JSON format data source, JSON is the abbreviation of JavaScript Object Notation; in the data display area, the entire initialization data is displayed in JSON format; in the graphic display area, the final form items are presented; the form input items are submitted to the interface in JSON format according to the initially configured data format; according to the initially configured data format, the corresponding HTML code is generated and directly supplemented into the project code.

[0047] However, the existing debugging method can only complete debugging by using the complete interface provided by the codeless development capability platform as the minimum test unit. This debugging method cannot effectively detect errors in the software, making it impossible to accurately locate the error information. As an example, for an interface that includes 10 lines of statements, the existing debugging method can only debug the 10 statements as a whole, but cannot be refined to each statement in the interface. Therefore, after debugging is completed, if an error message is returned, it is impossible to determine which line of the 10 lines it is.

[0048] Figure 2 A schematic flow chart of a method for debugging a program on a codeless development platform provided in one embodiment of the present application. In this embodiment, the codeless development platform is a development platform based on a browser-side and server-side architecture. Figure 2 As shown, the method of this embodiment may include S201, S202, S203, S204, S205, S206 and S207. The debugging method may be Figure 1 The debugging system 100 shown is implemented.

[0049] S201. Obtain a first program code, where the first program code includes a plurality of statements.

[0050] It should be understood that the first code program in the embodiment of the present application can be a logic program composed of logical statements drawn by the user on the browser side of the codeless development platform, or it can be a program converted from a logic program composed of logical statements.

[0051] As an example, a user draws a total of 10 logic statements on the browser side of the codeless development platform to complete a certain function.

[0052] As another example, after the user draws a total of 10 logic statements on the browser side of the codeless development platform, the 10 logic statements are converted into corresponding specific codes through a code converter.

[0053] It should be understood that since it is a code-free development platform, for users, the programs they write are different from the specific codes in traditional programming. What they see are the logical statements used to generate specific codes.

[0054] S202: Receive breakpoint indication information input by a user, where the breakpoint indication information is used to indicate a breakpoint position when performing breakpoint debugging on a first program code.

[0055] It should be understood that errors often occur in programs to varying degrees. At this time, it is necessary to track the program and find the location of the error statement.

[0056] Breakpoint debugging is a very important means of debugging. Because many other codes need to be executed before executing certain codes, it is impossible to execute them one by one with single-step tracking. In this case, just set a breakpoint where you need to pause, and then let the program run. When the program reaches this breakpoint position, it will pause and return to the integrated debugger without user intervention, so as to further find the error.

[0057] In an achievable manner, the user can set breakpoint indication information for the first program code through the breakpoint manager. As an example, after the user draws the first code program of the application program on the browser side of the codeless development platform, the user clicks the logic unit with the mouse to indicate the breakpoint indication information. For example, if an odd number of clicks are made on a certain logic statement of the first code program, it means setting the line number where the logic statement is located as the breakpoint position, and if it is an even number of clicks, the breakpoint of the line where the logic statement is located can be removed.

[0058] S203: Add a breakpoint statement after each statement in at least one statement in the first program code to obtain a second program code, wherein the at least one statement includes a statement indicated by the breakpoint position.

[0059] For example, the first program code drawn by the user includes 10 lines of logic statements. After the user clicks odd times on the logic units of the 6th and 9th lines to determine the breakpoint position, a breakpoint statement is added after the logic units of the 6th and 9th lines. The breakpoint statement is used to indicate that when the program runs to the breakpoint position, the program stops and returns the debugging result information.

[0060] It should be understood that the second code program in this embodiment is the program code after the breakpoint statement is added, and is the program code that can be debugged.

[0061] As an example, when the first code program is a logic program composed of logic statements, a breakpoint statement is added after the logic statement with the breakpoint set, and then the logic program with the breakpoint statement is converted into the second code program by a code converter.

[0062] As another example, when the first code program has been converted into a specific code by a code converter, a breakpoint statement is added at a corresponding position of the specific code according to the breakpoint indication information.

[0063] S204: Receive a first debugging instruction input by a user, where the first debugging instruction is used to instruct the server to perform breakpoint debugging on the second program code.

[0064] In the embodiment of the present application, the first debugging instruction may include executing to the next breakpoint.

[0065] As an example, for a program including 10 lines of statements, after the breakpoint information is set at the 6th line, if the first debugging instruction is to execute to the next breakpoint, the program will stop after running the 6th line of code during debugging.

[0066] Optionally, after obtaining the first debugging instruction, if there is no debugging task currently, the instruction generator generates a task unique identifier for this debugging task, and adds the task unique identifier to the first debugging instruction.

[0067] Optionally, if the current debugging requires initialized operating parameters, the instruction generator obtains the initialization parameters set by the user and adds the initialization parameters to the first debugging instruction.

[0068] S205: Send the second program code and the first debugging instruction to the server side. Correspondingly, the server side receives the second program code and the first debugging instruction sent by the browser side.

[0069] It should be understood that since the browser side and the server side are cross-platform, the embodiment of the present application sends the second program code and the first debugging instruction to the server side, so that the server obtains the program that needs to be debugged and the control information on how to debug.

[0070] In one achievable manner, the second code program and the first debugging instruction may be sent to the server side through a communication processor on the browser side, thereby being used for debugging communication with the server side.

[0071] S206: The server debugs the second program code according to the first debugging instruction.

[0072] It should be understood that the first debugging instruction may include debugging control information, initialization parameters and a unique identifier of the debugging task. Therefore, when the server receives the first debugging instruction, it should first analyze the first debugging instruction to obtain the control information, initialization parameters and a unique identifier of the debugging task in the first debugging instruction.

[0073] As an example, after the server receives the second program code and debugging instructions, since a breakpoint statement has been added after the statement that requires breakpoint debugging in the second code, when the control information in the first debugging instruction is to execute to the next breakpoint, the server will debug the second program. When the breakpoint statement is executed, the current program will be stopped and the debugging result information will be returned to the browser, such as the initialization parameter changes of the current task, system parameter change information, return value and other information.

[0074] Optionally, after obtaining the unique identifier of the debugging task, the server can first use the task scheduler to search for the debugging task represented by the unique identifier in the task being debugged in the codeless development platform based on the unique identifier of the debugging task. If no valid debugging task is found and the control information is to execute to the next breakpoint, the task scheduler will create a debugging task based on the unique identifier of the debugging task, and then after creating the debugging task, perform breakpoint debugging on the second program code.

[0075] It should be noted that the specific process of debugging can be referred to the relevant technical description and is not limited here.

[0076] The program debugging method provided in the embodiment of the present application adds a breakpoint statement after each statement in at least one statement in the first program code, so that when the program reaches the breakpoint statement, the program can be stopped and the debugging result can be obtained. Compared with the debugging method of the complete interface, the debugging method can locate the statements in the interface, thereby realizing statement-level debugging, thereby completing the precise positioning of error information.

[0077] In addition, by sending the second debugging code and the first debugging instruction from the browser to the server, and sending the debugging result information from the server to the browser, the problem of cross-platform debugging between the browser and the server is overcome.

[0078] Optionally, after the above S206, the method may further include S207: sending the debugging result information of the server side to the browser side, so that the user can analyze the debugging result information on the browser side.

[0079] Figure 3 A schematic flow chart of generating a first debugging instruction provided by another embodiment of the present application. Figure 3 As shown, the method of the embodiment of the present application includes:

[0080] S301, determine whether the second code program to be debugged this time needs initialization parameters, if yes, execute S302, otherwise, execute S303.

[0081] It should be understood that some programs require initialization parameters to run, so before the user inputs the first debugging instruction, it is first determined whether the program requires initialization parameters to run.

[0082] S302: Set initialization operation parameters.

[0083] For example, if the program being debugged requires initialization parameters, the user can set the initialization parameters.

[0084] In one possible implementation, the user may set the initialization parameters through an interface on the browser side, for example, by clicking a set execution parameter button on the browser side to set the initialization parameters.

[0085] S303: Receive a first debugging instruction input by a user.

[0086] It should be understood that in order to debug a program, the server must be informed of instructions on how to debug, such as single-step execution, execution to the next breakpoint, running to the end, or stopping debugging.

[0087] In one achievable manner, the user may input the first debugging instruction through an instruction generator button on the browser side.

[0088] S304: Determine whether there is a running task. If yes, execute S306; otherwise, execute S305.

[0089] It should be understood that when debugging a program, there may be a program being debugged, so it is necessary to determine whether there is a task being run.

[0090] S305: Create a unique identifier for the debugging task.

[0091] For example, after the current user inputs the first debugging instruction, such as executing to the next breakpoint, if there is no debugging program currently being executed, the instruction generator creates a debugging task unique identifier for this debugging to identify this debugging.

[0092] S306: Add a debugging task unique identifier and initialization running parameters to the first debugging instruction.

[0093] It should be understood that when the server needs to execute the debugging function, it needs to know which program to debug and how to debug. Therefore, in the first debugging instruction sent to the server, in addition to the instruction information entered by the user, such as executing to the next breakpoint, it should also include the unique task identifier created by the instruction generator for this debugging. If the program operation requires initialization parameter information, the initialization operation parameter information should also be added to the first debugging instruction.

[0094] The program debugging method provided in the embodiment of the present application adds a debugging task unique identifier and initialization running parameters to a first debugging instruction, so that the server can debug the second program code according to the first debugging instruction.

[0095] As an optional embodiment, when at least one statement in S203 includes all statements in the first program code, the method further includes: the browser side receives a second debugging instruction input by the user, and the second debugging instruction is used to instruct the server side to perform single-sentence debugging on the second program code; sends the second debugging instruction to the server side; accordingly, the server side receives the second debugging instruction sent by the browser side; and debugs the second program code according to the second debugging instruction.

[0096] In this embodiment, when at least one statement includes a statement indicated by a breakpoint position, if at least one statement includes all statements in the first program code, then a breakpoint statement is added after each statement in at least one statement in the first program code, that is, a breakpoint statement is added after all statements in the first program code, and accordingly, a breakpoint statement is added after each statement in the second program code. At this time, the browser side can also receive a single-sentence debugging instruction input by the user, that is, a second debugging instruction. After the second code program with a breakpoint statement after each statement and the second debugging instruction are sent to the server side, the server side can debug the second program code according to the second debugging instruction.

[0097] As an example, the first program code obtained includes 10 statements. When at least one statement includes all the statements in the first program code, a breakpoint statement is added after each of the 10 statements. That is to say, the second program code includes a total of 20 statements. At this time, when debugging the second program code on the server side, if the server side receives a single-sentence debugging instruction, such as single-step execution, it can stop after each statement is executed according to the breakpoint statement behind it, and return the debugging information of the statement.

[0098] It should be understood that in this embodiment, the server side can also receive the first debugging instruction. At this time, when the server side performs debugging, it will end debugging after executing the first line of code starting with this debugging task, and return debugging result information.

[0099] The program debugging method provided in the embodiment of the present application adds breakpoint statements after all statements in the first program code, so that the running of the program can be stopped after each statement is executed.

[0100] As an optional embodiment, the method also includes: the browser side receives a third debugging instruction input by the user, and the third debugging instruction is used to instruct the server side to execute the second program code to the end; the third debugging instruction is sent to the server side; accordingly, the server side receives the third debugging instruction sent by the browser side; and according to the third debugging instruction, the second program code is debugged.

[0101] It should be understood that the user may want to choose which line to set the breakpoint statement by analyzing the execution results of the program after executing all the programs. Therefore, the embodiment of the present application instructs the server to execute the second program code to the end by setting a third debugging instruction.

[0102] It should also be understood that when the server receives a third debugging instruction, such as a run to end instruction, the server does not execute the breakpoint statement regardless of whether the second program code contains a breakpoint statement, and runs until the last statement of the second program code.

[0103] As an example, suppose that the first program code includes 10 statements, and in the second program code, there are breakpoint statements after the code statements in the 6th and 9th lines, and the breakpoint statements are used to indicate that when the program runs to the breakpoint position, the program stops and returns the debugging result information. However, if the instruction received by the server at this time is to run to the end, then when the server executes the second program code, it will skip the breakpoint statements after the 6th and 9th lines and execute until the end of the last line.

[0104] As another example, suppose that the first program code includes 10 statements, and in the second program code, all code statements include breakpoint statements, which are used to indicate that when the program runs to the breakpoint position, the program stops and returns debugging result information. However, if the instruction received by the server at this time is to run to the end, then when the server executes the second program code, all breakpoint statements will be skipped and the execution will be completed until the last line ends.

[0105] The program debugging method provided in the embodiment of the present application controls the server side to debug the second program code through the third debugging instruction. After receiving the third debugging instruction, the server side will skip the breakpoint statement and run to the last statement regardless of whether the second program code includes a breakpoint statement, thereby increasing the flexibility of the program debugging process.

[0106] Optionally, the method further includes: the browser side receives a fourth debugging instruction input by the user, the fourth debugging instruction being used to instruct the server side to stop executing the second program code; sending the fourth debugging instruction to the server side; correspondingly, the server side receives the fourth debugging instruction sent by the browser side; and debugging the second program code according to the fourth debugging instruction.

[0107] It should be understood that the user may want to stop the program being debugged. Therefore, the embodiment of the present application instructs the server to stop the program being debugged by setting the fourth debugging instruction.

[0108] As an example, when the server receives the second program code and the first debugging instruction, the server will stop at the first position of the second program code that includes a breakpoint statement. However, if the server has not yet executed the first breakpoint statement and receives the fourth debugging instruction, the server will stop debugging the second program code.

[0109] Optionally, after receiving the fourth debugging instruction, the server may stop debugging through the debugging executor and delete the debugging task through the task scheduler.

[0110] Figure 4 A schematic diagram of the structure of a program debugging device for a code-free development platform provided in one embodiment of the present application. Figure 4 The program debugging device shown can be used to execute each process and / or step corresponding to the browser side in any of the aforementioned embodiments.

[0111] like Figure 4 As shown, the program debugging device 400 of this embodiment includes: an acquisition module 401 , a receiving module 402 , a breakpoint processing module 403 , and a sending module 404 .

[0112] Among them, the acquisition module 401 is used to acquire a first program code and a first debugging instruction input by a user, wherein the first program includes multiple statements; the receiving module 402 is used to receive breakpoint indication information and a first debugging instruction input by a user, wherein the breakpoint indication information is used to indicate a breakpoint position when breakpoint debugging is performed on the first program code, and the first debugging instruction is used to instruct the server to perform breakpoint debugging on the second program code; the breakpoint processing module 403 is used to add a breakpoint statement after each statement in at least one statement in the first program code to obtain a second program code, wherein the at least one statement includes a statement indicated by the breakpoint position; and the sending module 404 is used to send the second program code and the first debugging instruction to the server.

[0113] As an example, the acquisition module 401 may be used to execute Figure 2 The step of obtaining the first program code in the program debugging method of the codeless development platform. For example, the first obtaining module is used to execute S201.

[0114] As an example, the breakpoint processing module 403 can be used to execute Figure 2 The step of adding breakpoint statements in the program debugging method of the codeless development platform. For example, the breakpoint processing module 403 is used to execute S203.

[0115] As an example, the sending module 404 can be used to perform Figure 2The step of sending the second program code and the first debugging instruction to the server in the program debugging method of the codeless development platform is as follows: For example, the sending module 404 is used to execute S205.

[0116] In one possible implementation, the at least one statement includes all statements in the first program code; the receiving module 402 is also used to: receive a second debugging instruction input by a user, and the second debugging instruction is used to instruct the server to perform single-sentence debugging on the second program code; accordingly, the sending module 404 is also used to: send the second debugging instruction to the server.

[0117] In a possible implementation, the receiving module 402 is further used to: receive a third debugging instruction input by a user, and the third debugging instruction is used to instruct the server to execute the second program code to completion; accordingly, the sending module 404 is further used to: send the third debugging instruction to the server.

[0118] In a possible implementation, the receiving module 402 is further used to: receive a fourth debugging instruction input by a user, and the fourth debugging instruction is used to instruct the server to stop executing the second program code; accordingly, the sending module 404 is further used to: send the fourth debugging instruction to the server.

[0119] Figure 5 A schematic diagram of the structure of a program debugging device for a code-free development platform provided in one embodiment of the present application. Figure 5 The program debugging device shown can be used to execute each process and / or step corresponding to the server side in any of the aforementioned embodiments.

[0120] like Figure 5 As shown, the program debugging device 500 of this embodiment includes: a receiving module 501 and a debugging module 502 .

[0121] Among them, the receiving module 501 is used to receive the second program code and the first debugging instruction sent by the browser end, the second program code includes a program code for adding a breakpoint statement after each statement in at least one statement in the first program code, the at least one statement includes a statement indicated by the breakpoint position, the first program includes multiple statements, and the first debugging instruction is used to instruct the server end to perform breakpoint debugging on the second program code. The debugging module 502 is used to debug the second program code according to the first debugging instruction.

[0122] As an example, the receiving module 501 may be used to execute Figure 2In the program debugging method of the codeless development platform, the server receives the second program code or the first debugging instruction. For example, the receiving module 501 is used to execute S205.

[0123] As an example, the debugging module 502 can be used to execute Figure 2 The step of debugging the second program code on the server side in the program debugging method of the codeless development platform is as follows: For example, the debugging module 502 is used to execute S206.

[0124] In a possible implementation, the at least one statement includes all statements in the first program code; the receiving module 501 is also used to: receive a second debugging instruction sent by the browser, and the second debugging instruction is used to instruct the server to perform single-sentence debugging on the second program code; accordingly, the debugging module 502 is also used to: debug the second program code according to the second debugging instruction.

[0125] In a possible implementation, the receiving module 501 is further used to: receive a third debugging instruction sent by the browser, and the third debugging instruction is used to instruct the server to execute the second program code to completion; accordingly, the debugging module 502 is further used to: debug the second program code according to the third debugging instruction.

[0126] In a possible implementation, the receiving module 501 is further used to: receive a fourth debugging instruction sent by the browser, and the fourth debugging instruction is used to instruct the server to stop executing the second program code; accordingly, the debugging module 502 is further used to: debug the second program code according to the fourth debugging instruction.

[0127] The present application also provides a program debugging system, which may include the above-mentioned Figure 4 The device shown (i.e., device 400) and / or the above Figure 5 The device shown (ie, device 500).

[0128] Figure 6 A schematic diagram of the structure of a program debugging device for a code-free development platform provided in another embodiment of the present application. Figure 6 The device shown can be used to execute the method described in any of the above embodiments.

[0129] like Figure 6 As shown, the device 600 of this embodiment includes: a memory 601, a processor 602, a communication interface 603 and a bus 604. The memory 601, the processor 602 and the communication interface 603 are connected to each other through the bus 604.

[0130] The memory 601 may be a read-only memory (ROM), a static storage device, a dynamic storage device or a random access memory (RAM). The memory 601 may store a program. When the program stored in the memory 601 is executed by the processor 602, the processor 602 is used to execute the program. Figure 2 The individual steps of the method are shown.

[0131] The processor 602 can adopt a general-purpose central processing unit (CPU), a microprocessor, an application specific integrated circuit (ASIC), or one or more integrated circuits to execute relevant programs to implement the methods in various embodiments of the present application.

[0132] The processor 602 may also be an integrated circuit chip with signal processing capability. In the implementation process, each step of the method of each embodiment of the present application may be completed by an integrated logic circuit of hardware in the processor 602 or an instruction in software form.

[0133] The processor 602 may also be a general purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component. The methods, steps, and logic block diagrams disclosed in the embodiments of the present application may be implemented or executed. The general purpose processor may be a microprocessor or the processor may be any conventional processor, etc.

[0134] The steps of the method disclosed in the embodiment of the present application can be directly embodied as being executed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium mature in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 601, and the processor 602 reads the information in the memory 601, and combines its hardware to complete the functions required to be executed by the units included in the device of the present application, for example, it can execute Figure 2 or Figure 3 The various steps / functions of the illustrated embodiment.

[0135] The communication interface 603 may use, but is not limited to, a transceiver or other transceiver device to implement communication between the apparatus 600 and other devices or a communication network.

[0136] The bus 604 may include a path for transmitting information between various components of the device 600 (eg, the memory 601 , the processor 602 , and the communication interface 603 ).

[0137] It should be understood that the device 600 shown in the embodiment of the present application may be an electronic device, or may also be a chip configured in the electronic device.

[0138] It should be understood that the processor in the embodiment of the present application may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0139] It should also be understood that the memory in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM).

[0140] The above embodiments can be implemented in whole or in part by software, hardware, firmware or any other combination. When implemented by software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that contains one or more available media sets. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state hard disk.

[0141] It should be understood that the term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. A and B can be singular or plural. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship, but it may also indicate an "and / or" relationship. Please refer to the context for specific understanding.

[0142] In this application, "at least one" means one or more, and "more than one" means two or more. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can be represented by: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.

[0143] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0144] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0145] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0146] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0147] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0148] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0149] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory, a random access memory, a magnetic disk, or an optical disk.

[0150] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A program debugging method for a codeless development platform, characterized in that: The codeless development platform is a development platform based on a browser-side and server-side architecture, and the method is executed by the browser-side, and the method includes: Obtaining a first program code, wherein the first program includes a plurality of statements; Receiving breakpoint indication information input by a user, the breakpoint indication information is used to indicate a breakpoint position when breakpoint debugging is performed on the first program code; wherein the breakpoint indication information is a click of a logic statement by the user; adding a breakpoint statement after each statement in at least one statement in the first program code to obtain a second program code, wherein the at least one statement includes the statement indicated by the breakpoint position; Sending the second program code to the server; receiving a first debugging instruction input by a user, wherein the first debugging instruction is used to instruct the server to perform breakpoint debugging on the second program code; A first debugging instruction is sent to the server.

2. The method according to claim 1, characterized in that The at least one statement includes all statements in the first program code; The method further comprises: receiving a second debugging instruction input by a user, wherein the second debugging instruction is used to instruct the server to perform single-sentence debugging on the second program code; A second debugging instruction is sent to the server.

3. The method according to claim 1 or 2, characterized in that: The method further comprises: receiving a third debugging instruction input by a user, wherein the third debugging instruction is used to instruct the server to execute the second program code to completion; A third debugging instruction is sent to the server.

4. The method according to claim 1 or 2, characterized in that: The method further comprises: receiving a fourth debugging instruction input by a user, wherein the fourth debugging instruction is used to instruct the server to stop executing the second program code; A fourth debugging instruction is sent to the server.

5. A program debugging method for a codeless development platform, characterized in that: The codeless development platform is a development platform based on a browser-side and server-side architecture, and the method is executed by the server-side, and the method includes: Receive a second program code sent by the browser, the second program code including a program code for adding a breakpoint statement after each statement in at least one statement in the first program code, the at least one statement including a statement indicated by a breakpoint position, the first program including a plurality of statements; wherein the indication information of the breakpoint position is a user's click on a logic statement; receiving a first debugging instruction sent by the browser end, wherein the first debugging instruction is used to instruct the server end to perform breakpoint debugging on the second program code; The second program code is debugged according to the first debugging instruction.

6. The method according to claim 5, characterized in that The at least one statement includes all statements in the first program code; The method further comprises: receiving a second debugging instruction sent by the browser, wherein the second debugging instruction is used to instruct the server to perform single-sentence debugging on the second program code; The second program code is debugged according to the second debugging instruction.

7. The method according to claim 5 or 6, characterized in that: The method further comprises: receiving a third debugging instruction sent by the browser, wherein the third debugging instruction is used to instruct the server to execute the second program code to completion; The second program code is debugged according to the third debugging instruction.

8. The method according to claim 5 or 6, characterized in that: The method further comprises: receiving a fourth debugging instruction sent by the browser, wherein the fourth debugging instruction is used to instruct the server to stop executing the second program code; The second program code is debugged according to the fourth debugging instruction.

9. A program debugging device for a codeless development platform, characterized in that: The codeless development platform is a development platform based on a browser-side and server-side architecture, and the debugging device is applied to the browser side. The debugging device includes: An acquisition module, used for acquiring a first program code and a first debugging instruction input by a user, wherein the first program includes a plurality of statements; a receiving module, configured to receive breakpoint indication information and a first debugging instruction input by a user, wherein the breakpoint indication information is used to indicate a breakpoint position when performing breakpoint debugging on the first program code, and the first debugging instruction is used to instruct the server to perform breakpoint debugging on the second program code; wherein the breakpoint indication information is a click of a user on a logic statement; a breakpoint processing module, configured to add a breakpoint statement after each statement in at least one statement in the first program code to obtain a second program code, wherein the at least one statement includes a statement indicated by the breakpoint position; The sending module is used to send the second program code and the first debugging instruction to the server.

10. A program debugging device for a codeless development platform, characterized in that: The codeless development platform is a development platform based on a browser-side and server-side architecture, and the debugging device is applied to the server side. The debugging device includes: The receiving module is used to receive a second program code and a first debugging instruction sent by a browser end, wherein the second program code includes a program code for adding a breakpoint statement after each statement in at least one statement in the first program code, the at least one statement includes a statement indicated by a breakpoint position, the first program includes a plurality of statements, and the first debugging instruction is used to instruct the server end to perform breakpoint debugging on the second program code; wherein the indication information of the breakpoint position is a user's click on a logic statement; A debugging module is used to debug the second program code according to the first debugging instruction.

11. A chip, characterized in that: The system comprises at least one processor and a communication interface, wherein the communication interface and the at least one processor are interconnected via a line, and the at least one processor is used to run a computer program or instruction to execute the method according to any one of claims 1 to 8.

12. A computer readable medium, characterized in that The computer-readable medium stores a program code for computer execution, the program code including instructions for executing the method according to any one of claims 1 to 8.

13. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method described in any one of claims 1 to 8 is implemented.