Lightweight PL / SQL debugger implementation method

Through a lightweight PL/SQL language debugger implementation method, the problem of cumbersome implementation of debuggers and large resource occupancy in the prior art is solved, and a simplified debugging process and low resource occupancy debugging effect is achieved.

WO2025039250A1PCT designated stage expired Publication Date: 2025-02-27SHENZHEN INST OF COMPUTING SCI
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2023/114647
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-08-22
Filing Date
2023-08-24
Publication Date
2025-02-27

AI Technical Summary

Technical Problem

In the prior art, mainstream database debuggers that support stored procedures are cumbersome to implement, occupy a large amount of resources, and may not be able to start the debugger in scenarios where resources are tight.

Method used

It provides a lightweight PL/SQL language debugger implementation method. By receiving user inputted information to be debugged, starting the target to debug statement block and putting it in a waiting state, and interacting with the database management system to debug through the debugging interface.

Benefits of technology

It simplifies the startup process and debugging process of the debugger, reduces the memory resource usage of the debugger, supports debugging of anonymous blocks, and can still start normally in scenarios with tight resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023114647_27022025_PF_FP_ABST
    Figure CN2023114647_27022025_PF_FP_ABST
Patent Text Reader

Abstract

The present application provides a lightweight PL / SQL debugger implementation method. The method is applied to a relational database management system, and the method comprises: when a user performs debugging, receiving information for debugging input by the user; on the basis of the information for debugging, starting a corresponding target statement block to be debugged, and enabling the statement block to be debugged to be in a waiting-for-debugging state, wherein the type of the statement block to be debugged comprises a stored procedure and an anonymous block; and interacting with the database management system by means of a debugger interface to debug the statement block to be debugged. A PL / SQL statement block is directly input to start debugging, and a PL / SQL statement is debugged by means of a server alone, without the need for session handover, thereby simplifying the starting process and debugging process; moreover, no client and proxy module are needed, thereby greatly reducing the memory resource occupation of the debugger; additionally, the debugging of anonymous blocks can be supported.
Need to check novelty before this filing date? Find Prior Art

Description

A lightweight PL / SQL language debugger implementation method Technical Field

[0001] The present application relates to the technical field of database debugging, and in particular to a method for implementing a lightweight PL / SQL language debugger. Background Art

[0002] When executing PL / SQL statements, if functions and SQL statements are called and the returned results are inconsistent with expectations, it is necessary to determine whether there is a problem with the PL / SQL statement or a defect in the calling database. However, when the PL / SQL logic is complex, users are often unable to directly identify the problem in a short period of time. Therefore, a debugging tool is required to debug the PL / SQL language. By debugging, the correctness of each statement and function call result is checked, which can help identify and resolve the problem quickly. However, the debugger implementation of mainstream databases that currently support stored procedures is relatively cumbersome, with a certain user threshold. In addition, the debugger may not be able to be started in some resource-constrained scenarios.

[0003] Summary of the Invention

[0004] In view of the above problems, the present application is proposed to provide a lightweight PL / SQL language debugger implementation method that overcomes the above problems or at least partially solves the above problems, including:

[0005] A lightweight PL / SQL language debugger implementation method is applied to a relational database management system, and the method comprises:

[0006] When the user is debugging, the debugging information input by the user is received;

[0007] Starting a corresponding target statement block to be debugged according to the information to be debugged, and placing the statement block to be debugged in a waiting-for-debugging state; wherein the types of the statement block to be debugged include stored procedures and anonymous blocks;

[0008] The debugging interface is used to interact with the database management system to debug the statement block to be debugged.

[0009] Furthermore, the step of receiving the information to be debugged input by the user includes:

[0010] Get the debugging information entered by the user on the front-end interface;

[0011] The information to be called is sent to the database management system.

[0012] Furthermore, the step of starting the debugger and the statement block to be debugged includes:

[0013] Send a command to the debug interface through the driver, and call the start interface to start the debugger;

[0014] Send an instruction to the database management system according to the information to be debugged to start the corresponding target statement block to be debugged.

[0015] Furthermore, the step of placing the statement block to be debugged in a waiting-for-debugging state includes:

[0016] The statement block to be debugged is stopped at the logical line before execution, waiting for the next instruction.

[0017] Furthermore, the step of interacting with the database management system through the debugging interface to debug the statement block to be debugged includes:

[0018] Sending a debugging command to the debugging interface through a driver;

[0019] Processing the debugging command through the debugging interface to generate a corresponding debugging instruction;

[0020] Sending the debugging instruction to the debugger through the debugging interface;

[0021] The debugger performs corresponding operations according to the debugging instructions.

[0022] Furthermore, the steps further include:

[0023] The debugger sends the return information to the debugging interface;

[0024] Processing the returned information through the debugging interface to generate a visualization result;

[0025] The visualization result is returned by the driver.

[0026] Furthermore, the debugging command includes:

[0027] Add, delete, modify and check breakpoints, control the execution of the statement block to be debugged and query relevant information of the statement block to be debugged.

[0028] A lightweight PL / SQL language debugger implementation device, applied to a relational database management system, comprising:

[0029] The module for receiving statements to be debugged is used to receive the information to be debugged input by the user when the user is debugging;

[0030] A debugging startup module is used to start the corresponding target statement block to be debugged according to the information to be debugged, and put the statement block to be debugged into a waiting state for debugging; wherein the types of the statement block to be debugged include stored procedures and anonymous blocks;

[0031] The statement block debugging module is used to interact with the database management system through a debugging interface to debug the statement block to be debugged.

[0032] A computer device comprises a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements the steps of the method for non-invasively calculating blood flow reserve fraction as described above.

[0033] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the method for non-invasively calculating blood flow reserve fraction as described above.

[0034] This application has the following advantages:

[0035] In an embodiment of the present application, in response to the problem of large resource usage and cumbersome implementation in the prior art, the present application provides a solution for debugging stored procedures and anonymous blocks through single-end debugging, specifically: when a user is debugging, the user inputs information to be debugged, the corresponding target statement block to be debugged is received according to the information to be debugged, and the statement block to be debugged is placed in a waiting state for debugging; wherein the types of statement blocks to be debugged include stored procedures and anonymous blocks; the statement block to be debugged is debugged by interacting with the database management system through a debugging interface. Debugging is started by directly inputting a PL / SQL statement block, and the PL / SQL statement is debugged using the server alone without the need for session switching, thereby simplifying the startup process and debugging process, and eliminating the need for a client side and proxy module, greatly reducing the memory resource usage of the debugger, while also supporting the debugging of anonymous blocks. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the technical solution of the present application, the following is a brief introduction to the drawings required for the description of the present application. 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 any creative work.

[0037] FIG1 is a flowchart of a method for implementing a lightweight PL / SQL language debugger provided in one embodiment of the present application;

[0038] FIG2 is a schematic diagram of the overall architecture of a debugger for implementing a lightweight PL / SQL language debugger according to an embodiment of the present application;

[0039] FIG3 is a debugger interaction diagram of a lightweight PL / SQL language debugger implementation method provided in an embodiment of the present application;

[0040] FIG4 is a structural block diagram of a method for implementing a lightweight PL / SQL language debugger provided in an embodiment of the present application;

[0041] FIG5 is a schematic structural diagram of a computer device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0042] To make the objectives, features, and advantages of this application more readily apparent, the present application is further described below in conjunction with the accompanying drawings and specific embodiments. It is apparent that the embodiments described are only a portion of the embodiments of this application, not all of them. All other embodiments derived by persons of ordinary skill in the art based on the embodiments in this application without inventive effort are also within the scope of protection of this application.

[0043] By analyzing the existing technology, the inventors found that the implementation of debuggers in mainstream databases that currently support stored procedures is relatively cumbersome. They usually include a client side and a proxy module to perform connection processing and other operations. Some even require a front-end interface and protocol, which makes the debugger startup process and debugging command processing process relatively cumbersome. In addition, when debugging PL / SQL, a tool often only starts one debugger, but requires a dedicated proxy module to handle multiple client and server sides, as well as a dedicated client side for intermediate transmission. As a result, the debugger occupies a large amount of database resources. In some resource-constrained scenarios, the debugger may even be unable to start.

[0044] It should be noted that in any embodiment of the present invention, the technical solutions are all applied to a relational database management system. A relational database management system (RDBMS) refers to a set of programs that includes interconnected logical organization and storage of data.

[0045] 1 , a lightweight PL / SQL language debugger implementation method according to an embodiment of the present application is shown. The method is applied to a relational database management system. The method includes:

[0046] S110, when the user is debugging, receiving the debugging information input by the user;

[0047] S120, starting a corresponding target statement block to be debugged according to the information to be debugged, and placing the statement block to be debugged in a waiting state for debugging; wherein the types of the statement block to be debugged include stored procedures and anonymous blocks;

[0048] S130: interact with the database management system through a debugging interface to debug the statement block to be debugged.

[0049] In an embodiment of the present application, in response to the problem of large resource usage and cumbersome implementation in the prior art, the present application provides a solution for debugging stored procedures and anonymous blocks through single-end debugging, specifically: when a user is debugging, the user inputs information to be debugged, the corresponding target statement block to be debugged is received according to the information to be debugged, and the statement block to be debugged is placed in a waiting state for debugging; wherein the types of statement blocks to be debugged include stored procedures and anonymous blocks; the statement block to be debugged is debugged by interacting with the database management system through a debugging interface. Debugging is started by directly inputting a PL / SQL statement block, and the PL / SQL statement is debugged using the server alone without the need for session switching, thereby simplifying the startup process and debugging process, and eliminating the need for a client side and proxy module, greatly reducing the memory resource usage of the debugger, while also supporting the debugging of anonymous blocks.

[0050] Next, a method for implementing a lightweight PL / SQL language debugger in this exemplary embodiment will be further described.

[0051] As described in step S110 above, when the user performs debugging, the information to be debugged input by the user is received; wherein the types of the statement blocks to be debugged include stored procedures and anonymous blocks.

[0052] In an embodiment of the present invention, the specific process of "receiving the information to be debugged input by the user" in step S110 can be further explained in combination with the following description.

[0053] As described in the following steps, obtain the debugging information entered by the user on the front-end interface;

[0054] As described in the following steps, the information to be called is sent to the database management system.

[0055] As an example, the information to be debugged input by the user in the front-end interface is obtained, and the information to be debugged is sent to the database management system through the driver, wherein the information to be debugged is the target stored procedure name or the anonymous block statement, and when the information to be debugged is an anonymous block statement, the anonymous block statement is compiled.

[0056] It should be noted that an anonymous block is a PL / SQL structure that can dynamically create and execute procedural code without storing the code as a database object.

[0057] As described in the above step S120, the corresponding target statement block to be debugged is started according to the information to be debugged, and the statement block to be debugged is put into a waiting state for debugging.

[0058] In an embodiment of the present invention, the specific process of "starting the corresponding target statement block to be debugged according to the information to be debugged" in step S120 can be further explained in combination with the following description.

[0059] As described in the following steps, a command is sent to the debug interface through the driver, and a start interface is called to start the debugger;

[0060] As described in the following steps, an instruction is sent to the database management system according to the information to be debugged to start the corresponding target statement block to be debugged.

[0061] As an example, a command is sent to the debugger interface by a driver, a start interface is called to start the debugger, and a cmd (command, command prompt) instruction is sent to the database management system according to the information to be debugged to start the corresponding target statement block to be debugged; specifically, when the information to be debugged is the name of a target stored procedure, the corresponding target stored procedure in the database management system is started according to the target stored procedure name; when the information to be debugged is an anonymous block statement, the compiled anonymous block statement is started.

[0062] In an embodiment of the present invention, the specific process of "setting the statement block to be debugged into a waiting state for debugging" in step S120 may be further explained in combination with the following description.

[0063] As described in the following steps, the statement block to be debugged is stopped at the logical line before execution, waiting for the next instruction.

[0064] As an example, when the execution reaches the logic line before the execution of the statement block to be debugged, the execution is stopped and the debugging instructions from the debugging interface are monitored.

[0065] As described in the above step S130, the debugging interface is used to interact with the database management system to debug the statement block to be debugged.

[0066] In one embodiment of the present invention, the specific process of "interacting with the database management system through the debugging interface to debug the statement block to be debugged" in step S130 can be further explained in combination with the following description.

[0067] Sending a debugging command to the debugging interface through the driver as described in the following steps;

[0068] As described in the following steps, the debugging command is processed through the debugging interface to generate a corresponding debugging instruction;

[0069] As described in the following steps, sending the debugging instruction to the debugger through the debugging interface;

[0070] As described in the following steps, the debugger performs corresponding operations according to the debugging instructions.

[0071] As an example, referring to Figure 2, yashan DB is the database corresponding to the debugger. The one-to-one connection between the client and the server can be completed by transmitting the corresponding command through the interface layer; when started through other databases, it is necessary to first establish a connection with the client through the proxy module, and then the proxy connects to the server according to a specific method inside, thereby completing the entire connection process.

[0072] As an example, referring to Figure 3, the debugging command entered by the user on the front-end interface is obtained and sent to the debugging interface through the driver. The debugging command is processed by the debugging interface to generate corresponding debugging instructions. The debugging instructions are sent to the debugger through the debugging interface, and the debugger performs corresponding operations based on the content of the debugging instructions.

[0073] It should be noted that the debugging instructions include adding, deleting, modifying and checking breakpoints, controlling the execution of the statement block to be debugged and querying relevant information of the statement block to be debugged, as shown below:

[0074] --add breakpoint, pass in the stored procedure name and line number to set the breakpoint, and the return value is the breakpoint number;

[0075] --delete breakpoint, pass in the breakpoint number, and the return value is confirmation of deletion;

[0076] --continue, continue execution until the next breakpoint, and then wait for the next command;

[0077] --step over, single-step execution, directly execute the next line, will not load a new process to run;

[0078] --show breakpoint, displays all breakpoints, returns to the interface and displays them in the format of breakpoint number, error procedure name and line number;

[0079] --show variables, displays all local variable information of the current procedure body and returns to the interface display;

[0080] --show frames, displays the current call stack information and returns to the interface display;

[0081] --show resource, obtains the current source code information based on the stored procedure name and returns it to the interface for display.

[0082] It should be noted that when the user terminates debugging, the front-end interface sends a termination command to the debugging interface through the driver, and sends a termination instruction to the debugger through the debugging interface to terminate the debugger.

[0083] It should be noted that the user can click Stop in the graphical interface, or directly use the shortcut key CRLT+C to stop the debugger.

[0084] In one embodiment of the present invention, the specific process of step S130 further includes:

[0085] As described in the following steps, the debugger sends the return information to the debugging interface;

[0086] As described in the following steps, the returned information is processed through the debugging interface to generate a visualization result;

[0087] As described in the following steps, the visualization result is returned through the driver.

[0088] As an example, referring to Figure 2-3, when the above operation generates return information, the debugger will send the return information to the debugging interface, process the return information into a visualization result through the debugging interface, send the visualization result back to the front-end interface through the driver, and display it on the front-end interface, so that the user can easily and intuitively obtain the required information.

[0089] In a specific implementation, there is a stored procedure proc1, which is defined as follows:

[0090] Enter the IP and port number in the front end of the debugger to connect to the database. Write the statement 'begin proc1(1,2); end; / ' in the front end of the debugger to start the debugging mode. The driver will send a command to the debugger interface, call the start interface to start the debugger, and send the cmd command to the server. The server will first compile the stored procedure and stop at the logical line before the stored procedure is executed, waiting for the next instruction. Set a breakpoint at line 5 of the procedure body proc1, which is proc1's

[0091] 'end; / ;'; Continue execution until the breakpoint is reached, which is line 5 of proc1; display the local variable information of the current stack, and get the value of value1 as 3; stop debugging and close the debugger. The code of the above process is as follows:

[0092] Session1:Pldbg_start('begin proc1(1,2);end; / ');

[0093] Session1:Pldbg_addbp('proc1:5');

[0094] Session1:Pldbg_continue();

[0095] Session1:Pldbg_showVars();

[0096] Session1:Pldbg_stop();

[0097] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0098] 4 , a lightweight PL / SQL language debugger implementation device provided in an embodiment of the present application is shown;

[0099] Specifically include:

[0100] The module 410 for receiving statements to be debugged is used to receive the information to be debugged input by the user when the user is debugging;

[0101] The debugging start module 420 is used to start the corresponding target statement block to be debugged according to the information to be debugged, and put the statement block to be debugged into a waiting state for debugging; wherein the types of the statement block to be debugged include stored procedures and anonymous blocks;

[0102] The statement block debugging module 430 is used to interact with the database management system through a debugging interface to debug the statement block to be debugged.

[0103] In one embodiment of the present invention, the to-be-debugged statement receiving module 410 includes:

[0104] The information acquisition submodule is used to obtain the debugging information entered by the user on the front-end interface;

[0105] The information transmission submodule is used to send the information to be adjusted to the database management system.

[0106] In one embodiment of the present invention, the debugging startup module 420 includes:

[0107] The debugger startup submodule is used to send a command to the debug interface through the driver and call the start interface to start the debugger;

[0108] A statement block to be debugged starting submodule is used to send an instruction to the database management system to start the corresponding target statement block to be debugged according to the information to be debugged;

[0109] The waiting submodule of the statement block to be debugged is used to stop the statement block to be debugged at the logic line before execution and wait for the next instruction.

[0110] In one embodiment of the present invention, the statement block debugging module 430 includes:

[0111] A debugging command sending submodule, configured to send debugging commands to the debugging interface via a driver;

[0112] A debugging instruction generating submodule, configured to process the debugging command through the debugging interface to generate corresponding debugging instructions;

[0113] A debugging instruction sending submodule, configured to send the debugging instruction to the debugger via the debugging interface;

[0114] The debugging submodule is used for the debugger to perform corresponding operations according to the debugging instructions.

[0115] In one embodiment of the present invention, the statement block debugging module 430 further includes:

[0116] A return information sending submodule, configured for the debugger to send the return information to the debugging interface;

[0117] A visualization result generating submodule, configured to process the returned information through the debugging interface to generate a visualization result;

[0118] The visualization result returning submodule is used to return the visualization result through the driver.

[0119] 5 , a computer device for implementing a lightweight PL / SQL language debugger method and apparatus of the present invention is shown, which may specifically include the following:

[0120] The computer device 12 is a general-purpose computing device. The components of the computer device 12 may include but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 connecting different system components (including the system memory 28 and the processing unit 16).

[0121] The bus 18 represents one or more of several types of bus 18 structures, including a memory bus 18 or memory controller, a peripheral bus 18, an accelerated graphics port, a processor, or a local bus 18 that utilizes any of a variety of bus 18 architectures. Examples of such architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus 18, a Micro Channel Architecture (MAC) bus 18, an Enhanced ISA bus 18, an Audio Video Electronics Standards Association (VESA) local bus 18, and a Peripheral Component Interconnect (PCI) bus 18.

[0122] The computer device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the computer device 12, including volatile and non-volatile media, removable and non-removable media.

[0123] System memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. Computer device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 34 may be configured to read and write to non-removable, non-volatile magnetic media (commonly referred to as a "hard drive"). Although not shown in FIG. 5 , a magnetic disk drive may be provided for reading and writing to a removable non-volatile magnetic disk (e.g., a "floppy disk"), as well as an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media). In these cases, each drive may be connected to bus 18 via one or more data media interfaces. The memory may include at least one program product having a set (e.g., at least one) of program modules 42 configured to perform the functions of various embodiments of the present invention.

[0124] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in a memory. Such program modules 42 include, but are not limited to, an operating system, one or more application programs, other program modules 42, and program data, each of which, or some combination thereof, may include an implementation of a network environment. The program modules 42 generally perform the functions and / or methods of the embodiments described herein.

[0125] The computer device 12 can also communicate with one or more external devices 14 (e.g., a keyboard, pointing device, display 24, camera, etc.), one or more devices that enable an operator to interact with the computer device 12, and / or any device that enables the computer device 12 to communicate with one or more other computing devices (e.g., a network card, modem, etc.). Such communication can occur via an input / output (I / O) interface 22. Furthermore, the computer device 12 can communicate with one or more networks (e.g., a local area network (LAN)), a wide area network (WAN), and / or a public network (e.g., the Internet) via a network adapter 20. As shown in FIG5 , the network adapter 20 communicates with the other modules of the computer device 12 via a bus 18. It should be understood that, although not shown in FIG5 , other hardware and / or software modules can be used in conjunction with the computer device 12, including but not limited to microcode, device drivers, redundant processing units 16, external disk drive arrays, RAID systems, tape drives, and data backup storage systems 34.

[0126] The processing unit 16 executes various functional applications and data processing by running programs stored in the system memory 28, for example, implementing a lightweight PL / SQL language debugger implementation method provided by an embodiment of the present invention.

[0127] That is, when the processing unit 16 executes the program, it implements the following: when the user performs debugging, it receives information to be debugged input by the user; based on the information to be debugged, it starts the corresponding target statement block to be debugged, and puts the statement block to be debugged into a waiting state for debugging; wherein the types of the statement block to be debugged include stored procedures and anonymous blocks; and it interacts with the database management system through the debugging interface to debug the statement block to be debugged.

[0128] In an embodiment of the present invention, the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a lightweight PL / SQL language debugger implementation method as provided in all embodiments of the present application:

[0129] That is, when the program is executed by the processor, the following is achieved: when the user performs debugging, the program receives the information to be debugged input by the user; according to the information to be debugged, the corresponding target statement block to be debugged is started, and the statement block to be debugged is placed in a waiting state for debugging; wherein the types of the statement block to be debugged include stored procedures and anonymous blocks; and the program interacts with the database management system through the debugging interface to debug the statement block to be debugged.

[0130] Any combination of one or more computer-readable media may be employed. A computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: an electrical connection having one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.

[0131] A computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take a variety of forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0132] The computer program code for performing the operations of the present invention can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code can be executed entirely on the operator's computer, partially on the operator's computer, as a separate software package, partially on the operator's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer can be connected to the operator's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (for example, using an Internet service provider to connect through the Internet). The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the various embodiments can be referenced to each other.

[0133] Although preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they become aware of the basic inventive concepts. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.

[0134] Finally, it should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or terminal device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or terminal device that includes the element.

[0135] The above is a detailed introduction to a lightweight PL / SQL language debugger implementation method provided by the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only intended to help understand the method and core ideas of the present application. At the same time, for those skilled in the art, according to the ideas of the present application, there may be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present application.

Claims

1. A lightweight PL / SQL language debugger implementation method, the method is applied to a relational database management system; characterized in that: The method comprises: When the user is debugging, receiving the debugging information input by the user; Starting the corresponding target statement block to be debugged according to the information to be debugged, and putting the statement block to be debugged in a waiting debugging state; wherein the types of the statement block to be debugged include stored procedures and anonymous blocks; The debugging interface is used to interact with the database management system to debug the statement block to be debugged.

2. The method according to claim 1, characterized in that: The step of receiving the information to be debugged input by the user comprises: Get the debugging information entered by the user on the front-end interface; The information to be called is sent to the database management system.

3. The method according to claim 1, characterized in that The step of starting the debugger and the statement block to be debugged includes: Send a command to the debugging interface through the driver, and call the start interface to start the debugger; According to the information to be debugged, an instruction is sent to the database management system to start the corresponding target statement block to be debugged.

4. The method according to claim 1, characterized in that The step of placing the statement block to be debugged in a waiting debugging state comprises: The statement block to be debugged is stopped at the logical line before execution, waiting for the next instruction.

5. The method according to claim 1, characterized in that: The step of interacting with the database management system through the debugging interface to debug the statement block to be debugged includes: Sending a debugging command to the debugging interface through a driver; Processing the debugging command through the debugging interface to generate a corresponding debugging instruction; Sending the debugging instruction to the debugger through the debugging interface; The debugger executes corresponding operations according to the debugging instructions.

6. The method according to claim 5, characterized in that The steps also include: The debugger sends the return information to the debugging interface; Processing the returned information through the debugging interface to generate a visualization result; The visualization result is returned by the driver.

7. The method according to claim 5, characterized in that The debugging command includes: Add, delete, modify and check breakpoints, control the execution of the statement block to be debugged and query the relevant information of the statement block to be debugged.

8. A lightweight PL / SQL language debugger implementation device, the device is applied to a relational database management system; characterized in that: The device comprises: The module for receiving statements to be debugged is used to receive the information to be debugged input by the user when the user is debugging; A debugging start module, used for starting the corresponding target statement block to be debugged according to the information to be debugged, and putting the statement block to be debugged in a waiting debugging state; wherein the types of the statement block to be debugged include stored procedures and anonymous blocks; The statement block debugging module is used to interact with the database management system through a debugging interface to debug the statement block to be debugged.

9. A computer device, characterized in that: The method comprises a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program implements the method according to any one of claims 1 to 7 when executed by the processor.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • System and method for achieving cross-process and cross-thread debugging in large-data environment

    CN103678135A

  • Method for combining database optimization and program optimization

    CN109871372A

  • SQL statement debugging method, device and equipment

    CN114741279A

  • Debugging method and device for data storage process and electronic equipment

    CN115269419A

  • Techniques for debugging computer programs involving multiple programming languages

    US7107578B1