CN116909877A - Application debugging method and device, computer equipment and storage medium - Google Patents

Application debugging method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN116909877A
CN116909877A CN202310666484.2A CN202310666484A CN116909877A CN 116909877 A CN116909877 A CN 116909877A CN 202310666484 A CN202310666484 A CN 202310666484A CN 116909877 A CN116909877 A CN 116909877A
Authority
CN
China
Prior art keywords
debugging
breakpoint
transaction code
transaction
user
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310666484.2A
Other languages
Chinese (zh)
Inventor
郑无寒
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Bank of China Ltd
Original Assignee
Bank of China Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Bank of China Ltd filed Critical Bank of China Ltd
Priority to CN202310666484.2A priority Critical patent/CN116909877A/en
Publication of CN116909877A publication Critical patent/CN116909877A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • G06F11/3636Software debugging by tracing the execution of the program

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application relates to an application debugging method, an application debugging device, computer equipment and a storage medium. The method comprises the following steps: setting a debugging breakpoint in a transaction step display area in a debugging page of an application according to an operation instruction input by a user, sending a debugging instruction to a background server when receiving a debugging command triggered by the user, indicating the background server to execute a first transaction code corresponding to the breakpoint position indicated by the debugging instruction, returning variable information corresponding to the first transaction code, and then receiving the variable information corresponding to the first transaction code. By adopting the method, when the execution condition of any step of the transaction code needs to be checked, the breakpoint is set in the transaction code corresponding to the step, and the variable information after the transaction code at the breakpoint is executed is acquired, so that a user can check the variable information of each step in the execution process of the transaction code in real time.

Description

Application debugging method and device, computer equipment and storage medium
Technical Field
The present application relates to the technical field of financial science and technology, and in particular, to an application debugging method, an application debugging device, a computer device, and a storage medium.
Background
The low-code platform is a new platform for researching and developing financial application software, and aims to realize the business function of financial data transaction by parameter configuration or less coding. In the running process of the low code platform, each low code component is a black box, and in the debugging stage of each component of the low code platform, the execution condition of each low code component needs to be checked in real time.
At present, in the debugging stage of the low-code platform, after the data transaction is completed based on the corresponding financial application, the low-code platform outputs a large-spread full-volume log of the whole transaction process so as to allow a researcher to check the execution condition of each low-code component in the low-code platform.
However, the above-described debugging method has a problem of low debugging efficiency.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a debugging method, apparatus, computer device, computer-readable storage medium, and computer program product for an application capable of improving debugging efficiency.
In a first aspect, the present application provides a method for debugging an application. The method comprises the following steps:
setting a debugging breakpoint in a transaction step display area in a debugging page of an application according to an operation instruction input by a user;
When a debugging command triggered by a user is received, a debugging command is sent to a background server, so that the background server is instructed to execute a first transaction code corresponding to a breakpoint position indicated by the debugging command, and variable information corresponding to the first transaction code is returned;
and receiving variable information corresponding to the first transaction code.
In one embodiment, the method further comprises:
and displaying variable information of the transaction step corresponding to the debugging breakpoint in a first information viewing area in the debugging page.
In one embodiment, the method further comprises:
receiving a context code of a transaction step corresponding to a debugging breakpoint returned by a background server according to a debugging instruction;
and displaying the context code of the transaction step corresponding to the debugging breakpoint in a second information viewing area in the debugging page.
In one embodiment, the method further comprises:
when a next command triggered by a user is received, a next command is sent to a background server to instruct the background server to execute a second transaction code corresponding to the next breakpoint position indicated by the next command, and variable information corresponding to the second transaction code is returned;
and receiving variable information corresponding to the second transaction code.
In one embodiment, the method further comprises:
and when receiving a stopping command triggered by a user, sending a stopping command to the background server to instruct the background server to stop executing the process of debugging codes, and storing the stopping position.
In one embodiment, on the basis of the foregoing embodiment, the foregoing method further includes:
and when receiving a user-triggered continuing command, sending a continuing command to the background server to instruct the background server to continue executing the debugging code flow from the stop position.
In a second aspect, the application further provides an application debugging method. The method comprises the following steps:
receiving a debugging instruction sent by a user side; the debugging instruction is generated by setting a debugging breakpoint in a transaction step display area in a debugging page of an application according to an operation instruction input by a user terminal;
extracting a breakpoint position of a debugging breakpoint from a debugging instruction, and executing a first transaction code corresponding to the breakpoint position to obtain variable information corresponding to the first transaction code;
and transmitting variable information corresponding to the first transaction code to the user side.
In a third aspect, the application further provides an application debugging device. The device comprises:
The display module is used for setting debugging breakpoints in a transaction step display area in the debugging page of the application according to the operation instruction input by the user;
the sending module is used for sending a debugging instruction to the background server when receiving a debugging command triggered by a user so as to instruct the background server to execute a first transaction code corresponding to the breakpoint position indicated by the debugging instruction and return variable information corresponding to the first transaction code;
and the receiving module is used for receiving the variable information corresponding to the first transaction code.
In a fourth aspect, the present application also provides a computer device. The computer device comprises a memory storing a computer program and a processor which when executing the computer program performs the steps of:
setting a debugging breakpoint in a transaction step display area in a debugging page of an application according to an operation instruction input by a user;
when a debugging command triggered by a user is received, a debugging command is sent to a background server, so that the background server is instructed to execute a first transaction code corresponding to a breakpoint position indicated by the debugging command, and variable information corresponding to the first transaction code is returned;
and receiving variable information corresponding to the first transaction code.
In a fifth aspect, the present application also provides a computer-readable storage medium. The computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of:
setting a debugging breakpoint in a transaction step display area in a debugging page of an application according to an operation instruction input by a user;
when a debugging command triggered by a user is received, a debugging command is sent to a background server, so that the background server is instructed to execute a first transaction code corresponding to a breakpoint position indicated by the debugging command, and variable information corresponding to the first transaction code is returned;
and receiving variable information corresponding to the first transaction code.
In a sixth aspect, the application also provides a computer program product. The computer program product comprises a computer program which, when executed by a processor, implements the steps of:
setting a debugging breakpoint in a transaction step display area in a debugging page of an application according to an operation instruction input by a user;
when a debugging command triggered by a user is received, a debugging command is sent to a background server, so that the background server is instructed to execute a first transaction code corresponding to a breakpoint position indicated by the debugging command, and variable information corresponding to the first transaction code is returned;
And receiving variable information corresponding to the first transaction code.
According to the debugging method, the device, the computer equipment and the storage medium of the application, according to the operation instruction input by the user, the debugging breakpoint is set in the transaction step display area in the debugging page of the application, and when the debugging command triggered by the user is received, the debugging instruction is sent to the background server to instruct the background server to execute the first transaction code corresponding to the breakpoint position indicated by the debugging instruction, variable information corresponding to the first transaction code is returned, and then the variable information corresponding to the first transaction code is received. The method can set the breakpoint in the transaction code based on the breakpoint setting instruction triggered by the user, re-execute the transaction code based on the debugging instruction triggered by the user, and acquire variable information corresponding to the transaction code of the transaction code at the breakpoint position, that is, the method can set the breakpoint in the transaction code corresponding to any step of the transaction code when the execution condition of the step needs to be checked, and acquire the variable information after the transaction code at the breakpoint is executed, so that the user can check the variable information of each step in the execution process of the transaction code in real time.
Drawings
FIG. 1 is an application environment diagram of a debugging method applied in one embodiment;
FIG. 2 is a flow diagram of a debugging method applied in one embodiment;
FIG. 3 is a schematic diagram of the cooperative work of the client, the background server and the websocket;
FIG. 4 is a schematic diagram of a user side (application) display interface;
FIG. 5 is a flow chart of a debugging method applied in another embodiment;
FIG. 6 is a flow chart of a debugging method applied in another embodiment;
FIG. 7 is a flow chart of a debugging method applied in another embodiment;
FIG. 8 is a flow chart of a debugging method applied in another embodiment;
FIG. 9 is a flow chart of a debugging method applied in another embodiment;
FIG. 10 is a flow diagram of a debugging method applied in one embodiment;
FIG. 11 is a schematic flow chart of a background server after receiving an instruction sent by a user terminal;
FIG. 12 is a block diagram of a debugging device applied in one embodiment;
FIG. 13 is a block diagram of a debugging device applied in one embodiment;
fig. 14 is an internal structural diagram of a computer device in one embodiment.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
The low-code platform is a new platform for researching and developing financial application software, and aims to realize the business function of financial data transaction by parameter configuration or less coding. In the running process of the low code platform, each low code component is a black box, and in the debugging stage of each component of the low code platform, the execution condition of each low code component needs to be checked in real time.
At present, in the debugging stage of the low-code platform, after the data transaction is completed based on the corresponding financial application, the low-code platform outputs a large-spread full-volume log of the whole transaction process so as to allow a researcher to check the execution condition of each low-code component in the low-code platform. However, the above-described debugging method has a problem of low debugging efficiency. The present solution aims to solve the above problems.
After the background technology of the application debugging method provided by the embodiment of the present application is described, an implementation environment related to the application debugging method provided by the embodiment of the present application will be briefly described below. The application debugging method provided by the embodiment of the application can be applied to an application environment shown in figure 1. As shown in fig. 1, the application environment may include a user terminal 101 and a background server 102, where the user terminal 101 communicates with the background server 102 through a websocket communication protocol, where the websocket communication protocol provides a long-chain service between the user terminal 101 and the background server 102, and is capable of performing disconnection reconnection, and push queues at the front end and the rear end are implemented by using a thread-safe container, and the front end and the rear end have independent threads to push information in the queues one by one, so that no command or log sending disorder phenomenon occurs. Optionally, the client 101 sends an instruction to the background server 102 through the websocket communication protocol, and the background server 102 executes a related program according to the instruction after receiving the instruction, and feeds back a program execution result to the client 101 through the websocket communication protocol. The client 101 may be a personal computer, a personal digital assistant, other terminal devices, such as a tablet computer, a mobile phone, etc., a cloud or a remote server, and the embodiment of the present application is not limited to a specific form of the intelligent robot. The background server 102 may be a single low code platform controlled server or a group of servers.
After the application scenario of the application debugging method provided by the embodiment of the present application is described, the application debugging method described by the present application is described in the following.
In one embodiment, as shown in fig. 2, a method for debugging an application is provided, and the method is applied to the user terminal 101 in fig. 1 for illustration, and includes the following steps:
s201, setting a debugging breakpoint in a transaction step display area in a debugging page of an application according to an operation instruction input by a user.
The operation instruction input by the user can be a debugging instruction, a stopping instruction, a continuing instruction and the like, wherein the debugging instruction is used for instructing the background server to execute the corresponding transaction code, the stopping instruction is used for instructing the background server to stop executing the current transaction code, and the continuing instruction is used for instructing the background server to continue executing the current transaction code. The left frame shown in fig. 3 is a user end, the right frame is a background server, the left frame relates to instruction queues such as breakpoint setting, debugging initiation, next step, stopping and continuing, the right frame relates to information queues such as breakpoint saving, restarting, transaction code execution, blocking waiting and continuing, and the like, it should be noted that the instruction queues such as breakpoint setting, debugging initiation, next step, stopping and continuing, and the like, related to the left frame, can be set in a special queue, and the instruction queues are sent to the background server through the user end loop in a specific execution process, so as to instruct the background server to execute corresponding operations continuously according to instructions indicated by the instruction queues, and return corresponding operation results to the user end through webscope communication protocol.
The application is the user terminal 101 described in the background art, as shown in fig. 4, the debug page of the application includes a transaction display area for displaying transaction steps, a first information viewing area for displaying transaction step variable information corresponding to a debug breakpoint, a second information viewing area for displaying context codes of the transaction steps corresponding to the debug breakpoint, a context code viewing area for displaying context of the transaction codes, and an instruction display area for debugging, next step, stopping and continuing instructions. The transaction step display area displays the step currently executed by the background server and the step executed next, for example, the step currently executed is "debug", and the step executed next is "pause".
In the embodiment of the present application, if a user needs to check whether a certain transaction code of the low code platform is wrong in the running process, a breakpoint setting instruction, a debugging instruction, a next instruction, a stop instruction, a continue instruction, etc. may be sequentially input at the user terminal 101, so as to check the running condition of the certain transaction code of the low code platform in the running process. In the embodiment of the application, a user can input an operation instruction for setting a breakpoint in a transaction step display area in a debugging interface of an application in a preset mode, and after receiving the operation instruction for setting the breakpoint by the user, the user terminal sets a debugging breakpoint in the transaction step display area in a debugging page of the application; optionally, the user may input an operation instruction for setting a breakpoint in a certain step of the transaction code by dragging the low-code component, and after receiving the operation instruction for setting the breakpoint by the user, the user terminal sets a debug breakpoint in a transaction step display area in a debug page of the application.
S202, when a debugging command triggered by a user is received, sending a debugging command to a background server to instruct the background server to execute a first transaction code corresponding to a breakpoint position indicated by the debugging command, and returning variable information corresponding to the first transaction code.
The debug instruction may be triggered by clicking a debug button on the user side by the user, or may be triggered by inputting "debug" on the user side interface by the user, where it is to be noted that the debug instruction includes relevant information of the debug breakpoint in the foregoing embodiment, for example, a breakpoint position, a breakpoint setting time, and the like.
In the embodiment of the application, after the user inputs the instruction for setting the debugging breakpoint, after the display area of the transaction step in the debugging page of the application is set with the debugging breakpoint, the user continues to trigger the debugging instruction, when the terminal receives the debugging instruction triggered by the user, the debugging instruction is sent to the background server, after receiving the debugging instruction, the background server re-instructs the whole transaction code, and when executing the transaction code to the breakpoint position, the execution result of the first transaction code corresponding to the breakpoint position, namely the variable information corresponding to the first transaction code, is returned to the user side.
S203, variable information corresponding to the first transaction code is received.
In the embodiment of the application, after the background server sends variable information corresponding to the first transaction code to the user side, the user side receives the variable information corresponding to the first transaction code, judges whether the transaction code at the breakpoint position is wrong according to the variable information corresponding to the first transaction code, adjusts the transaction code at the breakpoint position if the transaction code at the breakpoint position is wrong, replaces the transaction code at the breakpoint position with the transaction code at the breakpoint position after adjustment, and again performs transaction code debugging on the basis after adjustment until the transaction code at the breakpoint position is wrong.
According to the application debugging method provided by the embodiment of the application, according to the operation instruction input by the user, the debugging breakpoint is set in the transaction step display area in the application debugging page, and when the debugging instruction triggered by the user is received, the debugging instruction is sent to the background server to instruct the background server to execute the first transaction code corresponding to the breakpoint position indicated by the debugging instruction, variable information corresponding to the first transaction code is returned, and then the variable information corresponding to the first transaction code is received. According to the scheme, the breakpoint is set in the transaction code based on the breakpoint setting instruction triggered by the user, the transaction code is re-executed based on the debugging instruction triggered by the user, and variable information corresponding to the transaction code of the transaction code at the breakpoint position is obtained, namely, when the execution condition of any step of the transaction code needs to be checked, the breakpoint can be set in the transaction code corresponding to the step, and the variable information after the transaction code at the breakpoint is obtained, so that the user can check the variable information of each step in the execution process of the transaction code in real time.
On the basis of the embodiment shown in fig. 2, as shown in fig. 5, the method further includes:
s204, variable information of the transaction step corresponding to the debugging breakpoint is displayed in a first information viewing area in the debugging page.
The first information viewing area is an area for displaying variable information corresponding to the first transaction code in the debugging page of the application. It should be noted that, the transaction step display area displays the corresponding variable information obtained after the background server executes the transaction code of the breakpoint position.
In the embodiment of the present application, after the variable information of the first transaction code is received in step S203, the variable information of the transaction step corresponding to the debug breakpoint is displayed in the first information viewing area of the debug page, so that the user can conveniently view the variable information of the transaction step corresponding to the debug breakpoint, and determine whether the transaction code of the segment is wrong according to the variable information of the transaction step corresponding to the debug breakpoint, if the transaction code of the breakpoint is wrong, the transaction code of the breakpoint is adjusted, and the transaction code of the breakpoint is replaced with the transaction code of the breakpoint after adjustment, and transaction code debugging is performed again on the basis of adjustment until the transaction code of the breakpoint is wrong.
According to the variable information checking mode provided by the embodiment of the application, the variable information of the transaction step corresponding to the debugging breakpoint is displayed in the first information checking area in the debugging page, so that a user can check whether the transaction code is wrong in real time, and the transaction code is adjusted in time under the condition that the transaction code at the breakpoint position is wrong, and the debugging efficiency of the transaction code is greatly improved.
On the basis of the embodiment shown in fig. 2, as shown in fig. 6, the method further includes:
s205, receiving a context code of a transaction step corresponding to the debugging breakpoint returned by the background server according to the debugging instruction.
In the embodiment of the application, the user side sends the debugging instruction to the background server, and when the background server executes the first transaction code corresponding to the breakpoint position indicated by the debugging instruction and returns the variable information corresponding to the first transaction code to the user terminal, the context code of the transaction step corresponding to the debugging breakpoint is also returned to the user side, and the user side receives the context code of the transaction step corresponding to the debugging breakpoint returned by the background server according to the debugging instruction.
S206, displaying the context code of the transaction step corresponding to the debugging breakpoint in a second information viewing area in the debugging page.
The second information viewing area is an area of the applied debugging page, which displays context codes of transaction steps corresponding to the debugging breakpoints.
In the embodiment of the application, after the user side obtains the context code of the transaction step corresponding to the debugging breakpoint, the context code of the transaction step corresponding to the debugging breakpoint is displayed in the second information viewing area in the debugging page, variable information corresponding to the first transaction code returned by the background server is received, and under the condition that the variable information corresponding to the first transaction code is wrong, the context code of the transaction step corresponding to the debugging breakpoint is adjusted according to the obtained variable information corresponding to the first transaction code, so that the context code of the transaction step corresponding to the debugging breakpoint is adjusted, and transaction code debugging is performed again on the adjusted basis until the transaction code of the breakpoint position is correct.
According to the context code viewing mode provided by the embodiment of the application, the context of the transaction code is displayed in the second information viewing area in the debugging page, so that a user can adjust the context code of the transaction step corresponding to the debugging breakpoint according to the variable information corresponding to the acquired first transaction code, and the debugging efficiency of the transaction code is greatly improved.
On the basis of the embodiment shown in fig. 2, as shown in fig. 7, the method further includes:
and S207, when a next command triggered by a user is received, sending a next command to the background server to instruct the background server to execute a second transaction code corresponding to the next breakpoint position indicated by the next command, and returning variable information corresponding to the second transaction code.
In the embodiment of the application, after the first transaction code corresponding to the breakpoint position indicated by the debug instruction is received by the background server and variable information corresponding to the first transaction code is returned, a user triggers a next instruction at the user end, when the user receives the next instruction triggered by the user, the next instruction is sent to the background server, and after the background server receives the next instruction, the second transaction code corresponding to the next breakpoint position is executed according to the second transaction code corresponding to the next breakpoint position indicated by the next instruction, variable information corresponding to the second transaction code is obtained, and variable information corresponding to the second transaction code is returned to the user end.
S208, variable information corresponding to the second transaction code is received.
In the embodiment of the application, after the background server sends variable information corresponding to the second transaction code to the user side, the user side receives the variable information corresponding to the second transaction code, judges whether the transaction code of the next breakpoint position is wrong according to the variable information corresponding to the second transaction code, adjusts the transaction code of the next breakpoint position if the transaction code of the next breakpoint position is wrong, replaces the original transaction code of the next breakpoint position with the adjusted transaction code of the next breakpoint position, and debugs the transaction code again on the adjusted basis until the transaction code of the next breakpoint position is wrong.
According to the method for checking the variable information, based on the fact that a next instruction is sent to the background server, the transaction code of the next breakpoint after the breakpoint is executed, and the corresponding variable information after the transaction code of the next breakpoint is acquired, namely, when the execution condition of any step of the transaction code needs to be checked, the breakpoint can be set in the transaction code corresponding to the step, and the variable information after the transaction code at the breakpoint is executed is acquired, so that a user can check the variable information of each step in the execution process of the transaction code in real time, and compared with the existing method for checking the variable information of each step in the execution process of the code through a printing log, the method greatly improves the debugging efficiency of the transaction code.
On the basis of the embodiment shown in fig. 2, as shown in fig. 8, the method further includes:
s209, when a stop command triggered by a user is received, a stop command is sent to the background server to instruct the background server to stop executing the process of debugging codes, and the stop position is saved.
In the embodiment of the application, after the first transaction code corresponding to the breakpoint position indicated by the debug instruction is received by the background server and variable information corresponding to the first transaction code is returned, a user triggers a stop instruction at the user end, when the user receives the stop instruction triggered by the user, the stop instruction is sent to the background server, and after the background server receives the stop instruction, the process of executing the debug code is stopped according to the stop instruction indicated by the stop instruction, the transaction code is stopped at the position where the user triggers the stop instruction, and meanwhile, the execution code at the stop position and the variable information at the stop position are saved.
Further, on the basis of the embodiment shown in fig. 6, as shown in fig. 9, the method further includes:
and S210, when receiving the user-triggered continuing command, sending a continuing command to the background server to instruct the background server to start to continue executing the debugging code flow from the stopping position.
In the embodiment of the application, after the background server receives the stop instruction and stores the transaction code and the stop position of the stop position, when the user needs to continue executing the transaction code, the user triggers a continue instruction, when the user receives the continue instruction triggered by the user, the continue instruction is sent to the background server, and after the background server receives the continue instruction, the background server starts to execute the debugging code from the stop position according to the flow indicated by the continue instruction until the user inputs the next instruction at the user.
According to the method for continuously or stopping executing the transaction code according to the instruction, the background server can be controlled to stop executing or continue executing the transaction code at will based on the instruction for stopping or continuing to send the instruction to the background server, that is to say, the transaction code running on the background server can be flexibly controlled.
In one embodiment, as shown in fig. 10, a method for debugging an application is provided, and the method is applied to the background server 102 in fig. 1 for illustration, and includes the following steps:
S301, receiving a debugging instruction sent by a user side.
The debugging instruction is generated by setting a debugging breakpoint in a transaction step display area in a debugging page of an application according to an operation instruction input by a user end.
In the embodiment of the application, a user can input an operation instruction for setting a breakpoint in a transaction step display area in a debugging interface of an application in a preset mode, and after receiving the operation instruction for setting the breakpoint by the user, the user terminal sets a debugging breakpoint in the transaction step display area in a debugging page of the application; optionally, the user may input an operation instruction for setting a breakpoint in a certain step of the transaction code by dragging the low-code component, and after receiving the operation instruction for setting the breakpoint by the user, the user terminal sets a debug breakpoint in a transaction step display area in a debug page of the application. Further, after the user finishes inputting the instruction of setting the debugging breakpoint, and after the transaction step display area in the debugging page of the application sets the debugging breakpoint, the user continues to trigger the debugging instruction, and when the terminal receives the debugging instruction triggered by the user, the terminal sends the debugging instruction to the background server, and the background server receives the debugging instruction.
As shown in fig. 11, when the background server receives the debug instruction sent by the user terminal, the blocking section of the transaction code is determined according to the breakpoint position indicated by the debug instruction, for example, if the debug instruction indicates that the transaction step 1 is the breakpoint position, the background server sets the blocking section in the transaction code according to the debug instruction when executing the transaction step 1, and the meaning of setting the blocking section is that when the transaction code executes the transaction step 1, variable information after executing the transaction step 1 is returned, and when other instructions sent by the next user terminal are received, corresponding operations are continuously executed according to the other instructions. Further, after variable information corresponding to the transaction step is obtained on the blocking section, the background server combines the variable information corresponding to the transaction step and the context information of the transaction code into a message queue, and returns the message queue to the user side through a webcookie communication protocol.
S302, extracting the breakpoint position of the debugging breakpoint from the debugging instruction, and executing a first transaction code corresponding to the breakpoint position to obtain variable information corresponding to the first transaction code.
In the embodiment of the application, after receiving the debug instruction sent by the user terminal, the background server extracts the breakpoint position of the debug breakpoint from the debug instruction, executes the first transaction code corresponding to the breakpoint position according to the debug instruction, and obtains the variable information corresponding to the first transaction code after the execution of the first transaction code corresponding to the breakpoint position is completed.
S303, variable information corresponding to the first transaction code is sent to the user side.
In the embodiment of the application, after the background server obtains the variable information corresponding to the first transaction code, the variable information corresponding to the first transaction code is sent to the user side, so that the user side can judge whether the transaction code at the breakpoint position is wrong according to the variable information corresponding to the first transaction code, if yes, the transaction code at the breakpoint position is adjusted, the transaction code at the breakpoint position is replaced by the transaction code at the breakpoint position after adjustment, and transaction code debugging is performed again on the basis after adjustment until the transaction code at the breakpoint position is correct.
According to the debugging method of the application, the breakpoint is set in the transaction code based on the breakpoint setting instruction triggered by the user, the transaction code is re-executed based on the debugging instruction triggered by the user, and variable information corresponding to the transaction code of the transaction code at the breakpoint position is obtained, namely, the breakpoint can be set in the transaction code corresponding to any step of the transaction code when the execution condition of the step needs to be checked, and the variable information after the transaction code at the breakpoint is executed is obtained, so that the user can check the variable information of each step in the execution process of the transaction code in real time, and compared with the conventional method for checking the variable information of each step in the execution process of the code through a printing log, the debugging efficiency of the transaction code is greatly improved.
It should be understood that, although the steps in the flowcharts related to the embodiments described above are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides an application debugging device for realizing the application debugging method. The implementation of the solution provided by the device is similar to the implementation described in the above method, so the specific limitation in the embodiments of the debugging device for one or more applications provided below may refer to the limitation of the debugging method for an application hereinabove, and will not be described herein.
In one embodiment, as shown in fig. 12, there is provided a debugging device for an application, including: a display module 10, a transmitting module 11 and a first receiving module 12, wherein:
the display module 10 is used for setting a debugging breakpoint in a transaction step display area in a debugging page of the application according to an operation instruction input by a user;
the first sending module 11 is configured to send a debug instruction to the background server when receiving a debug command triggered by a user, so as to instruct the background server to execute a first transaction code corresponding to a breakpoint position indicated by the debug instruction, and return variable information corresponding to the first transaction code;
the first receiving module 12 is configured to receive variable information corresponding to the first transaction code.
In one embodiment, the apparatus further comprises: the first display module is used for displaying variable information of the transaction step corresponding to the debugging breakpoint in a first information viewing area in the debugging page.
In one embodiment, the apparatus further comprises: the second receiving module and the second display module, wherein:
the second receiving module is used for receiving the context code of the transaction step corresponding to the debugging breakpoint returned by the background server according to the debugging instruction;
And the second display module is used for displaying the context code of the transaction step corresponding to the debugging breakpoint in a second information viewing area in the debugging page.
In one embodiment, the apparatus further comprises: a second transmitting module and a third receiving module, wherein:
the second sending module is used for sending a next instruction to the background server when receiving a next instruction triggered by a user so as to instruct the background server to execute a second transaction code corresponding to the next breakpoint position indicated by the next instruction and return variable information corresponding to the second transaction code;
and the third receiving module is used for receiving the variable information corresponding to the second transaction code.
In one embodiment, the apparatus further comprises: and the third sending module is used for sending a stop instruction to the background server when receiving a stop command triggered by a user so as to instruct the background server to stop executing the process of debugging codes and save the stop position.
In one embodiment, on the basis of the third sending module, the apparatus further includes a fourth sending module, configured to send a continue instruction to the background server when receiving a continue command triggered by the user, so as to instruct the background server to continue executing the process of debugging the code from the stop position.
In one embodiment, as shown in fig. 13, there is provided a debugging device for an application, including: a receiving module 20, an executing module 21 and a transmitting module 22, wherein:
the receiving module 20 is configured to receive a debug instruction sent by a user terminal; the debugging instruction is generated by setting a debugging breakpoint in a transaction step display area in a debugging page of an application according to an operation instruction input by a user terminal;
the execution module 21 is configured to extract a breakpoint position of a debug breakpoint from the debug instruction, and execute a first transaction code corresponding to the breakpoint position, so as to obtain variable information corresponding to the first transaction code;
and the sending module 22 is configured to send variable information corresponding to the first transaction code to the user side.
The respective modules in the debugging device of the above application may be implemented in whole or in part by software, hardware, and a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a server, and the internal structure of which may be as shown in fig. 14. The computer device includes a processor, a memory, an Input/Output interface (I/O) and a communication interface. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface is connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is used to store variable data of the transaction code. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for communicating with an external terminal through a network connection. The computer program, when executed by a processor, implements a method of debugging an application.
It will be appreciated by those skilled in the art that the structure shown in fig. 14 is merely a block diagram of a portion of the structure associated with the present inventive arrangements and is not limiting of the computer device to which the present inventive arrangements are applied, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided comprising a memory and a processor, the memory having stored therein a computer program, the processor when executing the computer program performing the steps of:
setting a debugging breakpoint in a transaction step display area in a debugging page of an application according to an operation instruction input by a user;
when a debugging command triggered by a user is received, a debugging command is sent to a background server, so that the background server is instructed to execute a first transaction code corresponding to a breakpoint position indicated by the debugging command, and variable information corresponding to the first transaction code is returned;
and receiving variable information corresponding to the first transaction code.
In one embodiment, the processor when executing the computer program further performs the steps of:
and displaying variable information of the transaction step corresponding to the debugging breakpoint in a first information viewing area in the debugging page.
In one embodiment, the processor when executing the computer program further performs the steps of:
receiving a context code of a transaction step corresponding to a debugging breakpoint returned by a background server according to a debugging instruction;
and displaying the context code of the transaction step corresponding to the debugging breakpoint in a second information viewing area in the debugging page.
In one embodiment, the processor when executing the computer program further performs the steps of:
when a next command triggered by a user is received, a next command is sent to a background server to instruct the background server to execute a second transaction code corresponding to the next breakpoint position indicated by the next command, and variable information corresponding to the second transaction code is returned;
and receiving variable information corresponding to the second transaction code.
In one embodiment, the processor when executing the computer program further performs the steps of:
and when receiving a stopping command triggered by a user, sending a stopping command to the background server to instruct the background server to stop executing the process of debugging codes, and storing the stopping position.
In one embodiment, the processor when executing the computer program further performs the steps of:
and when receiving a user-triggered continuing command, sending a continuing command to the background server to instruct the background server to continue executing the debugging code flow from the stop position.
In one embodiment, the processor when executing the computer program further performs the steps of:
receiving a debugging instruction sent by a user side; the debugging instruction is generated by setting a debugging breakpoint in a transaction step display area in a debugging page of an application according to an operation instruction input by a user terminal;
extracting a breakpoint position of a debugging breakpoint from a debugging instruction, and executing a first transaction code corresponding to the breakpoint position to obtain variable information corresponding to the first transaction code;
and transmitting variable information corresponding to the first transaction code to the user side.
In one embodiment, a computer readable storage medium is provided having a computer program stored thereon, which when executed by a processor, performs the steps of:
setting a debugging breakpoint in a transaction step display area in a debugging page of an application according to an operation instruction input by a user;
when a debugging command triggered by a user is received, a debugging command is sent to a background server, so that the background server is instructed to execute a first transaction code corresponding to a breakpoint position indicated by the debugging command, and variable information corresponding to the first transaction code is returned;
and receiving variable information corresponding to the first transaction code.
In one embodiment, the computer program when executed by the processor further performs the steps of:
and displaying variable information of the transaction step corresponding to the debugging breakpoint in a first information viewing area in the debugging page.
In one embodiment, the computer program when executed by the processor further performs the steps of:
receiving a context code of a transaction step corresponding to a debugging breakpoint returned by a background server according to a debugging instruction;
and displaying the context code of the transaction step corresponding to the debugging breakpoint in a second information viewing area in the debugging page.
In one embodiment, the computer program when executed by the processor further performs the steps of:
when a next command triggered by a user is received, a next command is sent to a background server to instruct the background server to execute a second transaction code corresponding to the next breakpoint position indicated by the next command, and variable information corresponding to the second transaction code is returned;
and receiving variable information corresponding to the second transaction code.
In one embodiment, the computer program when executed by the processor further performs the steps of:
and when receiving a stopping command triggered by a user, sending a stopping command to the background server to instruct the background server to stop executing the process of debugging codes, and storing the stopping position.
In one embodiment, the computer program when executed by the processor further performs the steps of:
and when receiving a user-triggered continuing command, sending a continuing command to the background server to instruct the background server to continue executing the debugging code flow from the stop position.
In one embodiment, the computer program when executed by the processor further performs the steps of:
receiving a debugging instruction sent by a user side; the debugging instruction is generated by setting a debugging breakpoint in a transaction step display area in a debugging page of an application according to an operation instruction input by a user terminal;
extracting a breakpoint position of a debugging breakpoint from a debugging instruction, and executing a first transaction code corresponding to the breakpoint position to obtain variable information corresponding to the first transaction code;
and transmitting variable information corresponding to the first transaction code to the user side.
In one embodiment, a computer program product is provided comprising a computer program which, when executed by a processor, performs the steps of:
setting a debugging breakpoint in a transaction step display area in a debugging page of an application according to an operation instruction input by a user;
when a debugging command triggered by a user is received, a debugging command is sent to a background server, so that the background server is instructed to execute a first transaction code corresponding to a breakpoint position indicated by the debugging command, and variable information corresponding to the first transaction code is returned;
And receiving variable information corresponding to the first transaction code.
In one embodiment, the computer program when executed by the processor further performs the steps of:
and displaying variable information of the transaction step corresponding to the debugging breakpoint in a first information viewing area in the debugging page.
In one embodiment, the computer program when executed by the processor further performs the steps of:
receiving a context code of a transaction step corresponding to a debugging breakpoint returned by a background server according to a debugging instruction;
and displaying the context code of the transaction step corresponding to the debugging breakpoint in a second information viewing area in the debugging page.
In one embodiment, the computer program when executed by the processor further performs the steps of:
when a next command triggered by a user is received, a next command is sent to a background server to instruct the background server to execute a second transaction code corresponding to the next breakpoint position indicated by the next command, and variable information corresponding to the second transaction code is returned;
and receiving variable information corresponding to the second transaction code.
In one embodiment, the computer program when executed by the processor further performs the steps of:
and when receiving a stopping command triggered by a user, sending a stopping command to the background server to instruct the background server to stop executing the process of debugging codes, and storing the stopping position.
In one embodiment, the computer program when executed by the processor further performs the steps of:
and when receiving a user-triggered continuing command, sending a continuing command to the background server to instruct the background server to continue executing the debugging code flow from the stop position.
In one embodiment, the computer program when executed by the processor further performs the steps of:
receiving a debugging instruction sent by a user side; the debugging instruction is generated by setting a debugging breakpoint in a transaction step display area in a debugging page of an application according to an operation instruction input by a user terminal;
extracting a breakpoint position of a debugging breakpoint from a debugging instruction, and executing a first transaction code corresponding to the breakpoint position to obtain variable information corresponding to the first transaction code;
and transmitting variable information corresponding to the first transaction code to the user side.
It should be noted that, the user information (including but not limited to user equipment information, user personal information, etc.) and the data (including but not limited to data for analysis, stored data, presented data, etc.) related to the present application are information and data authorized by the user or sufficiently authorized by each party, and the collection, use and processing of the related data need to comply with the related laws and regulations and standards of the related country and region.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like. The databases referred to in the embodiments provided herein may include at least one of a relational database and a non-relational database. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processor referred to in the embodiments provided in the present application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, or the like, but is not limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples illustrate only a few embodiments of the application and are described in detail herein without thereby limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of the application should be assessed as that of the appended claims.

Claims (11)

1. A method for debugging an application, the method comprising:
setting a debugging breakpoint in a transaction step display area in a debugging page of an application according to an operation instruction input by a user;
when a debugging command triggered by the user is received, sending a debugging command to a background server to instruct the background server to execute a first transaction code corresponding to a breakpoint position indicated by the debugging command, and returning variable information corresponding to the first transaction code;
And receiving variable information corresponding to the first transaction code.
2. The method according to claim 1, wherein the method further comprises:
and displaying variable information of the transaction step corresponding to the debugging breakpoint in a first information viewing area in the debugging page.
3. The method according to claim 1 or 2, characterized in that the method further comprises:
receiving a context code of a transaction step corresponding to the debugging breakpoint returned by the background server according to the debugging instruction;
and displaying the context code of the transaction step corresponding to the debugging breakpoint in a second information viewing area in the debugging page.
4. The method according to claim 1, wherein the method further comprises:
when a next command triggered by the user is received, a next command is sent to the background server, so that the background server is instructed to execute a second transaction code corresponding to the next breakpoint position indicated by the next command, and variable information corresponding to the second transaction code is returned;
and receiving variable information corresponding to the second transaction code.
5. The method according to claim 1, wherein the method further comprises:
And when receiving the stopping command triggered by the user, sending a stopping command to the background server to instruct the background server to stop executing the process of the debugging codes, and storing the stopping position.
6. The method of claim 5, wherein the method further comprises:
and when receiving the continuation command triggered by the user, sending a continuation command to the background server to instruct the background server to continue executing the debugging code flow from the stop position.
7. A method for debugging an application, the method comprising:
receiving a debugging instruction sent by a user side; the debugging instruction is generated by setting a debugging breakpoint in a transaction step display area in a debugging page of an application according to an operation instruction input by a user by the user side in a triggering manner;
extracting the breakpoint position of the debugging breakpoint from the debugging instruction, and executing a first transaction code corresponding to the breakpoint position to obtain variable information corresponding to the first transaction code;
and transmitting variable information corresponding to the first transaction code to the user side.
8. An apparatus for debugging an application, the apparatus comprising:
The display module is used for setting debugging breakpoints in a transaction step display area in the debugging page of the application according to the operation instruction input by the user;
the sending module is used for sending a debugging instruction to a background server when receiving the debugging command triggered by the user so as to instruct the background server to execute a first transaction code corresponding to the breakpoint position indicated by the debugging instruction and return variable information corresponding to the first transaction code;
and the receiving module is used for receiving the variable information corresponding to the first transaction code.
9. An apparatus for debugging an application, the apparatus comprising:
the receiving module is used for receiving the debugging instruction sent by the user side; the debugging instruction is generated by setting a debugging breakpoint in a transaction step display area in a debugging page of an application according to an operation instruction input by a user by the user side in a triggering manner;
the execution module is used for extracting the breakpoint position of the debugging breakpoint from the debugging instruction, and executing a first transaction code corresponding to the breakpoint position to obtain variable information corresponding to the first transaction code;
and the sending module is used for sending the variable information corresponding to the first transaction code to the user side.
10. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 7 when the computer program is executed.
11. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 7.
CN202310666484.2A 2023-06-06 2023-06-06 Application debugging method and device, computer equipment and storage medium Pending CN116909877A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310666484.2A CN116909877A (en) 2023-06-06 2023-06-06 Application debugging method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310666484.2A CN116909877A (en) 2023-06-06 2023-06-06 Application debugging method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116909877A true CN116909877A (en) 2023-10-20

Family

ID=88361711

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310666484.2A Pending CN116909877A (en) 2023-06-06 2023-06-06 Application debugging method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116909877A (en)

Similar Documents

Publication Publication Date Title
CN110399241B (en) Task exception handling method, device, computer equipment and readable storage medium
CN111163345B (en) Image rendering method and device
WO2019140739A1 (en) Method for determining return visits to client, and electronic apparatus and computer-readable storage medium
CN112965660B (en) Method, system, equipment and medium for double storage pool information feedback
CN108509322B (en) Method for avoiding excessive return visit, electronic device and computer readable storage medium
CN110908837A (en) Application program exception handling method and device, electronic equipment and storage medium
CN111190727B (en) Asynchronous memory destructor method and device, computer equipment and storage medium
CN112487071A (en) Transaction query method and device, electronic equipment and readable storage medium
CN110727523A (en) Service request processing method, processing device and readable storage medium
CN111444670B (en) Document annotation method, device, computer equipment and storage medium
CN111737055A (en) Service processing method, device, equipment and computer readable storage medium
CN116909877A (en) Application debugging method and device, computer equipment and storage medium
CN116028246A (en) Scheduling method, system, computer equipment and storage medium for data processing
CN115695326A (en) Data frame transmission method and device, computer equipment and storage medium
CN116009985A (en) Interface calling method, device, computer equipment and storage medium
CN114564925A (en) Report generation method and device, electronic equipment and readable storage medium
CN112131026A (en) Information processing method based on cross-platform framework, computer equipment and storage medium
WO2019100655A1 (en) Method and apparatus for constructing invoice requisition anomalies, computer device and storage medium
CN114817166B (en) Method, device and medium for canceling file operation
CN112486847B (en) Error reproduction method, apparatus, system, device and storage medium
CN112311581B (en) Conference terminal batch management system, method, device, equipment and storage medium
CN111738848B (en) Method, device, computer equipment and storage medium for generating characteristic data
CN115794444B (en) Event communication method, event communication device, computer equipment and computer readable storage medium
CN107566478B (en) Data pushing method, system and computer readable storage medium
US20240005182A1 (en) Streaming Media Processing Method, Device and Electronic Equipment Based on Inference Service

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination