CN111723002A - Code debugging method and device, electronic equipment and storage medium - Google Patents

Code debugging method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN111723002A
CN111723002A CN202010421044.7A CN202010421044A CN111723002A CN 111723002 A CN111723002 A CN 111723002A CN 202010421044 A CN202010421044 A CN 202010421044A CN 111723002 A CN111723002 A CN 111723002A
Authority
CN
China
Prior art keywords
dynamic library
class
code
debugging
terminal
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
CN202010421044.7A
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.)
Wuba Co Ltd
Original Assignee
Wuba Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuba Co Ltd filed Critical Wuba Co Ltd
Priority to CN202010421044.7A priority Critical patent/CN111723002A/en
Publication of CN111723002A publication Critical patent/CN111723002A/en
Pending legal-status Critical Current

Links

Images

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
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • G06F11/3628Software debugging of optimised code

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The invention provides a code debugging method and device, electronic equipment and a storage medium. The method comprises the following steps: in response to detecting that the code of the target project changes, acquiring a target code file with the changed code; generating a dynamic library based on the object code file; and pushing the dynamic library to debugging equipment corresponding to the target project, so that when an application program corresponding to the target project runs in the debugging equipment, all methods in the class are replaced to an original class corresponding to the class in the debugging equipment aiming at each class contained in the dynamic library, and a change code is enabled to take effect. Therefore, on the basis of compiling and packaging the modified codes to form a dynamic library and loading the dynamic library in real time, the time for modifying the debugging project is greatly reduced and the development efficiency is improved by a method for replacing classes during the running of the application program.

Description

Code debugging method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a code debugging method and apparatus, an electronic device, and a storage medium.
Background
With the popularization of electronic devices such as smart phones, apps (Application programs) based on the electronic devices relate to various industries, and with the increase of App functions, engineering projects during development become larger and larger, and particularly in the project debugging process, after a function code is modified each time, the whole project needs to be compiled and packaged again, and a large amount of time is spent on running and debugging. This not only wastes time and effort of developers, but also slows down the optimization of App functions. Therefore, codes can be separately managed according to functions by using tools such as CocoaPods and the like, each Pod is independently compiled to form a corresponding static library, only the Pod needing to be modified uses source codes during development, and other static libraries are uniformly used, so that the compiling and running speed is greatly improved.
However, although the above-mentioned scheme may also improve the speed of compiling and debugging to a certain extent, the division manner of separating the codes according to functions is still relatively extensive, and the test can be performed only by recompiling, restarting and running the project after the codes are modified each time.
Disclosure of Invention
The embodiment of the invention provides a code debugging method, a code debugging device, electronic equipment and a storage medium, and aims to solve the problem that the existing code debugging process consumes a long time.
In order to solve the technical problem, the invention is realized as follows:
in a first aspect, an embodiment of the present invention provides a code debugging method, including:
in response to detecting that the code of the target project changes, acquiring a target code file with the changed code;
generating a dynamic library based on the object code file;
and pushing the dynamic library to debugging equipment corresponding to the target project, so that when an application program corresponding to the target project runs in the debugging equipment, all methods in the class are replaced to an original class corresponding to the class in the debugging equipment aiming at each class contained in the dynamic library, and a change code is enabled to take effect.
Optionally, the step of pushing the dynamic library to the debugging device corresponding to the target item includes:
in response to the debugging device being a simulator in a terminal for editing code, pushing the dynamic library in the terminal to the debugging device;
responding to the fact that the debugging equipment is entity equipment independent of the terminal, and pushing the dynamic library in the terminal to the debugging equipment through a communication mechanism pre-established between the debugging equipment and the terminal;
after receiving the dynamic library, the debugging device loads the dynamic library into an application program process corresponding to the target project, and analyzes a class name and a method name in the dynamic library based on a symbol table, so that for each class contained in the dynamic library, all methods in the class are replaced into an original class corresponding to the class in the debugging device, and a change code is enabled to take effect.
Optionally, before the step of pushing the dynamic library to the debugging device corresponding to the target item, the method further includes:
and respectively setting and operating socket services in the debugging equipment and the terminal so as to establish a communication mechanism between the debugging equipment and the terminal.
Optionally, the step of generating a dynamic library based on the object code file includes:
recompiling each target code file to obtain a compiled file of each target code file;
and packaging the compiled file by a dynamic library to generate the dynamic library, and signing the dynamic library to verify the signature of the dynamic library.
Optionally, the method of the class includes at least one of a class method and an instance method.
In a second aspect, an embodiment of the present invention provides a code debugging method, including:
acquiring a dynamic library which is pushed by a terminal for editing codes and aims at a target project;
when the application program corresponding to the target project is operated, aiming at each class contained in the dynamic library, replacing all methods in the class to an original class corresponding to the class in the debugging equipment, and enabling a change code to take effect;
and the dynamic library is generated by the terminal based on the changed object code file when detecting that the code of the object project changes.
Optionally, when the application program corresponding to the target item is run, for each class included in the dynamic library, replacing all methods in the class into an original class corresponding to the class in the debugging device, and enabling a change code to take effect includes:
when the application program corresponding to the target project is operated, loading the dynamic library into the application program process corresponding to the target project, and analyzing the class name and the method name in the dynamic library based on the symbol table;
and according to the analysis result, replacing all the methods in the class to the original class corresponding to the class in the debugging equipment aiming at each class contained in the dynamic library so as to enable the change code to take effect.
In a third aspect, an embodiment of the present invention provides a code debugging apparatus, including:
the code file acquisition module is used for responding to the detection that the codes of the target project change and acquiring the target code file with the changed codes;
the dynamic library generating module is used for generating a dynamic library based on the target code file;
and the dynamic library pushing module is used for pushing the dynamic library to debugging equipment corresponding to the target project so as to replace all methods in the class to an original class corresponding to the class in the debugging equipment aiming at each class contained in the dynamic library when the application program corresponding to the target project runs in the debugging equipment, so that the change code is enabled to take effect.
Optionally, the dynamic library pushing module includes:
the first dynamic library pushing sub-module is used for responding to the fact that the debugging equipment is a simulator in a terminal used for editing codes, and pushing the dynamic library in the terminal to the debugging equipment;
a second dynamic library pushing sub-module, configured to, in response to that the debugging device is an entity device independent of the terminal, push the dynamic library in the terminal to the debugging device through a communication mechanism pre-established between the debugging device and the terminal;
after receiving the dynamic library, the debugging device loads the dynamic library into an application program process corresponding to the target project, and analyzes a class name and a method name in the dynamic library based on a symbol table, so that for each class contained in the dynamic library, all methods in the class are replaced into an original class corresponding to the class in the debugging device, and a change code is enabled to take effect.
Optionally, the apparatus further comprises:
and the communication mechanism establishing module is used for setting and operating socket services in the debugging equipment and the terminal respectively so as to establish a communication mechanism between the debugging equipment and the terminal.
Optionally, the dynamic library generation module includes:
the compiling submodule is used for recompiling each target code file to obtain a compiled file of each target code file;
and the dynamic library packaging submodule is used for carrying out dynamic library packaging on the compiled file, generating the dynamic library and signing the dynamic library so as to carry out signature verification on the dynamic library.
Optionally, the method of the class includes at least one of a class method and an instance method.
In a fourth aspect, an embodiment of the present invention provides a code debugging apparatus, including:
the dynamic library acquisition module is used for acquiring a dynamic library which is pushed by a terminal for editing codes and aims at a target project;
a code replacement module, configured to, when the application program corresponding to the target item is run, replace, for each class included in the dynamic library, all methods in the class into an original class corresponding to the class in the debugging device, so that a change code becomes effective;
and the dynamic library is generated by the terminal based on the changed object code file when detecting that the code of the object project changes.
Optionally, the code replacement module includes:
the dynamic library analysis submodule is used for loading the dynamic library into an application program process corresponding to the target project when the application program corresponding to the target project is operated, and analyzing the class name and the method name in the dynamic library based on a symbol table;
and the code replacement sub-module is used for replacing all the methods in the class to the original class corresponding to the class in the debugging equipment according to the analysis result and aiming at each class contained in the dynamic library so as to enable the changed code to take effect.
In a fifth aspect, an embodiment of the present invention additionally provides an electronic device, including: a memory, a processor and a computer program stored on the memory and executable on the processor, the computer program, when executed by the processor, implementing the steps of any one of the code debugging methods according to the first and second aspects.
In a sixth aspect, the present invention provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and the computer program, when executed by a processor, implements the steps of any one of the code debugging methods according to the first aspect and the second aspect.
In the embodiment of the invention, on the basis of compiling and packaging the modified codes to form the dynamic library and loading the dynamic library in real time, the time for modifying and debugging items is greatly reduced and the development efficiency is improved by a method for replacing classes when the application program runs.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained based on these drawings without inventive labor.
FIG. 1 is a flowchart illustrating steps of a method for debugging code according to an embodiment of the present invention;
FIG. 2 is a second flowchart illustrating steps of a code debugging method according to an embodiment of the present invention;
FIG. 3 is a third flowchart illustrating steps of a code debugging method according to an embodiment of the present invention;
FIG. 4 is a flowchart illustrating a fourth step of a method for debugging code according to an embodiment of the present invention;
FIG. 5 is a schematic structural diagram of a code debugging apparatus according to an embodiment of the present invention;
FIG. 6 is a second schematic structural diagram of a code debugging apparatus according to an embodiment of the present invention;
FIG. 7 is a third schematic structural diagram of a code debugging apparatus according to an embodiment of the present invention;
FIG. 8 is a fourth schematic structural diagram of a code debugging apparatus in an embodiment of the present invention;
FIG. 9 is a schematic structural diagram of another code debugging apparatus in the embodiment of the present invention;
fig. 10 is a schematic diagram of a hardware structure of an electronic device in the embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, a flowchart illustrating steps of a code debugging method according to an embodiment of the present invention is shown.
And step 110, responding to the detected change of the code of the target item, and acquiring the target code file with the changed code.
Step 120, generating a dynamic library based on the object code file.
Step 130, pushing the dynamic library to the debugging device corresponding to the target item, so that when the application program corresponding to the target item is run in the debugging device, for each class included in the dynamic library, all methods in the class are replaced to the original class corresponding to the class in the debugging device, and a change code is enabled to take effect.
In the code debugging process, in order to avoid that the application program corresponding to the project needs to be recompiled and restarted under the condition that the source code of the project is revised each time, the time consumption of the code debugging process is long, and the program updating efficiency is influenced. Therefore, in the embodiment of the invention, on the basis of compiling and packaging the modified code to form the dynamic library and loading the dynamic library in real time, the scheme of incrementally compiling the real-time debugging item can be realized by replacing the class during the running of the application program, so that the time cost of code debugging is effectively reduced, and the code debugging efficiency is improved.
In addition, since the same project generally includes a plurality of code files, but only a part of the code files may be edited when debugging the code, in the embodiment of the present invention, monitoring of the source code of the target project may be started, and whether the code of the target project changes or not may be monitored, and if the code of the target project changes is detected, the target code file with the code change may be obtained from each code file of the target project, and then a dynamic library may be generated based on the target code file. Among them, a Dynamic Link Library (DLL), also called a Dynamic Link Library, is a Library containing code and data that can be used by a plurality of programs at the same time, and is not an executable file. Dynamic linking provides a way for a process to call functions that do not belong to its executable code. The executable code for the functions is located in a DLL that contains one or more functions that have been compiled, linked and stored separately from the process in which they are used. DLLs also facilitate sharing of data and resources. Multiple applications can simultaneously access the contents of a single DLL copy in memory. A DLL is a library that contains code and data that can be used by multiple programs simultaneously. Therefore, after the dynamic library is generated, the process of the application program can call any content such as codes and data in the dynamic library at will.
In the embodiment of the present invention, it may be monitored whether the code of the target item changes by any available method, and in a case that the code of the target item changes, an object code file with the code change is obtained from each code file of the target item, and a dynamic library is generated based on the object code file, which is not limited in this embodiment of the present invention.
For example, after the code of the target item is modified and saved in the debugging process of the terminal for editing the code, the corresponding terminal may immediately receive a callback that the code file of the target item is changed, in the callback method, a compiling tool (for example, an Xcode in the iOS operating system) script command carried by the terminal may be used to recompile the target code file (for example, an m file under the iOS system) whose code is changed, and the compiling may generate a corresponding o file.
After the dynamic library is generated, in order to facilitate the effect of the modified code to be checked in the debugging device, the dynamic library may be pushed to the debugging device corresponding to the target item, so that when the application program corresponding to the target item is run in the debugging device, the method of replacing the original class corresponding to the class in the debugging device with each class included in the dynamic library may be used to make the changed code take effect.
For the debugging device, when the application program corresponding to the target item is run, if the pushed dynamic library is not received, the application program can be run according to the installed code file of the debugging device, and if the dynamic library is received, at this time, the class contained in the corresponding application program per se can be understood as the original class of the corresponding application program relative to the class contained in the dynamic library, and if the corresponding application program is in a running state, the original class corresponding to the corresponding class in the corresponding debugging device can be replaced by directly referring to each class contained in the dynamic library. Specifically, for each class included in the dynamic library, all methods in the class may be replaced into the original class corresponding to the class in the debugging device, so as to validate the changed code.
At this time, since the dynamic library can be directly referred to, if the application program is already in the running state, the class in the dynamic library can be directly referred to in the above manner without restarting the corresponding application program, so as to replace the original class corresponding to the class. Moreover, since the dynamic library is generated based on the object code file where the code change exists, the change code can be injected into the currently running application program so that the change code becomes effective.
Referring to fig. 2, in an embodiment of the present invention, the step 130 may further include:
step 131, responding to that the debugging device is a simulator in a terminal for editing codes, and pushing the dynamic library in the terminal to the debugging device.
Step 132, in response to that the debugging device is an entity device independent from the terminal, pushing the dynamic library in the terminal to the debugging device through a communication mechanism pre-established between the debugging device and the terminal; after receiving the dynamic library, the debugging device loads the dynamic library into an application program process corresponding to the target project, and analyzes a class name and a method name in the dynamic library based on a symbol table, so that for each class contained in the dynamic library, all methods in the class are replaced into an original class corresponding to the class in the debugging device, and a change code is enabled to take effect.
In practical applications, the debugging device may be a virtual simulator, or may be a real physical device (e.g., a mobile phone). Moreover, if the debugging device is a simulator, the debugging device can be operated in a terminal (such as a computer and the like) for editing codes, and at the moment, when the dynamic library is pushed, the dynamic library in the terminal can be directly pushed into the simulator serving as the debugging device; if the debugging device is an entity device independent of the terminal, then in order to facilitate the pushing of the dynamic library between the terminal and the entity device, a communication mechanism can be pre-established between the debugging device and the terminal, and the dynamic library in the terminal is pushed to the debugging device through the corresponding communication mechanism.
In the embodiment of the present invention, a communication mechanism may be established between the debugging device and the terminal in any available manner, which is not limited in the embodiment of the present invention. For example, data interfaces for transmitting dynamic libraries may be respectively provided in the debugging device and the terminal, so as to establish a communication mechanism between the debugging device and the terminal. In addition, no matter the debugging equipment is a simulator in the terminal or entity equipment independent of the terminal, in order to avoid that the terminal pushes other data to the debugging equipment by mistake, so that the code debugging is abnormal and the code debugging effect is influenced, a communication mechanism can be pre-established between the terminal and the debugging equipment, so that after the dynamic library is generated, before the pushing library is pushed to the debugging equipment, the terminal can carry out communication interaction with the debugging equipment through the corresponding communication mechanism, and the dynamic library is pushed to the debugging equipment.
For example, after the dynamic library is generated, before the dynamic library is pushed to the debugging device, the terminal may notify the debugging device through a corresponding communication mechanism that the dynamic library is to be pushed to the debugging device, and if a response instruction of the debugging device to the corresponding notification is received, the terminal may push the dynamic library to the debugging device.
In addition, for the case that the debugging device is a simulator in a terminal for editing a code, when pushing a dynamic library, the dynamic library in the terminal may also be pushed to the debugging device through a communication mechanism pre-established between the debugging device and the terminal according to a requirement, which is not limited in the embodiment of the present invention.
After receiving the dynamic library, the debugging device needs to determine the class name and the method name included in the dynamic library respectively in order to replace the class corresponding to the class in the application program based on the class included in the dynamic library, such as the library is essentially a binary format of executable code, so that the dynamic library is generally data in a binary form, at this time, it is difficult to directly know the contents of the class and the method included in the dynamic library, and the address and the like of the class and the method in the dynamic library, and meanwhile, after receiving the dynamic library, the debugging device may load the dynamic library into the currently running App process (and the application program corresponding to the target item) which needs to be debugged by using a corresponding method (e.g., a dlopen function in the iOS) for loading when loading the dynamic library. Moreover, most dynamic libraries need symbol tables to correctly resolve the class names and method names, so that the symbol tables corresponding to the dynamic libraries can be taken to resolve the class names and method names, the corresponding relations between addresses and class names and method names, and the like when the dynamic libraries are loaded.
Therefore, in the embodiment of the present invention, in order to replace a class, after receiving the dynamic library, the debugging device may load the dynamic library into the application process corresponding to the target item, and in the loading process, may analyze information such as a class name and a method name, an address and a correspondence between a class name and a method name in the dynamic library based on a symbol table corresponding to the dynamic library, and after the analysis is completed, for each class included in the dynamic library, obtain a corresponding class, method, and the like from the corresponding dynamic library according to each class and an address of each method in the dynamic library, and further may replace all methods in the class into an original class corresponding to the class in the debugging device, so that a change code is enabled to take effect. At this time, the newly modified code can be directly validated without compiling, running and restarting the application program, and the code debugging efficiency can be effectively improved. For example, for each class contained in the dynamic library, all class methods and instance methods in the class may be replaced into the original class corresponding to the class in the debugging device.
In the embodiment of the present invention, the symbol table corresponding to the dynamic library may be obtained by any available method, which is not limited in the embodiment of the present invention.
In addition, in practical application, one code file may only include the relevant codes of one class, or the relevant codes of multiple classes may be set in one code file, and when editing the codes, only part of the codes in the code file may be edited, that is, only part of the classes in the code file are involved. However, in the embodiment of the present invention, when the dynamic library is generated, the dynamic library is generated based on the target code file of which the code changes in the unit of the code file, and then, when the subsequent class is replaced, the dynamic library is replaced regardless of whether the code corresponding to the class is edited or not.
Therefore, in the embodiment of the present invention, in order to avoid replacing an unchanged class, which affects the code debugging efficiency and causes resource waste, when editing a code, a preset identifier may be set in advance for a class in which the code changes, so that when performing class replacement in a debugging device subsequently, a class in which the code changes may be found in a dynamic library according to the preset identifier, and then, only for a class in which the code changes is dynamically stored, all methods in the corresponding class are replaced into an original class corresponding to the class in the debugging device, so as to enable the changed code to take effect.
Referring to fig. 3, in the embodiment of the present invention, before step 130, the method may further include:
step 140, setting and running socket services in the debugging device and the terminal, respectively, to establish a communication mechanism between the debugging device and the terminal.
As described above, in order to push the dynamic library, a communication mechanism may be established in advance between the debugging device and the terminal. Preferably, in the embodiment of the present invention, the communication mechanism may be established through a socket (socket) service. And setting and running a socket service in the debugging equipment and the terminal respectively to establish a communication mechanism between the debugging equipment and the terminal. Two programs on the network effect the exchange of data via a bidirectional communication link, one end of which is called a socket. At least one pair of port numbers (sockets) is required to establish the network communication connection. socket is essentially A Programming Interface (API).
In the embodiment of the present invention, socket services are respectively set and run in the debugging device and the terminal, so that a bidirectional communication connection can be established between the debugging device and the terminal, and a communication mechanism is realized.
Furthermore, in the embodiment of the present invention, the socket service may be set and run in the debugging device and the terminal in any available manner, and the embodiment of the present invention is not limited thereto. For example, after the terminal for editing the code is started, a socket service may be run in the background of the terminal for communicating with the debugging device, and accordingly, a socket service may also be run in the background of the debugging device for communicating with the terminal.
Referring to fig. 2, in the embodiment of the present invention, the step 120 may further include:
step 121, recompiling each object code file to obtain a compiled file of each object code file;
and step 122, packaging the compiled file by a dynamic library to generate the dynamic library, and signing the dynamic library to verify the signature of the dynamic library.
In practical applications, a code file is a source file written by a programmer in a language supported by a development tool, and is a set of explicit rules for representing information in discrete form by characters, symbols or signal symbols. However, when the application program runs, the code file needs to be converted into a binary form, that is, the data included in the dynamic library should be in a binary form, so that in order to generate the dynamic library, each object code file needs to be recompiled to obtain a compiled file of each object code file, and then all the compiled files can be dynamically packaged to generate the dynamic library.
In the embodiment of the present invention, the object code file may be compiled by any available method, and the embodiment of the present invention is not limited thereto. For example, the object code file (. m file) may be recompiled using a terminal-owned compilation tool (e.g., Xcode in iOS) script command, which generates a corresponding. o file, i.e., a compiled file. And (3) using the o file generated after compiling to perform dynamic library packaging after environment configuration through a compiling tool command (for example, a clean command in the iOS) so as to generate a dynamic library.
In addition, since most development tools perform signature verification on the dynamic library, it is necessary to perform signature on the newly generated dynamic library. In the embodiment of the present invention, the newly generated dynamic library may also be signed by any available method, which is not limited to this embodiment of the present invention. For example, the signature may be performed by a corresponding script command to sign using a compiling tool of the terminal (for example, xode in iOS), and so on.
Optionally, in an embodiment of the present invention, the method in the class includes at least one of a class method and an example method.
The notification compiler that declares a method is preceded by a positive (+) number is denoted as a class method. Class methods belong to class objects rather than instance objects of classes and are typically used to create new instances. This class method used to create new objects can be referred to as a factory method (factymethod). A method is preferably declared a class method if it implements a very general function, such as creating an instance object or accessing some global class data. And the notification compiler that declares a method is negative (-) at the beginning is represented as an instance method; play a role in the specified object instance.
Referring to fig. 3, a flowchart illustrating steps of a code debugging method according to an embodiment of the present invention is shown.
Step 210, acquiring a dynamic library for a target project pushed by a terminal for editing codes;
step 220, when the application program corresponding to the target project is operated, for each class contained in the dynamic library, replacing all methods in the class to an original class corresponding to the class in the debugging equipment, and enabling a change code to take effect; and the dynamic library is generated by the terminal based on the changed object code file when detecting that the code of the object project changes.
Referring to fig. 4, in an embodiment of the present invention, the step 220 may further include:
step 221, when the application program corresponding to the target item is operated, loading the dynamic library into the application program process corresponding to the target item, and analyzing the class name and the method name in the dynamic library based on the symbol table;
step 222, according to the analysis result, for each class included in the dynamic library, replacing all methods in the class to the original class corresponding to the class in the debugging device, so that the change code takes effect.
The specific implementation process of the embodiment shown in fig. 3 and fig. 4 is similar to the process shown in fig. 1 and fig. 2, and reference may be made to the above specifically, which is not described herein again.
Referring to fig. 5, a schematic structural diagram of a code debugging apparatus in an embodiment of the present invention is shown.
The code debugging device of the embodiment of the invention comprises: a code file acquisition module 310, a dynamic library generation module 320, and a dynamic library push module 330.
The functions of the modules and the interaction relationship between the modules are described in detail below.
A code file acquiring module 310, configured to, in response to detecting that a code of the target item changes, acquire an object code file with the changed code;
a dynamic library generation module 320, configured to generate a dynamic library based on the object code file;
a dynamic library pushing module 330, configured to push the dynamic library to a debugging device corresponding to the target item, so that when an application program corresponding to the target item is run in the debugging device, for each class included in the dynamic library, all methods in the class are replaced to an original class corresponding to the class in the debugging device, so that a change code becomes effective.
Referring to fig. 6, in the embodiment of the present invention, the dynamic library pushing module 330 may further include:
a first dynamic library pushing sub-module 331, configured to, in response to that the debugging device is a simulator in a terminal for editing a code, push the dynamic library in the terminal to the debugging device;
a second dynamic library pushing sub-module 332, configured to, in response to that the debugging device is an entity device independent from the terminal, push the dynamic library in the terminal to the debugging device through a communication mechanism pre-established between the debugging device and the terminal; after receiving the dynamic library, the debugging device loads the dynamic library into an application program process corresponding to the target project, and analyzes a class name and a method name in the dynamic library based on a symbol table, so that for each class contained in the dynamic library, all methods in the class are replaced into an original class corresponding to the class in the debugging device, and a change code is enabled to take effect.
Referring to fig. 6, in an embodiment of the present invention, the apparatus may further include:
a communication mechanism establishing module 340, configured to set and run a socket service in the debugging device and the terminal, respectively, so as to establish a communication mechanism between the debugging device and the terminal.
Referring to fig. 6, in the embodiment of the present invention, the dynamic library generating module 320 may further include:
the compiling submodule 321 is configured to recompile each object code file to obtain a compiled file of each object code file;
and the dynamic library packaging submodule 322 is configured to perform dynamic library packaging on the compiled file, generate the dynamic library, and sign the dynamic library, so as to perform signature verification on the dynamic library.
Optionally, in an embodiment of the present invention, the method of the class includes at least one of a class method and an instance method.
Referring to fig. 7, a schematic structural diagram of a code debugging apparatus in an embodiment of the present invention is shown.
The code debugging device of the embodiment of the invention comprises: a dynamic library acquisition module 410 and a code replacement module 420.
The functions of the modules and the interaction relationship between the modules are described in detail below.
A dynamic library acquiring module 410, configured to acquire a dynamic library for a target project pushed by a terminal for editing a code;
a code replacement module 420, configured to, when the application program corresponding to the target item is run, replace, for each class included in the dynamic library, all methods in the class into an original class corresponding to the class in the debugging device, so that a change code becomes effective; and the dynamic library is generated by the terminal based on the changed object code file when detecting that the code of the object project changes.
Referring to fig. 8, in the embodiment of the present invention, the code replacing module 420 may further include:
the dynamic library parsing sub-module 421 is configured to, when the application program corresponding to the target item is run, load the dynamic library into the application program process corresponding to the target item, and parse the class name and the method name in the dynamic library based on the symbol table;
and a code replacement sub-module 422, configured to, according to the analysis result, replace, for each class included in the dynamic library, all the methods in the class into an original class corresponding to the class in the debugging device, so that the changed code becomes effective.
The code debugging device provided by the embodiment of the invention can realize each process realized in the method embodiments of fig. 1 to fig. 4, and is not described again to avoid repetition.
Preferably, an embodiment of the present invention further provides an electronic device, including: the processor, the memory, and the computer program stored in the memory and capable of running on the processor, when being executed by the processor, implement each process of the code debugging method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when being executed by a processor, the computer program implements each process of the code debugging method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here. The computer-readable storage medium may be a Read-only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
Preferably, an embodiment of the present invention further provides a code debugging system, including: any one of the debugging devices and any one of the terminals for editing code as described above.
Fig. 9 is a schematic diagram of a hardware structure of an electronic device implementing various embodiments of the present invention.
The electronic device 500 includes, but is not limited to: a radio frequency unit 501, a network module 502, an audio output unit 503, an input unit 504, a sensor 505, a display unit 506, a user input unit 507, an interface unit 508, a memory 509, a processor 510, and a power supply 511. Those skilled in the art will appreciate that the electronic device configuration shown in fig. 9 does not constitute a limitation of the electronic device, and that the electronic device may include more or fewer components than shown, or some components may be combined, or a different arrangement of components. In the embodiment of the present invention, the electronic device includes, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted terminal, a wearable device, a pedometer, and the like.
It should be understood that, in the embodiment of the present invention, the radio frequency unit 501 may be used for receiving and sending signals during a message sending and receiving process or a call process, and specifically, receives downlink data from a base station and then processes the received downlink data to the processor 510; in addition, the uplink data is transmitted to the base station. In general, radio frequency unit 501 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 501 can also communicate with a network and other devices through a wireless communication system.
The electronic device provides wireless broadband internet access to the user via the network module 502, such as assisting the user in sending and receiving e-mails, browsing web pages, and accessing streaming media.
The audio output unit 503 may convert audio data received by the radio frequency unit 501 or the network module 502 or stored in the memory 509 into an audio signal and output as sound. Also, the audio output unit 503 may also provide audio output related to a specific function performed by the electronic apparatus 500 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 503 includes a speaker, a buzzer, a receiver, and the like.
The input unit 504 is used to receive an audio or video signal. The input Unit 504 may include a Graphics Processing Unit (GPU) 5041 and a microphone 5042, and the Graphics processor 5041 processes image data of a still picture or video obtained by an image capturing device (e.g., a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 506. The image frames processed by the graphic processor 5041 may be stored in the memory 509 (or other storage medium) or transmitted via the radio frequency unit 501 or the network module 502. The microphone 5042 may receive sounds and may be capable of processing such sounds into audio data. The processed audio data may be converted into a format output transmittable to a mobile communication base station via the radio frequency unit 501 in case of the phone call mode.
The electronic device 500 also includes at least one sensor 505, such as light sensors, motion sensors, and other sensors. Specifically, the light sensor includes an ambient light sensor that can adjust the brightness of the display panel 5061 according to the brightness of ambient light, and a proximity sensor that can turn off the display panel 5061 and/or a backlight when the electronic device 500 is moved to the ear. As one type of motion sensor, an accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), detect the magnitude and direction of gravity when stationary, and can be used to identify the posture of an electronic device (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), and vibration identification related functions (such as pedometer, tapping); the sensors 505 may also include fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., which are not described in detail herein.
The display unit 506 is used to display information input by the user or information provided to the user. The Display unit 506 may include a Display panel 5061, and the Display panel 5061 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 507 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the electronic device. Specifically, the user input unit 507 includes a touch panel 5071 and other input devices 5072. Touch panel 5071, also referred to as a touch screen, may collect touch operations by a user on or near it (e.g., operations by a user on or near touch panel 5071 using a finger, stylus, or any suitable object or attachment). The touch panel 5071 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 510, and receives and executes commands sent by the processor 510. In addition, the touch panel 5071 may be implemented in various types such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. In addition to the touch panel 5071, the user input unit 507 may include other input devices 5072. In particular, other input devices 5072 may include, but are not limited to, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described in detail herein.
Further, the touch panel 5071 may be overlaid on the display panel 5061, and when the touch panel 5071 detects a touch operation thereon or nearby, the touch operation is transmitted to the processor 510 to determine the type of the touch event, and then the processor 510 provides a corresponding visual output on the display panel 5061 according to the type of the touch event. Although in fig. 9, the touch panel 5071 and the display panel 5061 are two independent components to implement the input and output functions of the electronic device, in some embodiments, the touch panel 5071 and the display panel 5061 may be integrated to implement the input and output functions of the electronic device, and is not limited herein.
The interface unit 508 is an interface for connecting an external device to the electronic apparatus 500. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 508 may be used to receive input (e.g., data information, power, etc.) from external devices and transmit the received input to one or more elements within the electronic apparatus 500 or may be used to transmit data between the electronic apparatus 500 and external devices.
The memory 509 may be used to store software programs as well as various data. The memory 509 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 509 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device.
The processor 510 is a control center of the electronic device, connects various parts of the whole electronic device by using various interfaces and lines, performs various functions of the electronic device and processes data by running or executing software programs and/or modules stored in the memory 509 and calling data stored in the memory 509, thereby performing overall monitoring of the electronic device. Processor 510 may include one or more processing units; preferably, the processor 510 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into processor 510.
The electronic device 500 may further include a power supply 511 (e.g., a battery) for supplying power to various components, and preferably, the power supply 511 may be logically connected to the processor 510 via a power management system, so as to implement functions of managing charging, discharging, and power consumption via the power management system.
In addition, the electronic device 500 includes some functional modules that are not shown, and are not described in detail herein.
Fig. 10 is a block diagram illustrating an electronic device 600 according to an example embodiment. For example, the electronic device 600 may be provided as a server. Referring to fig. 10, electronic device 600 includes a processing component 622 that further includes one or more processors, and memory resources, represented by memory 632, for storing instructions, such as applications, that are executable by processing component 622. The application programs stored in memory 632 may include one or more modules that each correspond to a set of instructions. Further, the processing component 622 is configured to execute instructions to perform the multimedia resource sharing method described above.
The electronic device 600 may also include a power component 626 configured to perform power management of the apparatus 600, a wired or wireless network interface 650 configured to connect the apparatus 600 to a network, and an input/output (I/O) interface 658. The electronic device 600 may operate based on an operating system stored in the memory 632, such as Windows Server, MacOS XTM, UnixTM, LinuxTM, FreeBSDTM, and so forth.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus 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 apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (16)

1. A method for debugging code, comprising:
in response to detecting that the code of the target project changes, acquiring a target code file with the changed code;
generating a dynamic library based on the object code file;
and pushing the dynamic library to debugging equipment corresponding to the target project, so that when an application program corresponding to the target project runs in the debugging equipment, all methods in the class are replaced to an original class corresponding to the class in the debugging equipment aiming at each class contained in the dynamic library, and a change code is enabled to take effect.
2. The method according to claim 1, wherein the step of pushing the dynamic library to the debugging device corresponding to the target item comprises:
in response to the debugging device being a simulator in a terminal for editing code, pushing the dynamic library in the terminal to the debugging device;
responding to the fact that the debugging equipment is entity equipment independent of the terminal, and pushing the dynamic library in the terminal to the debugging equipment through a communication mechanism pre-established between the debugging equipment and the terminal;
after receiving the dynamic library, the debugging device loads the dynamic library into an application program process corresponding to the target project, and analyzes a class name and a method name in the dynamic library based on a symbol table, so that for each class contained in the dynamic library, all methods in the class are replaced into an original class corresponding to the class in the debugging device, and a change code is enabled to take effect.
3. The method according to claim 2, wherein before the step of pushing the dynamic library to the debugging device corresponding to the target item, the method further comprises:
and respectively setting and operating socket services in the debugging equipment and the terminal so as to establish a communication mechanism between the debugging equipment and the terminal.
4. The method according to any of claims 1-3, wherein the step of generating a dynamic library based on the object code file comprises:
recompiling each target code file to obtain a compiled file of each target code file;
and packaging the compiled file by a dynamic library to generate the dynamic library, and signing the dynamic library to verify the signature of the dynamic library.
5. The method of any of claims 1-3, wherein the class of methods includes at least one of a class method, an instance method.
6. A method for debugging code, comprising:
acquiring a dynamic library which is pushed by a terminal for editing codes and aims at a target project;
when the application program corresponding to the target project is operated, aiming at each class contained in the dynamic library, replacing all methods in the class to an original class corresponding to the class in the debugging equipment, and enabling a change code to take effect;
and the dynamic library is generated by the terminal based on the changed object code file when detecting that the code of the object project changes.
7. The method according to claim 6, wherein the step of, when the application program corresponding to the target item is run, for each class included in the dynamic library, replacing all methods in the class into an original class corresponding to the class in the debugging device, and validating the changed code comprises:
when the application program corresponding to the target project is operated, loading the dynamic library into the application program process corresponding to the target project, and analyzing the class name and the method name in the dynamic library based on the symbol table;
and according to the analysis result, replacing all the methods in the class to the original class corresponding to the class in the debugging equipment aiming at each class contained in the dynamic library so as to enable the change code to take effect.
8. A code debugging apparatus, comprising:
the code file acquisition module is used for responding to the detection that the codes of the target project change and acquiring the target code file with the changed codes;
the dynamic library generating module is used for generating a dynamic library based on the target code file;
and the dynamic library pushing module is used for pushing the dynamic library to debugging equipment corresponding to the target project so as to replace all methods in the class to an original class corresponding to the class in the debugging equipment aiming at each class contained in the dynamic library when the application program corresponding to the target project runs in the debugging equipment, so that the change code is enabled to take effect.
9. The apparatus of claim 8, wherein the dynamic library push module comprises:
the first dynamic library pushing sub-module is used for responding to the fact that the debugging equipment is a simulator in a terminal used for editing codes, and pushing the dynamic library in the terminal to the debugging equipment;
a second dynamic library pushing sub-module, configured to, in response to that the debugging device is an entity device independent of the terminal, push the dynamic library in the terminal to the debugging device through a communication mechanism pre-established between the debugging device and the terminal;
after receiving the dynamic library, the debugging device loads the dynamic library into an application program process corresponding to the target project, and analyzes a class name and a method name in the dynamic library based on a symbol table, so that for each class contained in the dynamic library, all methods in the class are replaced into an original class corresponding to the class in the debugging device, and a change code is enabled to take effect.
10. The apparatus of claim 9, further comprising:
and the communication mechanism establishing module is used for setting and operating socket services in the debugging equipment and the terminal respectively so as to establish a communication mechanism between the debugging equipment and the terminal.
11. The apparatus of any of claims 8-10, wherein the dynamic library generation module comprises:
the compiling submodule is used for recompiling each target code file to obtain a compiled file of each target code file;
and the dynamic library packaging submodule is used for carrying out dynamic library packaging on the compiled file, generating the dynamic library and signing the dynamic library so as to carry out signature verification on the dynamic library.
12. The apparatus of any of claims 8-10, wherein the class of methods comprises at least one of a class method, an instance method.
13. A code debugging apparatus, comprising:
the dynamic library acquisition module is used for acquiring a dynamic library which is pushed by a terminal for editing codes and aims at a target project;
a code replacement module, configured to, when the application program corresponding to the target item is run, replace, for each class included in the dynamic library, all methods in the class into an original class corresponding to the class in the debugging device, so that a change code becomes effective;
and the dynamic library is generated by the terminal based on the changed object code file when detecting that the code of the object project changes.
14. The apparatus of claim 13, wherein the code replacement module comprises:
the dynamic library analysis submodule is used for loading the dynamic library into an application program process corresponding to the target project when the application program corresponding to the target project is operated, and analyzing the class name and the method name in the dynamic library based on a symbol table;
and the code replacement sub-module is used for replacing all the methods in the class to the original class corresponding to the class in the debugging equipment according to the analysis result and aiming at each class contained in the dynamic library so as to enable the changed code to take effect.
15. An electronic device, comprising: memory, processor and computer program stored on the memory and executable on the processor, which computer program, when executed by the processor, implements the steps of the code debugging method of any one of claims 1 to 7.
16. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the code debugging method according to one of claims 1 to 7.
CN202010421044.7A 2020-05-18 2020-05-18 Code debugging method and device, electronic equipment and storage medium Pending CN111723002A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010421044.7A CN111723002A (en) 2020-05-18 2020-05-18 Code debugging method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010421044.7A CN111723002A (en) 2020-05-18 2020-05-18 Code debugging method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN111723002A true CN111723002A (en) 2020-09-29

Family

ID=72564662

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010421044.7A Pending CN111723002A (en) 2020-05-18 2020-05-18 Code debugging method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111723002A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112486836A (en) * 2020-12-09 2021-03-12 北京展心展力信息科技有限公司 Method and device for debugging distribution package, electronic equipment and medium
CN112579470A (en) * 2020-12-29 2021-03-30 中国科学院计算机网络信息中心 Compiling and linking method and system for debugging dynamic software library
CN113127374A (en) * 2021-05-19 2021-07-16 支付宝(杭州)信息技术有限公司 Application program testing method and device applied to iOS equipment
CN113342436A (en) * 2021-06-10 2021-09-03 网易(杭州)网络有限公司 Game translation method and device
CN113760235A (en) * 2021-09-10 2021-12-07 深圳市太美亚电子科技有限公司 BLE development and debugging system and method
CN117130825A (en) * 2023-01-30 2023-11-28 荣耀终端有限公司 Method for preventing abnormal operation of electronic equipment and electronic equipment

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5561800A (en) * 1993-05-19 1996-10-01 Hewlett-Packard Company Method and apparatus for incrementally linking modified routines into software
US6490721B1 (en) * 1998-07-14 2002-12-03 Oc Systems Incorporated Software debugging method and apparatus
CN104391717A (en) * 2014-11-18 2015-03-04 南京大学 Method for dynamically updating code during debugging
CN105630491A (en) * 2015-12-18 2016-06-01 Tcl集团股份有限公司 Method and device for changing functions of program
CN106897080A (en) * 2015-12-18 2017-06-27 北京国双科技有限公司 The processing method and processing device of dynamic link library
CN109460235A (en) * 2018-10-09 2019-03-12 珠海格力电器股份有限公司 Configuration software Compilation Method
CN110059456A (en) * 2019-04-19 2019-07-26 同盾控股有限公司 Code protection method, code protection device, storage medium and electronic equipment

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5561800A (en) * 1993-05-19 1996-10-01 Hewlett-Packard Company Method and apparatus for incrementally linking modified routines into software
US6490721B1 (en) * 1998-07-14 2002-12-03 Oc Systems Incorporated Software debugging method and apparatus
CN104391717A (en) * 2014-11-18 2015-03-04 南京大学 Method for dynamically updating code during debugging
CN105630491A (en) * 2015-12-18 2016-06-01 Tcl集团股份有限公司 Method and device for changing functions of program
CN106897080A (en) * 2015-12-18 2017-06-27 北京国双科技有限公司 The processing method and processing device of dynamic link library
CN109460235A (en) * 2018-10-09 2019-03-12 珠海格力电器股份有限公司 Configuration software Compilation Method
CN110059456A (en) * 2019-04-19 2019-07-26 同盾控股有限公司 Code protection method, code protection device, storage medium and electronic equipment

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112486836A (en) * 2020-12-09 2021-03-12 北京展心展力信息科技有限公司 Method and device for debugging distribution package, electronic equipment and medium
CN112486836B (en) * 2020-12-09 2024-04-09 北京展心展力信息科技有限公司 Method, device, electronic equipment and medium for debugging release package
CN112579470A (en) * 2020-12-29 2021-03-30 中国科学院计算机网络信息中心 Compiling and linking method and system for debugging dynamic software library
CN113127374A (en) * 2021-05-19 2021-07-16 支付宝(杭州)信息技术有限公司 Application program testing method and device applied to iOS equipment
CN113342436A (en) * 2021-06-10 2021-09-03 网易(杭州)网络有限公司 Game translation method and device
CN113342436B (en) * 2021-06-10 2023-03-17 网易(杭州)网络有限公司 Game translation method and device
CN113760235A (en) * 2021-09-10 2021-12-07 深圳市太美亚电子科技有限公司 BLE development and debugging system and method
CN113760235B (en) * 2021-09-10 2023-12-19 深圳市太美亚电子科技有限公司 BLE development and debugging system and method
CN117130825A (en) * 2023-01-30 2023-11-28 荣耀终端有限公司 Method for preventing abnormal operation of electronic equipment and electronic equipment

Similar Documents

Publication Publication Date Title
CN111723002A (en) Code debugging method and device, electronic equipment and storage medium
CN109857403B (en) Page updating method and device, page processing method and device
CN106502703B (en) Function calling method and device
CN112052008B (en) Code checking method, device, computer equipment and computer readable storage medium
CN105404585A (en) Method and apparatus for acquiring code coverage rate
CN108536594B (en) Page testing method and device and storage equipment
CN110196795B (en) Method and related device for detecting running state of mobile terminal application
CN111142930B (en) Installation package file packaging method and device, terminal device and storage medium
CN108073495B (en) Method and device for positioning crash reason of application program
CN109240902B (en) Method and device for acquiring firmware code of electronic equipment
CN104123218A (en) Method, device and system for code coverage test
CN112084747A (en) Resource management method and device, electronic equipment and storage medium
CN106919458B (en) Method and device for Hook target kernel function
CN110765085A (en) Log information writing method, system, storage medium and mobile terminal
CN107861827B (en) Card screen detection method, mobile terminal and computer readable storage medium
CN112667223A (en) Method and device for generating component configuration table, electronic equipment and storage medium
CN108664389B (en) Test method, test device and terminal
CN110032394B (en) Analysis method and device for passive code file and storage medium
CN109145598B (en) Virus detection method and device for script file, terminal and storage medium
CN111562910A (en) Packaging method and related equipment
CN105528220B (en) Method and device for loading dynamic shared object
CN107918583B (en) Script dynamic debugging method, device and terminal
CN115600213A (en) Vulnerability management method, device, medium and equipment based on application program
CN115904367A (en) Front-end scaffold processing method and device, electronic equipment and storage medium
CN112035180A (en) Automatic instance loading method and device, electronic equipment and storage medium

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