CN117076314A - Lightweight PL/SQL language debugger implementation method - Google Patents

Lightweight PL/SQL language debugger implementation method Download PDF

Info

Publication number
CN117076314A
CN117076314A CN202311062387.9A CN202311062387A CN117076314A CN 117076314 A CN117076314 A CN 117076314A CN 202311062387 A CN202311062387 A CN 202311062387A CN 117076314 A CN117076314 A CN 117076314A
Authority
CN
China
Prior art keywords
debugged
debugging
statement block
block
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311062387.9A
Other languages
Chinese (zh)
Inventor
王海峰
徐伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Institute of Computing Sciences
Original Assignee
Shenzhen Institute of Computing Sciences
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Institute of Computing Sciences filed Critical Shenzhen Institute of Computing Sciences
Priority to CN202311062387.9A priority Critical patent/CN117076314A/en
Publication of CN117076314A publication Critical patent/CN117076314A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/242Query formulation
    • G06F16/2433Query languages
    • G06F16/2443Stored procedures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/252Integrating or interfacing systems involving database management systems between a Database Management System and a front-end application

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Mathematical Physics (AREA)
  • Computational Linguistics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application provides a lightweight PL/SQL language debugger implementation method, which is applied to a relational database management system and comprises the following steps: when a user performs debugging, receiving information to be debugged input by the user; starting a corresponding target statement block to be debugged according to the information to be debugged, and enabling the statement block to be debugged to be in a state of waiting to be debugged; the type of the statement block to be debugged comprises a stored process and an anonymous block; and interacting with the database management system through a debugging interface to debug the statement block to be debugged. The PL/SQL sentence block is directly input to start debugging, and the server end is used for debugging PL/SQL sentences independently, so that session switching is not needed, the starting flow and the debugging flow are simplified, the client end and the proxy module are not needed, the memory resource occupation of a debugger is greatly reduced, and meanwhile, the anonymous block can be supported to be debugged.

Description

Lightweight PL/SQL language debugger implementation method
Technical Field
The application relates to the technical field of database debugging, in particular to a lightweight PL/SQL language debugger implementation method.
Background
If a function and an SQL statement are called during execution of the PL/SQL statement, and the returned result is inconsistent with the expected result, whether the PL/SQL statement is written with problems or the called database is in defect needs to be confirmed. However, when PL/SQL logic is complicated, a user cannot directly see the problem in a short time, so that a debugging tool is required to debug the PL/SQL language, and whether the calling result of each statement and each function is correct or not is checked through debugging, so that the problem can be found and solved in a short time. The current main database supporting the storage process is complex to implement about the debugger, has a certain threshold for users, and may not be able to start the debugger in some resource-shortage scenarios.
Disclosure of Invention
In view of the problems described, the present application has been developed to provide a lightweight PL/SQL language debugger implementation method that overcomes or at least partially solves the problems, comprising:
a lightweight PL/SQL language debugger implementation method, the method being applied to a relational database management system, the method comprising:
when a user performs debugging, receiving information to be debugged input by the user;
starting a corresponding target statement block to be debugged according to the information to be debugged, and enabling the statement block to be debugged to be in a state of waiting to be debugged; the type of the statement block to be debugged comprises a stored process and an anonymous block;
and interacting with the database management system through a debugging interface to debug the statement block to be debugged.
Further, the step of receiving the information to be debugged input by the user includes:
acquiring information to be debugged input by a user at a front-end interface;
and sending the information to be tuned to the database management system.
Further, the step of starting the debugger and the statement block to be debugged includes:
sending a command to the debugging interface through driving, and calling a starting interface to start the debugger;
and sending an instruction to the database management system according to the information to be debugged to start a corresponding target statement block to be debugged.
Further, the step of putting the statement block to be debugged in a state of waiting for debugging includes:
stopping the statement block to be debugged on a logic line before execution, and waiting for the next instruction.
Further, the step of interacting with the database management system through a debug interface to debug the statement block to be debugged includes:
transmitting a debugging command to the debugging interface through driving;
processing the debug command through the debug interface to generate a corresponding debug instruction;
sending the debugging instruction to the debugger through the debugging interface;
and the debugger executes corresponding operation according to the debugging instruction.
Further, the steps further include:
the debugger sends the return information to the debugging interface;
processing the returned information through the debugging interface to generate a visual result;
and returning the visualized result through the driving.
Further, the debug command includes:
adding, deleting and modifying the breakpoint, controlling the execution of the statement block to be debugged and inquiring the related information of the statement block to be debugged.
A lightweight PL/SQL language debugger implementation apparatus for use with a relational database management system, the apparatus comprising:
the statement receiving module to be debugged is used for receiving information to be debugged input by a user when the user performs debugging;
the debugging starting module is used for starting a corresponding target statement block to be debugged according to the information to be debugged, and enabling the statement block to be debugged to be in a state of waiting to be debugged; the type of the statement block to be debugged comprises a stored process and an anonymous block;
and the statement block debugging module is used for interacting with the database management system through a debugging interface and debugging the statement block to be debugged.
A computer device comprising a processor, a memory and a computer program stored on the memory and capable of running on the processor, which when executed by the processor, performs the steps of the method of non-invasively calculating fractional flow reserve as described above.
A computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of a method of non-invasively calculating fractional flow reserve as described above.
The application has the following advantages:
in the embodiment of the application, aiming at the problems of large occupied resources and complicated realization in the prior art, the application provides a solution for storing a process and anonymous blocks through single-ended debugging, which comprises the following steps: when a user performs debugging, receiving information to be debugged input by the user; starting a corresponding target statement block to be debugged according to the information to be debugged, and enabling the statement block to be debugged to be in a state of waiting to be debugged; the type of the statement block to be debugged comprises a stored process and an anonymous block; and interacting with the database management system through a debugging interface to debug the statement block to be debugged. The PL/SQL sentence block is directly input to start debugging, and the server end is used for debugging PL/SQL sentences independently, so that session switching is not needed, the starting flow and the debugging flow are simplified, the client end and the proxy module are not needed, the memory resource occupation of a debugger is greatly reduced, and meanwhile, the anonymous block can be supported to be debugged.
Drawings
In order to more clearly illustrate the technical solutions of the present application, the drawings that are needed in the description of the present application will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of steps of a method for implementing a lightweight PL/SQL language debugger according to an embodiment of the present application;
FIG. 2 is a schematic diagram of the overall architecture of a lightweight PL/SQL language debugger according to an embodiment of the present application;
FIG. 3 is a schematic diagram of debugger interaction of a lightweight PL/SQL language debugger implementation method according to an embodiment of the present application;
FIG. 4 is a block diagram of a lightweight PL/SQL language debugger implementation method according to one embodiment of the present application;
fig. 5 is a schematic structural diagram of a computer device according to an embodiment of the present application.
Detailed Description
In order that the manner in which the above recited objects, features and advantages of the present application are obtained will become more readily apparent, a more particular description of the application briefly described above will be rendered by reference to the appended drawings. It will be apparent that the described embodiments are some, but not all, embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The inventors found by analyzing the prior art that: the current main flow database supporting the storage process is complex in realization about the debugger, and usually comprises client end and proxy modules for connection processing and other operations, even some of the main flow database also needs front end interfaces and protocols, so that the starting flow of the debugger and the processing flow of debugging commands are complex, and a tool usually only starts one debugger when debugging PL/SQL, but the special proxy modules are required for processing of multiple client ends and multiple server ends, and the special client ends do intermediate transmission, so that the debugger occupies more database resources, and even the situation that the debugger cannot be started in certain resource shortage scenes can occur.
It should be noted that, in any embodiment of the present application, the technical solution is applied to a relational database management system (Relational Database Management System, RDBMS) which refers to a set of programs including interrelated logic organization and accessing these data.
Referring to FIG. 1, a lightweight PL/SQL language debugger implementation method according to an embodiment of the present application is shown, the method being applied to a relational database management system; the method comprises the following steps:
s110, when a user performs debugging, receiving information to be debugged input by the user;
s120, starting a corresponding target statement block to be debugged according to the information to be debugged, and enabling the statement block to be debugged to be in a state of waiting to be debugged; the type of the statement block to be debugged comprises a stored process and an anonymous block;
s130, interacting with the database management system through a debugging interface, and debugging the statement block to be debugged.
In the embodiment of the application, aiming at the problems of large occupied resources and complicated realization in the prior art, the application provides a solution for storing a process and anonymous blocks through single-ended debugging, which comprises the following steps: when a user performs debugging, receiving information to be debugged input by the user; starting a corresponding target statement block to be debugged according to the information to be debugged, and enabling the statement block to be debugged to be in a state of waiting to be debugged; the type of the statement block to be debugged comprises a stored process and an anonymous block; and interacting with the database management system through a debugging interface to debug the statement block to be debugged. The PL/SQL sentence block is directly input to start debugging, and the server end is used for debugging PL/SQL sentences independently, so that session switching is not needed, the starting flow and the debugging flow are simplified, the client end and the proxy module are not needed, the memory resource occupation of a debugger is greatly reduced, and meanwhile, the anonymous block can be supported to be debugged.
Next, a lightweight PL/SQL language debugger implementation method in the present exemplary embodiment will be further described.
As described in the above step S110, when the user performs debugging, information to be debugged input by the user is received; the types of the statement blocks to be debugged comprise a stored process and an anonymous block.
In one embodiment of the present application, the specific process of "receiving information to be debugged" described in step S110 may be further described in conjunction with the following description.
The method comprises the following steps of obtaining information to be debugged, which is input by a user at a front-end interface;
and sending the information to be tuned to the database management system as follows.
As an example, obtaining information to be debugged, which is input by a user at a front-end interface, and sending the information to be debugged to the database management system through driving, wherein the information to be debugged is a target storage process name or an anonymous block statement, and when the information to be debugged is the anonymous block statement, compiling the anonymous block statement.
It should be noted that anonymous blocks are PL/SQL constructs that are capable of dynamically creating and executing process code, and do not require the code to be stored as database objects.
As described in step S120, a corresponding target statement block to be debugged is started according to the information to be debugged, and the statement block to be debugged is in a state of waiting for debugging.
In an embodiment of the present application, the specific process of "starting the corresponding target statement block to be debugged according to the information to be debugged" in step S120 may be further described in conjunction with the following description.
The method comprises the following steps that a command is sent to a debugging interface through driving, and a starting interface is called to start a debugger;
and sending an instruction to start a corresponding target statement block to be debugged to the database management system according to the information to be debugged.
As an example, by driving to send a command to the debug interface (debugger interface), invoking a start interface to start a debugger, and sending a cmd (command indicator) instruction to the database management system according to the information to be debugged to start a corresponding target statement block to be debugged; specifically, when the information to be debugged is a target storage process name, starting a corresponding target storage process in the database management system according to the target storage process name; and when the information to be debugged is the anonymous block statement, starting the compiled anonymous block statement.
In one embodiment of the present application, the specific process of "putting the statement block to be debugged into the state waiting for debugging" in step S120 may be further described in conjunction with the following description.
And stopping the statement block to be debugged on the logic line before execution, and waiting for the next instruction as described in the following steps.
As an example, when executing on the logic line before the execution of the statement block to be debugged, stopping executing, and monitoring the debug instruction from the debug interface.
And as described in the step S130, the database management system is interacted with through a debug interface to debug the statement block to be debugged.
In an embodiment of the present application, the specific process of "interacting with the database management system through the debug interface to debug the statement block to be debugged" in step S130 may be further described in conjunction with the following description.
Sending a debugging command to the debugging interface through driving as follows;
processing the debug command through the debug interface to generate a corresponding debug instruction as described in the following steps;
the debugging instructions are sent to the debugger through the debugging interface as follows;
as described in the following steps, the debugger executes a corresponding operation according to the debug instruction.
As an example, referring to fig. 2, yashan DB is a database corresponding to the debugger, and the one-to-one connection between the client and the server can be completed by transmitting a corresponding command through the interface layer; when the client is started by other databases, connection with the client is established by the proxy module, and then the inside of the proxy is connected with the server according to a specific method, so that the whole connection process is completed.
As an example, referring to fig. 3, a debug command input by a user at a front end interface is obtained and sent to the debug interface through a driver, the debug command is processed through the debug interface, a corresponding debug instruction is generated, the debug instruction is sent to the debugger through the debug interface, and the debugger executes a corresponding operation according to the content of the debug instruction.
It should be noted that, the debug instruction includes addition, deletion and modification of breakpoints, execution control of statement blocks to be debugged, and related information query of statement blocks to be debugged, which are specifically as follows:
-add break point, store the process name in, line number to set break point, return value is break point number;
-delete breakpoint, the breakpoint number is entered, and the return value is confirmation deletion;
-continuous, continue execution until the next breakpoint, then wait for the next command;
step over, single step execution, directly executing the next row, without loading new process operation;
-show break point, show all break points, return to interface according to the break point number, save the process name of the mistake, show in the line number format;
-show variable, show all local variable information of the current process body, return to the interface display;
-show frames showing the current call stack information, returning to the interface display;
-show resource, obtaining current source code information according to the stored process name, and returning to the interface for display.
It should be noted that, when the user terminates the debugging, the front-end interface sends a termination command to the debugging interface through the driver, and sends a termination command to the debugger through the debugging interface to terminate the debugger.
It should be noted that, the user may click to stop on the graphical interface, or directly use the shortcut key crlt+c to stop the debugger.
In an embodiment of the present application, the specific process of step S130 further includes:
the debugger sends return information to the debug interface as described in the following steps;
processing the returned information through the debug interface to generate a visual result;
the visualization result is returned by the driver, as described in the following steps.
As an example, referring to fig. 2-3, when the above operation generates the return information, the debugger may send the return information to the debug interface, process the return information into a visual result through the debug interface, send the visual result back to the front end interface through driving, and display the visual result on the front end interface, so that the user can conveniently and intuitively obtain the required information.
In one embodiment, there is a stored procedure proc1 defined as follows:
create or replace procedure proc1(a int,b int)is
value1 int;
begin
value1:=a+b;
end;/
the method comprises the steps that ip and a port are input at the front end of a debugger to realize connection with a database, and begin proc1 (1, 2) is written at the front end of the debugger; end; a/(statement); starting a debugging mode, enabling a driver to send a command to debugger interface, calling a start interface to start a debugger, and sending a cmd instruction to a server side; the server side firstly compiles the storage process and stops on a logic line before the storage process is executed, and waits for the next instruction; a breakpoint is marked on line 5 of the process body proc1, namely the end of proc 1; /(V-shaped); 'A'; execution continues until a breakpoint is encountered, line 5 of proc 1; displaying the local variable information of the current stack to obtain a value of 3 of value 1; stopping debugging and closing the debugger. The code of the above process is specifically as follows:
Session1:Pldbg_start(‘begin proc1(1,2);end;/’);
Session1:Pldbg_addbp(‘proc1:5’);
Session1:Pldbg_continue();
Session1:Pldbg_showVars();
Session1:Pldbg_stop();
for the device embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference is made to the description of the method embodiments for relevant points.
Referring to FIG. 4, a lightweight PL/SQL language debugger implementation device according to an embodiment of the present application is shown;
the method specifically comprises the following steps:
the statement to be debugged receiving module 410 is configured to receive information to be debugged input by a user when the user performs debugging;
the debug starting module 420 is configured to start a corresponding target statement block to be debugged according to the information to be debugged, and make the statement block to be debugged in a state of waiting for debugging; the type of the statement block to be debugged comprises a stored process and an anonymous block;
the statement block debugging module 430 is configured to interact with the database management system through a debugging interface, and debug the statement block to be debugged.
In an embodiment of the present application, the statement to be debugged receiving module 410 includes:
the information acquisition sub-module is used for acquiring information to be debugged, which is input by a user at a front-end interface;
and the information transmission sub-module is used for sending the information to be modulated to the database management system.
In one embodiment of the present application, the debug start module 420 includes:
the debugger starting sub-module is used for sending a command to the debugging interface through driving and calling a starting interface to start the debugger;
the statement block to be debugged starting sub-module is used for sending an instruction to the database management system to start a corresponding target statement block to be debugged according to the information to be debugged;
and the statement block waiting sub-module is used for stopping the statement block waiting for debugging on the logic line before execution and waiting for the next instruction.
In one embodiment of the present application, the statement block debug module 430 includes:
the debugging command sending submodule is used for sending a debugging command to the debugging interface through driving;
the debugging command generation sub-module is used for processing the debugging command through the debugging interface to generate a corresponding debugging command;
a debug instruction sending sub-module, configured to send the debug instruction to the debugger through the debug interface;
and the debugging sub-module is used for executing corresponding operation by the debugger according to the debugging instruction.
In one embodiment of the present application, the statement block debug module 430 further includes:
the return information sending sub-module is used for sending the return information to the debugging interface by the debugger;
the visualized result generation sub-module is used for processing the returned information through the debugging interface to generate a visualized result;
and the visualization result returning sub-module is used for returning the visualization result through the drive.
Referring to FIG. 5, a computer device for implementing a lightweight PL/SQL language debugger according to the present application may include the following:
the computer device 12 described above is embodied in the form of a general purpose computing device, and 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, a bus 18 that connects the various system components, including the system memory 28 and the processing units 16.
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 using any of a variety of bus 18 architectures. By way of example, and not limitation, such architectures include Industry Standard Architecture (ISA) bus 18, micro channel architecture (MAC) bus 18, enhanced ISA bus 18, video Electronics Standards Association (VESA) local bus 18, and Peripheral Component Interconnect (PCI) bus 18.
Computer device 12 typically includes a variety of computer system readable media. Such media can be any available media that is accessible by computer device 12 and includes both volatile and nonvolatile media, removable and non-removable media.
The 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. The computer device 12 may further include other removable/non-removable, volatile/nonvolatile computer storage media. By way of example only, storage system 34 may be used to read from or write to non-removable, nonvolatile magnetic media (commonly referred to as a "hard disk drive"). Although not shown in fig. 5, a magnetic disk drive for reading from and writing to a removable non-volatile magnetic disk (e.g., a "floppy disk"), and an optical disk drive for reading from or writing to a removable non-volatile optical disk such as a CD-ROM, DVD-ROM, or other optical media may be provided. In such cases, each drive may be coupled to bus 18 through one or more data medium interfaces. The memory may include at least one program product having a set (e.g., at least one) of program modules 42, the program modules 42 being configured to carry out the functions of embodiments of the application.
A program/utility 40 having a set (at least one) of program modules 42 may be stored in, for example, a memory, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules 42, and program data, each or some combination of which may include an implementation of a network environment. Program modules 42 generally perform the functions and/or methods of the embodiments described herein.
The computer device 12 may also communicate with one or more external devices 14 (e.g., 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 devices (e.g., network card, modem, etc.) that enable the computer device 12 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 22. Moreover, computer device 12 may also communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network such as the Internet, through network adapter 20. As shown in fig. 5, the network adapter 20 communicates with other modules of the computer device 12 via the bus 18. It should be appreciated that although not shown in fig. 5, other hardware and/or software modules may be used in connection with computer device 12, including, but not limited to: microcode, device drivers, redundant processing units 16, external disk drive arrays, RAID systems, tape drives, data backup storage systems 34, and the like.
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 embodiments of the present application.
That is, the processing unit 16 realizes when executing the program: when a user performs debugging, receiving information to be debugged input by the user; starting a corresponding target statement block to be debugged according to the information to be debugged, and enabling the statement block to be debugged to be in a state of waiting to be debugged; the type of the statement block to be debugged comprises a stored process and an anonymous block; and interacting with the database management system through a debugging interface to debug the statement block to be debugged.
In an embodiment of the present application, the present application further provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a lightweight PL/SQL language debugger implementation method as provided in all embodiments of the present application:
that is, the program is implemented when executed by a processor: when a user performs debugging, receiving information to be debugged input by the user; starting a corresponding target statement block to be debugged according to the information to be debugged, and enabling the statement block to be debugged to be in a state of waiting to be debugged; the type of the statement block to be debugged comprises a stored process and an anonymous block; and interacting with the database management system through a debugging interface to debug the statement block to be debugged.
Any combination of one or more computer readable media may be employed. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Computer program code for carrying out operations of the present application may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the operator's computer, partly on the operator's computer, as a stand-alone software package, partly on the operator's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the operator computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (e.g., connected through the internet using an internet service provider). In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described by differences from other embodiments, and identical and similar parts between the embodiments are all enough to be referred to each other.
While preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiment and all such alterations and modifications as fall within the scope of the embodiments of the application.
Finally, it is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or terminal device comprising the element.
The foregoing has described in detail the implementation method of a lightweight PL/SQL language debugger provided by the present application, and specific examples have been applied herein to illustrate the principles and embodiments of the present application, and the above description of the examples is only for aiding in understanding the method and core ideas of the present application; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in accordance with the ideas of the present application, the present description should not be construed as limiting the present application in view of the above.

Claims (10)

1. A lightweight PL/SQL language debugger implementation method is applied to a relational database management system; characterized in that the method comprises:
when a user performs debugging, receiving information to be debugged input by the user;
starting a corresponding target statement block to be debugged according to the information to be debugged, and enabling the statement block to be debugged to be in a state of waiting to be debugged; the type of the statement block to be debugged comprises a stored process and an anonymous block;
and interacting with the database management system through a debugging interface to debug the statement block to be debugged.
2. The method of claim 1, wherein the step of receiving information to be debugged entered by a user comprises:
acquiring information to be debugged input by a user at a front-end interface;
and sending the information to be tuned to the database management system.
3. The method of claim 1, wherein the step of starting the debugger and the statement block to be debugged comprises:
sending a command to the debugging interface through driving, and calling a starting interface to start the debugger;
and sending an instruction to the database management system according to the information to be debugged to start a corresponding target statement block to be debugged.
4. The method of claim 1, wherein the step of placing the statement block to be debugged in a wait for debug state comprises:
stopping the statement block to be debugged on a logic line before execution, and waiting for the next instruction.
5. The method of claim 1, wherein the step of interacting with the database management system via a debug interface to effect debugging of the statement block to be debugged comprises:
transmitting a debugging command to the debugging interface through driving;
processing the debug command through the debug interface to generate a corresponding debug instruction;
sending the debugging instruction to the debugger through the debugging interface;
and the debugger executes corresponding operation according to the debugging instruction.
6. The method of claim 5, wherein the steps further comprise:
the debugger sends the return information to the debugging interface;
processing the returned information through the debugging interface to generate a visual result;
and returning the visualized result through the driving.
7. The method of claim 5, wherein the debug command comprises:
adding, deleting and modifying the breakpoint, controlling the execution of the statement block to be debugged and inquiring the related information of the statement block to be debugged.
8. A lightweight PL/SQL language debugger implementation apparatus, the apparatus being applied to a relational database management system; characterized in that the device comprises:
the statement receiving module to be debugged is used for receiving information to be debugged input by a user when the user performs debugging;
the debugging starting module is used for starting a corresponding target statement block to be debugged according to the information to be debugged, and enabling the statement block to be debugged to be in a state of waiting to be debugged; the type of the statement block to be debugged comprises a stored process and an anonymous block;
and the statement block debugging module is used for interacting with the database management system through a debugging interface and debugging the statement block to be debugged.
9. A computer device comprising a processor, a memory and a computer program stored on the memory and capable of running on the processor, which computer program, when executed by the processor, implements the method of any one of claims 1 to 7.
10. A computer readable storage medium, characterized in that the computer readable storage medium has stored thereon a computer program which, when executed by a processor, implements the method according to any of claims 1 to 7.
CN202311062387.9A 2023-08-22 2023-08-22 Lightweight PL/SQL language debugger implementation method Pending CN117076314A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311062387.9A CN117076314A (en) 2023-08-22 2023-08-22 Lightweight PL/SQL language debugger implementation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311062387.9A CN117076314A (en) 2023-08-22 2023-08-22 Lightweight PL/SQL language debugger implementation method

Publications (1)

Publication Number Publication Date
CN117076314A true CN117076314A (en) 2023-11-17

Family

ID=88716685

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311062387.9A Pending CN117076314A (en) 2023-08-22 2023-08-22 Lightweight PL/SQL language debugger implementation method

Country Status (1)

Country Link
CN (1) CN117076314A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105389251A (en) * 2014-08-28 2016-03-09 Sap欧洲公司 Structured query language debugger
US20160246700A1 (en) * 2015-02-25 2016-08-25 Red Hat, Inc. Service implementation based debugger for service oriented architecture projects
CN109684351A (en) * 2018-12-18 2019-04-26 上海达梦数据库有限公司 A kind of executive plan inspection method, device, server and storage medium
CN110597502A (en) * 2019-08-20 2019-12-20 北京东方国信科技股份有限公司 Single-step debugging method for realizing PL/SQL language based on java
CN114968751A (en) * 2021-02-24 2022-08-30 中国联合网络通信集团有限公司 Program debugging method and program debugging device of code-free development platform

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105389251A (en) * 2014-08-28 2016-03-09 Sap欧洲公司 Structured query language debugger
US20160246700A1 (en) * 2015-02-25 2016-08-25 Red Hat, Inc. Service implementation based debugger for service oriented architecture projects
CN109684351A (en) * 2018-12-18 2019-04-26 上海达梦数据库有限公司 A kind of executive plan inspection method, device, server and storage medium
CN110597502A (en) * 2019-08-20 2019-12-20 北京东方国信科技股份有限公司 Single-step debugging method for realizing PL/SQL language based on java
CN114968751A (en) * 2021-02-24 2022-08-30 中国联合网络通信集团有限公司 Program debugging method and program debugging device of code-free development platform

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
望声宜: ""达梦数据库过程化SQL语言调试***的设计与实现"", 《中国优秀博硕士学位论文全文数据库 信息科技辑》, 31 July 2013 (2013-07-31), pages 1 - 43 *

Similar Documents

Publication Publication Date Title
US8856742B2 (en) Distributed debugging
US20030233634A1 (en) Open debugging environment
US8429632B1 (en) Method and system for debugging merged functions within a program
CN111930489B (en) Task scheduling method, device, equipment and storage medium
US11755744B2 (en) Application programming interface specification inference
CN112346794A (en) Interface calling method, device, equipment and medium
US20210157924A1 (en) Coverage of web appliction analysis
US8826236B2 (en) Step granularity selection in a software debugger
CN112000738A (en) Database connection switching method, device, equipment and medium
CN110659210A (en) Information acquisition method and device, electronic equipment and storage medium
CN112925796A (en) Write consistency control method, device, equipment and storage medium
CN113094236A (en) System data acquisition method and device, computer equipment and storage medium
CN109582318B (en) Processing method and device for Portobuf localization, terminal and storage medium
CN110045952B (en) Code calling method and device
CN112069158A (en) Data restoration method, device, equipment and storage medium
CN117076314A (en) Lightweight PL/SQL language debugger implementation method
CN111176944A (en) Block chain intelligent contract calling record analysis method, device, terminal and storage medium
CN112711602B (en) Method and device for running stored procedure, database system and storage medium
CN113760465A (en) Transaction execution method, device, server, equipment and storage medium
CN115374074A (en) Log processing method and device, storage medium and electronic equipment
CN112114811A (en) Compiling method, device and equipment
CN112948216B (en) Data acquisition method, device, equipment and storage medium
CN111506567B (en) Cross-database cleaning method and device for data, computer equipment and medium
US20220374331A1 (en) Method of debugging applet, electronic device, and storage medium
CN111046430B (en) Data processing method and device, storage medium and electronic equipment

Legal Events

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