Debugging data processing method and device, computer equipment and storage medium
By obtaining debug configuration information and determining the debug communication method, the debugging instruction set is periodically sent to the program to be debugged to obtain the target variable data, which solves the problem of poor real-time variable viewing in the Eclipse platform and achieves more efficient debug data processing.
Patent Information
- Application Number
- CN202411639253.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-15
- Publication Date
- 2025-03-11
AI Technical Summary
During the debugging process of the Eclipse platform, the variable viewing is poor in real time and cannot refresh the variable value in real time.
By obtaining the debug configuration information of the program to be debugged, determining the debug communication method between the development environment and the program to be debugged, selecting the debug instruction set, establishing a debug connection, and periodically sending the debug instruction set to the program to be debugged to obtain the target variable data.
Real-time improvement of variable viewing during program debugging is achieved, avoiding the method of obtaining variable data through breakpoints, and improving debugging efficiency.
Smart Images

Figure CN119597624A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer application technology, and in particular to a debugging data processing method, device, computer equipment, storage medium and computer program product. Background Art
[0002] Eclipse is an open source, extensible development platform. Its essence is a framework and a set of services. Components are developed through plug-ins, and developers can add their own customized functions to the framework according to development needs.
[0003] At present, when debugging embedded programs, it is often necessary to view the value of variable changes in real time during the program running. The relevant debugging methods integrate the function of real-time variable refresh, but the Eclipse platform does not support this function. The relevant variables can only be viewed through breakpoints. Therefore, the real-time performance of variable viewing is poor during the debugging process of the Eclipse platform. Summary of the invention
[0004] Based on this, it is necessary to provide a debugging data processing method, device, computer equipment, computer-readable storage medium and computer program product that can improve the real-time performance of variable viewing during program debugging in response to the above technical problems.
[0005] In a first aspect, the present application provides a debugging data processing method, comprising:
[0006] Get the debugging configuration information of the program to be debugged;
[0007] Determine the debugging communication mode between the current development environment and the program to be debugged according to the debugging configuration information;
[0008] Selecting a debugging instruction set according to the debugging configuration information and the debugging communication mode; wherein the debugging instruction set is used to obtain target variable data corresponding to the program to be debugged;
[0009] Establishing a debugging connection according to the debugging communication mode, and during the execution of the program to be debugged, polling and sending the debugging instruction set to the program to be debugged via the debugging connection;
[0010] Receive and output the target variable data returned by the program to be debugged.
[0011] In one embodiment, during the execution of the program to be debugged, polling and sending the debugging instruction set to the program to be debugged via the debugging connection includes:
[0012] During the execution of the program to be debugged, responding to the timing polling instruction, determining the polling time;
[0013] When the current time is the polling time, the debugging instruction set is sent to the program to be debugged via the debugging connection.
[0014] In one embodiment, before sending the debugging instruction set to the program to be debugged, the method further includes:
[0015] In response to a variable update instruction, updating the debug instruction set according to the debug configuration information, the debug communication mode and the variable update instruction;
[0016] Correspondingly, when the current moment is the polling moment, sending the debugging instruction set to the program to be debugged via the debugging connection includes:
[0017] When the current time is the polling time, obtaining the updated debugging instruction set;
[0018] The updated debugging instruction set is sent to the program to be debugged.
[0019] In one embodiment, during the execution of the program to be debugged, responding to the timing polling instruction, determining the polling time includes:
[0020] In response to the polling control instruction, the polling time is updated.
[0021] In one embodiment, the step of obtaining the debugging configuration information of the program to be debugged includes:
[0022] Get the basic engineering information of the program to be debugged;
[0023] Creating a debugging process according to the basic engineering information, and generating a debugging instance according to the debugging process;
[0024] The debugging instance is used to extract debugging configuration information from the basic engineering information.
[0025] In one embodiment, the obtaining the debugging configuration information of the program to be debugged further includes:
[0026] Get the debugging interface type of the current development environment and the debugger type of the program to be debugged;
[0027] Establishing a data transmission connection according to the debug interface type and the debugger type;
[0028] The debugging configuration information of the program to be debugged is obtained via the data transmission connection.
[0029] In a second aspect, the present application also provides a debugging data processing device, comprising:
[0030] An information acquisition module is used to obtain the debugging configuration information of the program to be debugged;
[0031] A communication processing module, used to determine the debugging communication mode between the current development environment and the program to be debugged according to the debugging configuration information;
[0032] An instruction selection module, used for selecting a debugging instruction set according to the debugging configuration information and the debugging communication mode; wherein the debugging instruction set is used for obtaining target variable data corresponding to the program to be debugged;
[0033] An instruction sending module, used for establishing a debugging connection according to the debugging communication mode, and during the execution of the program to be debugged, polling and sending the debugging instruction set to the program to be debugged via the debugging connection;
[0034] The data output module is used to receive and output the target variable data returned by the program to be debugged.
[0035] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0036] Get the debugging configuration information of the program to be debugged;
[0037] Determine the debugging communication mode between the current development environment and the program to be debugged according to the debugging configuration information;
[0038] Selecting a debugging instruction set according to the debugging configuration information and the debugging communication mode; wherein the debugging instruction set is used to obtain target variable data corresponding to the program to be debugged;
[0039] Establishing a debugging connection according to the debugging communication mode, and during the execution of the program to be debugged, polling and sending the debugging instruction set to the program to be debugged via the debugging connection;
[0040] Receive and output the target variable data returned by the program to be debugged.
[0041] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:
[0042] Get the debugging configuration information of the program to be debugged;
[0043] Determine the debugging communication mode between the current development environment and the program to be debugged according to the debugging configuration information;
[0044] Selecting a debugging instruction set according to the debugging configuration information and the debugging communication mode; wherein the debugging instruction set is used to obtain target variable data corresponding to the program to be debugged;
[0045] Establishing a debugging connection according to the debugging communication mode, and during the execution of the program to be debugged, polling and sending the debugging instruction set to the program to be debugged via the debugging connection;
[0046] Receive and output the target variable data returned by the program to be debugged.
[0047] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:
[0048] Get the debugging configuration information of the program to be debugged;
[0049] Determine the debugging communication mode between the current development environment and the program to be debugged according to the debugging configuration information;
[0050] Selecting a debugging instruction set according to the debugging configuration information and the debugging communication mode; wherein the debugging instruction set is used to obtain target variable data corresponding to the program to be debugged;
[0051] Establishing a debugging connection according to the debugging communication mode, and during the execution of the program to be debugged, polling and sending the debugging instruction set to the program to be debugged via the debugging connection;
[0052] Receive and output the target variable data returned by the program to be debugged.
[0053] The above-mentioned debugging data processing method, device, computer equipment, storage medium and computer program product obtain the debugging configuration information of the program to be debugged, determine the debugging communication mode between the current development environment and the program to be debugged, and then select the debugging instruction set according to the debugging configuration information and the debugging communication mode. The above-mentioned method supports multiple communication modes and can automatically match the debugging instruction set according to different communication modes. The debugging instruction set is used to obtain the target variable data corresponding to the program to be debugged, establish a debugging connection according to the debugging communication mode, and during the execution of the program to be debugged, the debugging instruction set is polled and sent to the program to be debugged via the debugging connection. The debugging instruction set is sent to the program to be debugged, and the target variable data of the program to be debugged at the current moment can be obtained. The debugging instruction set is polled and sent, and the target variable data can be periodically obtained without obtaining the variable data through breakpoints, thereby improving the real-time viewing of variables during program debugging. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0055] Figure 1 An application environment diagram of a debugging data processing method in an embodiment;
[0056] Figure 2 A flowchart of a debugging data processing method in an embodiment;
[0057] Figure 3 A schematic diagram of data transmission relationship of a debugging data processing method in an embodiment;
[0058] Figure 4 This is a flow chart of step S202 of a debugging data processing method in an embodiment;
[0059] Figure 5 is a structural block diagram of a debugging data processing device in one embodiment;
[0060] Figure 6 is an internal structure diagram of a computer device in one embodiment;
[0061] Figure 7 FIG. 4 is a diagram showing the internal structure of a computer device in another embodiment. DETAILED DESCRIPTION
[0062] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0063] The debugging data processing method provided in the embodiment of the present application can be applied to Figure 1In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network, and the terminal 102 can be used to obtain instructions such as timed polling instructions and variable update instructions, can be used to receive initial or updated debugging configuration information, and can also be used to display the target variable data obtained by the server 104. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. The data storage system can be used to store information such as debugging instruction sets matched by different debugging configuration information and debugging communication methods. Among them, the terminal 102 can be but is not limited to various personal computers, laptops, smart phones, tablet computers, Internet of Things devices, and portable wearable devices. The server 104 can be implemented with an independent server or a server cluster consisting of multiple servers.
[0064] In an exemplary embodiment, Figure 2 As shown in FIG. 1 , a debugging data processing method is provided, which can be used to debug the program running on the MCU (Microcontroller Unit) development board. Figure 1 The server 104 in the example is used as an example to illustrate the method, which includes the following steps S202 to S210. Among them:
[0065] Step S202, obtaining debugging configuration information of the program to be debugged.
[0066] Among them, refer to Figure 3 The program to be debugged may be a program running in an MCU (Microcontroller Unit). The tester may connect the MCU development board to the computer device where the current development environment is located through a debugger such as JLink or OpenOCD (Open On-Chip Debugger). An integrated development environment IDE is deployed in the server 104, and a real-time refresh plug-in may be created in the IDE. The current development environment and the MCU are connected through the debugger JLink / OpenOCD.
[0067] For example, to connect the debugger to the MCU, the debug interface needs to connect the MCU and the debugger through pins, so that the debugger can access the MCU. To set up the debugging tool in the development environment, you need to select the correct target MCU model, debugging interface type, clock rate and other parameters. These configurations ensure that the debugging tool can correctly identify and control the MCU.
[0068] Exemplarily, the server 104 can obtain the basic project information of the program to be debugged, create a debugging process based on the basic project information, and return a debugging instance of the Process class based on the debugging process, and use the debugging instance to extract the debugging configuration information in the basic project information. Among them, the debugging instance can be used to control the debugging process and obtain relevant information. The debugging instance is associated with the corresponding project. Among them, the Process class provides methods for executing input from the process, executing output to the process, waiting for the process to complete, checking the exit status of the process, and destroying the process. When debugging is closed, the corresponding debugging instance is automatically closed.
[0069] Among them, the basic project information can be an ELF file (Executable and Linkable Format), a standard file format that includes executable files, object codes, shared libraries, and core dumps, that is, debugging information and data required for program operation. ELF files can carry complete code, debugging information, and memory mapping information, allowing developers to load ELF files in a debugger and view the execution status of the MCU, including viewing the values of variables, function call stacks, etc.
[0070] Step S204: determining the debugging communication mode between the current development environment and the program to be debugged according to the debugging configuration information.
[0071] Exemplarily, the server 104 can extract the communication interface type and parameter information according to the debugging configuration information, thereby providing a communication routing service. The server 104 can pre-define multiple communication mode instances, such as GDBConnector (GDB communication connection), TelnetConnector (Telnet communication connection), etc., to determine the communication mode between the current development environment and the program to be debugged.
[0072] Step S206: Select a debugging instruction set according to the debugging configuration information and the debugging communication mode.
[0073] The debugging instruction set is used to obtain target variable data corresponding to the program to be debugged.
[0074] Exemplarily, the server 104 can create a corresponding communication connection instance according to the communication mode in the debugging configuration information. For example, if the communication mode configured in the debugging configuration information is a GDB communication connection, a corresponding GDB connection is created. If the communication mode is configured as a Telnet communication mode, a corresponding Telnet connection is created. Next, the server 104 establishes an instruction management service, defines a general instruction interface according to the debugging configuration information, and then selects a debugging instruction set according to different debugging communication modes, thereby implementing the instruction interface. The instruction interface provides corresponding methods for sending instructions, reading return information, and disconnecting, etc.
[0075] Step S208, establishing a debugging connection according to the debugging communication mode, and during the execution of the program to be debugged, polling and sending a debugging instruction set to the program to be debugged via the debugging connection.
[0076] Exemplarily, during the execution of the program to be debugged, the server 104 may respond to a timing polling instruction to determine a polling time, and when the current time is the polling time, send a debugging instruction set to the program to be debugged via a debugging connection.
[0077] According to the test requirements, the tester can send a timed polling instruction to the server 104 through the terminal 102, thereby starting the timed polling task and polling and sending the debugging instruction set to the program to be debugged. The server 104 can also automatically receive the timed polling instruction according to the polling rules pre-set by the tester, such as triggering the timed polling instruction within a period of time after the program to be debugged reports an error, or automatically triggering the timed polling instruction within a preset time period.
[0078] Furthermore, the server 104 can update the polling time in response to the polling control instruction. The server 104 can update the polling cycle of the timed polling task according to the polling control instruction, and the tester can further increase the sending frequency of the debugging instruction set by shortening the timed polling cycle, thereby further improving the real-time performance of the target variable data acquisition.
[0079] Exemplarily, the server 104 may also update the debugging instruction set in response to the variable update instruction according to the debugging configuration information, the debugging communication mode and the variable update instruction before sending the debugging instruction set to the program to be debugged. Next, when the current moment is the polling moment, the updated debugging instruction set is obtained and sent to the program to be debugged.
[0080] Step S210, receiving and outputting target variable data returned by the program to be debugged.
[0081] Exemplarily, after server 104 sends the debugging instruction set, the MCU development board will return the corresponding target variable data according to the debugging instruction set. Server 104 can receive the target variable data, parse the target variable data into the data structure required by the view, and render it into the display view of the current development environment.
[0082] In the above-mentioned debugging data processing method, by obtaining the debugging configuration information of the program to be debugged, the debugging communication mode between the current development environment and the program to be debugged is determined, and then the debugging instruction set is selected according to the debugging configuration information and the debugging communication mode. The above-mentioned method supports multiple communication modes, and can automatically match the debugging instruction set according to different communication modes. The debugging instruction set is used to obtain the target variable data corresponding to the program to be debugged, and a debugging connection is established according to the debugging communication mode. During the execution of the program to be debugged, the debugging instruction set is polled and sent to the program to be debugged via the debugging connection. The debugging instruction set is sent to the program to be debugged, and the target variable data of the program to be debugged at the current moment can be obtained. The debugging instruction set is polled and sent, and the target variable data can be periodically obtained without obtaining the variable data through breakpoints, thereby improving the real-time viewing of variables during program debugging.
[0083] In an exemplary embodiment, Figure 4 As shown, step S202 includes steps S302 to S306. Among them:
[0084] Step S302, obtaining the debugging interface type of the current development environment and the debugger type of the program to be debugged.
[0085] Exemplarily, the server 104 can provide a function of customizing debug configuration. For example, the server 104 can pre-integrate multiple MCU connection debugger configuration modes and store the corresponding debug configuration information in the data storage system. The server 104 can simultaneously reserve multiple different debug configuration adapter interfaces and define multiple adapter interface implementation classes, such as the adapter class of Eclipse IDE, the adapter class of Visual Studio Code IDE, etc.
[0086] Step S304: establishing a data transmission connection according to the debug interface type and the debugger type.
[0087] Furthermore, the server 104 can automatically adapt according to the different debugging interface types and debugger types, thereby creating a data transmission connection and obtaining the corresponding information of the program to be debugged. During use, the debugging configuration information of the program to be debugged is obtained to match a suitable debugger, thereby improving the convenience and scalability of the configuration. The user can control through the Type field and select different debuggers, such as JLink, OpenOCD, etc. The selection of the debugger is different, and the configuration options in the display interface are different. The server 104 can establish a data transmission connection according to the matched debugger and interface type.
[0088] Step S306: obtaining debugging configuration information of the program to be debugged via the data transmission connection.
[0089] Exemplarily, server 104 can provide a quick import function, pre-write general configuration information through extensible markup language, and quickly generate a basic configuration through a one-click import function in the interface. The user can modify the generated basic configuration based on the generated basic configuration to obtain configuration command information for obtaining the debugging configuration information of the program to be debugged, that is, establish a data transmission connection, and then obtain the debugging configuration information according to the configuration command information.
[0090] In another exemplary embodiment, the server 104 obtains basic engineering information of the program to be debugged, creates a debugging process according to the basic engineering information, generates a debugging instance according to the debugging process, and uses the debugging instance to extract debugging configuration information from the basic engineering information.
[0091] Next, the server 104 determines the debugging communication mode between the current development environment and the program to be debugged according to the debugging configuration information, and selects a debugging instruction set for obtaining target variable data corresponding to the program to be debugged according to the debugging configuration information and the debugging communication mode. Then, a debugging connection is established according to the debugging communication mode, and during the execution of the program to be debugged, the server 104 responds to the timing polling instruction to determine the polling time, and when the polling control instruction is received, the server 104 updates the polling time according to the polling control instruction.
[0092] At the same time, in response to the variable update instruction, the server 104 updates the debugging instruction set according to the debugging configuration information, the debugging communication mode and the variable update instruction, and when the current moment is the polling moment, obtains the updated debugging instruction set, thereby sending the updated debugging instruction set to the program to be debugged, receiving and outputting the target variable data returned by the program to be debugged, and finally rendering the target variable data into the display view for display.
[0093] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0094] Based on the same inventive concept, the embodiment of the present application also provides a debugging data processing device for implementing the debugging data processing method involved above. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above method, so the specific limitations in one or more debugging data processing device embodiments provided below can refer to the limitations of the debugging data processing method above, and will not be repeated here.
[0095] In an exemplary embodiment, Figure 5 As shown, a debugging data processing device is provided, including: an information acquisition module 402, a communication processing module 404, an instruction selection module 406, an instruction sending module 408 and a data output module 410, wherein:
[0096] The information acquisition module 402 is used to acquire the debugging configuration information of the program to be debugged;
[0097] The communication processing module 404 is used to determine the debugging communication mode between the current development environment and the program to be debugged according to the debugging configuration information;
[0098] The instruction selection module 406 is used to select a debugging instruction set according to the debugging configuration information and the debugging communication mode; wherein the debugging instruction set is used to obtain target variable data corresponding to the program to be debugged;
[0099] The instruction sending module 408 is used to establish a debugging connection according to the debugging communication mode, and during the execution of the program to be debugged, poll the program to be debugged via the debugging connection to send a debugging instruction set;
[0100] The data output module 410 is used to receive and output target variable data returned by the program to be debugged.
[0101] In one embodiment, the instruction sending module 408 includes:
[0102] A polling setting unit, used to determine the polling time in response to the timing polling instruction during the execution of the program to be debugged;
[0103] The instruction sending unit is used to send a debugging instruction set to the program to be debugged via the debugging connection when the current time is the polling time.
[0104] In one embodiment, the instruction sending module 408 further includes:
[0105] A variable updating unit, configured to update a debugging instruction set in response to a variable updating instruction and according to debugging configuration information, a debugging communication mode and the variable updating instruction;
[0106] Accordingly, the instruction sending unit is specifically used for: when the current moment is the polling moment, obtaining the updated debugging instruction set; and sending the updated debugging instruction set to the program to be debugged.
[0107] In one of the embodiments, during the execution of the program to be debugged, the polling setting unit is further used to: update the polling time in response to the polling control instruction.
[0108] In one embodiment, the information acquisition module 402 is specifically used to: acquire basic engineering information of the program to be debugged; create a debugging process according to the basic engineering information, and generate a debugging instance according to the debugging process; and extract debugging configuration information from the basic engineering information using the debugging instance.
[0109] In one embodiment, the information acquisition module 402 is also used to: obtain the debugging interface type of the current development environment and the debugger type of the program to be debugged; establish a data transmission connection according to the debugging interface type and the debugger type; and obtain debugging configuration information of the program to be debugged via the data transmission connection.
[0110] Each module in the above-mentioned debugging data processing device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0111] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 5As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as 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. The processor of the computer device is used 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, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store information such as debugging instruction sets matched by different debugging configuration information and debugging communication modes. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a debugging data processing method is implemented.
[0112] In an exemplary embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. Figure 6 As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. The processor of the computer device is used 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 and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. 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 to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a debugging data processing method is implemented. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.
[0113] Those skilled in the art will understand that Figure 6The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0114] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the following steps when executing the computer program: obtaining debugging configuration information of a program to be debugged; determining a debugging communication mode between a current development environment and the program to be debugged according to the debugging configuration information; selecting a debugging instruction set according to the debugging configuration information and the debugging communication mode; wherein the debugging instruction set is used to obtain target variable data corresponding to the program to be debugged; establishing a debugging connection according to the debugging communication mode, and during the execution of the program to be debugged, polling and sending the debugging instruction set to the program to be debugged via the debugging connection; and receiving and outputting the target variable data returned by the program to be debugged.
[0115] In one embodiment, when executing a computer program, the processor further implements the following steps: during the execution of the program to be debugged, in response to a timing polling instruction, determining a polling time; and sending a debugging instruction set to the program to be debugged via a debugging connection when the current time is the polling time.
[0116] In one embodiment, when the processor executes the computer program, the following steps are also implemented: in response to the variable update instruction, the debugging instruction set is updated according to the debugging configuration information, the debugging communication mode and the variable update instruction; when the current moment is the polling moment, the updated debugging instruction set is obtained; and the updated debugging instruction set is sent to the program to be debugged.
[0117] In one embodiment, when the processor executes the computer program, the processor further implements the following steps: in response to the polling control instruction, updating the polling time.
[0118] In one embodiment, when the processor executes the computer program, the following steps are also implemented: obtaining basic engineering information of the program to be debugged; creating a debugging process according to the basic engineering information, and generating a debugging instance according to the debugging process; and extracting debugging configuration information from the basic engineering information using the debugging instance.
[0119] In one embodiment, when the processor executes the computer program, the following steps are also implemented: obtaining the debugging interface type of the current development environment and the debugger type of the program to be debugged; establishing a data transmission connection according to the debugging interface type and the debugger type; and obtaining debugging configuration information of the program to be debugged via the data transmission connection.
[0120] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented: obtaining debugging configuration information of a program to be debugged; determining a debugging communication mode between a current development environment and the program to be debugged according to the debugging configuration information; selecting a debugging instruction set according to the debugging configuration information and the debugging communication mode; wherein the debugging instruction set is used to obtain target variable data corresponding to the program to be debugged; establishing a debugging connection according to the debugging communication mode, and during the execution of the program to be debugged, polling and sending the debugging instruction set to the program to be debugged via the debugging connection; and receiving and outputting the target variable data returned by the program to be debugged.
[0121] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: during the execution of the program to be debugged, in response to the timing polling instruction, a polling time is determined; when the current time is the polling time, a debugging instruction set is sent to the program to be debugged via the debugging connection.
[0122] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: in response to the variable update instruction, the debugging instruction set is updated according to the debugging configuration information, the debugging communication mode and the variable update instruction; when the current moment is the polling moment, the updated debugging instruction set is obtained; and the updated debugging instruction set is sent to the program to be debugged.
[0123] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: in response to the polling control instruction, updating the polling time.
[0124] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: obtaining basic engineering information of the program to be debugged; creating a debugging process according to the basic engineering information, and generating a debugging instance according to the debugging process; and extracting debugging configuration information from the basic engineering information using the debugging instance.
[0125] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: obtaining the debugging interface type of the current development environment and the debugger type of the program to be debugged; establishing a data transmission connection according to the debugging interface type and the debugger type; and obtaining debugging configuration information of the program to be debugged via the data transmission connection.
[0126] In one embodiment, a computer program product is provided, including a computer program, which implements the following steps when executed by a processor: obtaining debugging configuration information of a program to be debugged; determining a debugging communication mode between a current development environment and the program to be debugged according to the debugging configuration information; selecting a debugging instruction set according to the debugging configuration information and the debugging communication mode; wherein the debugging instruction set is used to obtain target variable data corresponding to the program to be debugged; establishing a debugging connection according to the debugging communication mode, and during the execution of the program to be debugged, polling and sending the debugging instruction set to the program to be debugged via the debugging connection; and receiving and outputting the target variable data returned by the program to be debugged.
[0127] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: during the execution of the program to be debugged, in response to the timing polling instruction, a polling time is determined; when the current time is the polling time, a debugging instruction set is sent to the program to be debugged via the debugging connection.
[0128] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: in response to the variable update instruction, the debugging instruction set is updated according to the debugging configuration information, the debugging communication mode and the variable update instruction; when the current moment is the polling moment, the updated debugging instruction set is obtained; and the updated debugging instruction set is sent to the program to be debugged.
[0129] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: in response to the polling control instruction, updating the polling time.
[0130] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: obtaining basic engineering information of the program to be debugged; creating a debugging process according to the basic engineering information, and generating a debugging instance according to the debugging process; and extracting debugging configuration information from the basic engineering information using the debugging instance.
[0131] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: obtaining the debugging interface type of the current development environment and the debugger type of the program to be debugged; establishing a data transmission connection according to the debugging interface type and the debugger type; and obtaining debugging configuration information of the program to be debugged via the data transmission connection.
[0132] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0133] The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0134] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be construed as limiting the scope of the present application. It should be noted that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A debugging data processing method, characterized in that: The method comprises: Get the debugging configuration information of the program to be debugged; Determine the debugging communication mode between the current development environment and the program to be debugged according to the debugging configuration information; Selecting a debugging instruction set according to the debugging configuration information and the debugging communication mode; wherein the debugging instruction set is used to obtain target variable data corresponding to the program to be debugged; Establishing a debugging connection according to the debugging communication mode, and during the execution of the program to be debugged, polling and sending the debugging instruction set to the program to be debugged via the debugging connection; Receive and output the target variable data returned by the program to be debugged.
2. The method according to claim 1, characterized in that The step of polling and sending the debugging instruction set to the program to be debugged via the debugging connection during the execution of the program to be debugged includes: During the execution of the program to be debugged, responding to the timing polling instruction, determining the polling time; When the current time is the polling time, the debugging instruction set is sent to the program to be debugged via the debugging connection.
3. The method according to claim 2, characterized in that Before sending the debugging instruction set to the program to be debugged, the method further includes: In response to a variable update instruction, updating the debug instruction set according to the debug configuration information, the debug communication mode and the variable update instruction; Correspondingly, when the current moment is the polling moment, sending the debugging instruction set to the program to be debugged via the debugging connection includes: When the current time is the polling time, obtaining the updated debugging instruction set; The updated debugging instruction set is sent to the program to be debugged.
4. The method according to claim 2, characterized in that: The method of determining the polling time in response to the timing polling instruction during the execution of the program to be debugged includes: In response to the polling control instruction, the polling time is updated.
5. The method according to any one of claims 1 to 4, characterized in that: The step of obtaining the debugging configuration information of the program to be debugged includes: Get the basic engineering information of the program to be debugged; Creating a debugging process according to the basic engineering information, and generating a debugging instance according to the debugging process; The debugging instance is used to extract debugging configuration information from the basic engineering information.
6. The method according to claim 1, characterized in that The step of obtaining the debugging configuration information of the program to be debugged further includes: Get the debugging interface type of the current development environment and the debugger type of the program to be debugged; Establishing a data transmission connection according to the debug interface type and the debugger type; The debugging configuration information of the program to be debugged is obtained via the data transmission connection.
7. A debugging data processing device, characterized in that: The device comprises: An information acquisition module is used to obtain the debugging configuration information of the program to be debugged; A communication processing module, used to determine the debugging communication mode between the current development environment and the program to be debugged according to the debugging configuration information; An instruction selection module, used for selecting a debugging instruction set according to the debugging configuration information and the debugging communication mode; wherein the debugging instruction set is used for obtaining target variable data corresponding to the program to be debugged; An instruction sending module, used for establishing a debugging connection according to the debugging communication mode, and during the execution of the program to be debugged, polling and sending the debugging instruction set to the program to be debugged via the debugging connection; The data output module is used to receive and output the target variable data returned by the program to be debugged.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.