CN113867834A - Debugging plug-in calling method and device and computer readable storage medium - Google Patents

Debugging plug-in calling method and device and computer readable storage medium Download PDF

Info

Publication number
CN113867834A
CN113867834A CN202111094789.8A CN202111094789A CN113867834A CN 113867834 A CN113867834 A CN 113867834A CN 202111094789 A CN202111094789 A CN 202111094789A CN 113867834 A CN113867834 A CN 113867834A
Authority
CN
China
Prior art keywords
debugging
plug
target
application
calling
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
CN202111094789.8A
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.)
Beijing Shunda Technology Co ltd
Original Assignee
Beijing Shunda Technology 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 Beijing Shunda Technology Co ltd filed Critical Beijing Shunda Technology Co ltd
Priority to CN202111094789.8A priority Critical patent/CN113867834A/en
Publication of CN113867834A publication Critical patent/CN113867834A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • G06F9/44526Plug-ins; Add-ons
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4482Procedural

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application provides a debugging plug-in calling method, a debugging plug-in calling device and a computer readable storage medium, wherein the method comprises the following steps: packaging the preset debugging module to obtain a packaged debugging plug-in, wherein the debugging module comprises a debugging method for debugging the application needing debugging; registering the debugging plug-in a debugging menu of a debugging center to generate a debugging menu view on a mobile terminal page, wherein the debugging center is positioned in a target application installed in the mobile terminal; and calling the target debugging plug-in response to the click operation on the target debugging plug-in on the debugging menu view. According to the method and the device, other platforms do not need to be connected, the debugging plug-in can be directly called at the mobile terminal, the application debugging efficiency of the existing Android system is improved, in addition, when a new application debugging requirement exists, the new plug-in is directly registered, the source code of the application does not need to be modified, and therefore the stability and the safety of the application cannot be influenced.

Description

Debugging plug-in calling method and device and computer readable storage medium
Technical Field
The application relates to the technical field of computers, in particular to a debugging plug-in calling method and device and a computer readable storage medium.
Background
With the development of various mobile terminal development technologies, especially the continuous iteration of software, the functions and requirements of various applications are diversified. In the development and test stage of the mobile terminal software, a developer, a tester or a product manager needs to debug some information of the application, for example, to obtain a certain request sent by the application, obtain a page jump link, obtain a running log, or need to modify the execution environment of the application.
At present, the following two methods are mainly used for debugging applications in an Android (Android) system: one is to assist in debugging the application by installing computer software. The general method of the debugging method is that the capturing and modifying of the network request information are carried out by opening the capturing software on the computer and simultaneously ensuring that the mobile phone and the computer are connected to the same network; or an Android development environment is installed on the computer, the computer is connected through a data line, and the running log of the application is checked. Some computer software is used for assisting debugging application, a computer is required to be used, specific computer software is installed, learning cost is high, and debugging efficiency is low. The other is that the developer modifies the source code of the application to assist in debugging the application. For example, switching of the application execution environment is achieved by modifying the environment code, or debugging information is output to a log or page for co-viewing or modification by modifying the source code. The modified source codes need to be changed before the application is on-line, so that the debugging efficiency is low due to frequent code modification, and the stability of the application can be influenced, so that certain potential safety hazards are caused.
Therefore, how to improve the application debugging efficiency of the existing Android system is a technical problem which needs to be solved urgently in the technical field of the current computer.
Disclosure of Invention
The application provides a debugging plug-in calling method and device and a computer readable storage medium, and aims to improve application debugging efficiency of an existing Android system.
In one aspect, the present application provides a debugging plug-in calling method, where the method includes:
packaging the preset debugging module to obtain a packaged debugging plug-in, wherein the debugging module comprises a debugging method for debugging the application needing debugging;
registering the debugging plug-in a debugging menu of a debugging center to generate a debugging menu view on a mobile terminal page, wherein the debugging center is positioned in a target application installed in the mobile terminal;
and calling the target debugging plug-in response to the click operation on the target debugging plug-in on the debugging menu view.
In a possible implementation manner of the present application, registering the debug plug-in a debug menu of a debug center to generate a debug menu view on a mobile terminal page includes:
when a target application is started, initializing the debugging center to create a debugging menu;
and registering the debugging plug-in the debugging menu, and binding the debugging menu with a data source of the registered debugging plug-in so as to generate a debugging menu view on a mobile terminal page.
In a possible implementation manner of the present application, the target debugging plug-in includes a server environment switching plug-in, and the invoking the target debugging plug-in response to the click operation on the target debugging plug-in on the debugging menu view includes:
responding to the click operation of the server environment switching plug-in on the debugging menu view;
calling a target server environment list for switching the network environment;
and performing server environment switching operation based on the target server environment list.
In one possible implementation manner of the present application, before invoking the target server environment list for switching the network environment, the method further includes:
initializing a preset first server environment list to obtain an initialized target server environment list;
and performing memory caching and local caching on the target server environment list.
In a possible implementation manner of the present application, the target debugging plug-in includes an exception capture plug-in, and the invoking the target debugging plug-in response to a click operation on the target debugging plug-in on the debugging menu view includes:
responding to a click operation on the debugging menu view for an exception capture plug-in;
calling crash exception information stored in a local file;
analyzing the collapse abnormal information to obtain target collapse abnormal information so as to display the target collapse abnormal information on the mobile terminal.
In a possible implementation manner of the present application, before invoking crash exception information generated by the mobile terminal, the method further includes:
when the target application is started, initializing the abnormal capturing plug-in so as to associate the abnormal capturing plug-in with the target application and an operation platform of the mobile terminal;
if the target application is in an abnormal condition, acquiring abnormal operation data of the target application on the operating platform;
analyzing the abnormal operation data to obtain the crash abnormal information;
and storing the crash exception information to the local file.
In a possible implementation manner of the present application, the target debugging plug-in includes a log viewing plug-in, and the invoking the target debugging plug-in response to the click operation on the debugging menu view for the target debugging plug-in includes:
responding to click operation on the debugging menu view aiming at the log viewing plug-in;
and calling the target log information stored in the local file to display the target log information on the mobile terminal.
In one possible implementation manner of the present application, before invoking the target log information stored in the local file, the method further includes:
initializing the log viewing plug-in to start a preset log capturing thread;
capturing currently applied log information through the log capturing thread;
and exporting the log information to the local file to obtain target log information.
In one possible implementation manner of the present application, the method further includes:
and when the target application is started, generating a floating window entrance for entering the debugging menu view on a display page of the mobile terminal.
In one possible implementation manner of the present application, the method further includes:
and when the target application is started, generating a return data display floating window on a display page of the mobile terminal, wherein the return data is generated by a preset interface interception plug-in.
In another aspect, the present application provides a debugging plug-in calling device, including:
the first packaging unit is used for packaging the preset debugging module to obtain a packaged debugging plug-in, and the debugging module comprises a debugging method for debugging the application needing debugging;
the first registration unit is used for registering the debugging plug-in to a debugging menu of a debugging center so as to generate a debugging menu view on a mobile terminal page, wherein the debugging center is positioned in a target application installed in the mobile terminal;
and the first calling unit is used for responding to the click operation aiming at the target debugging plug-in on the debugging menu view and calling the target debugging plug-in.
In a possible implementation manner of the present application, the first registration unit is specifically configured to:
when a target application is started, initializing the debugging center to create a debugging menu;
and registering the debugging plug-in the debugging menu, and binding the debugging menu with a data source of the registered debugging plug-in so as to generate a debugging menu view on a mobile terminal page.
In a possible implementation manner of the present application, the target debugging plug-in includes a server environment switching plug-in, and the first invoking unit is specifically configured to:
responding to the click operation of the server environment switching plug-in on the debugging menu view;
calling a target server environment list for switching the network environment;
and performing server environment switching operation based on the target server environment list.
In one possible implementation manner of the present application, before invoking the target server environment list for switching the network environment, the apparatus is further configured to:
initializing a preset first server environment list to obtain an initialized target server environment list;
and performing memory caching and local caching on the target server environment list.
In a possible implementation manner of the present application, the target debugging plug-in includes an exception capture plug-in, and the first invoking unit is specifically configured to:
responding to a click operation on the debugging menu view for an exception capture plug-in;
calling crash exception information stored in a local file;
analyzing the collapse abnormal information to obtain target collapse abnormal information so as to display the target collapse abnormal information on the mobile terminal.
The first invoking unit is specifically configured to, before invoking the crash exception information generated by the mobile terminal, further:
when the target application is started, initializing the abnormal capturing plug-in so as to associate the abnormal capturing plug-in with the target application and an operation platform of the mobile terminal;
if the target application is in an abnormal condition, acquiring abnormal operation data of the target application on the operating platform;
analyzing the abnormal operation data to obtain the crash abnormal information;
and storing the crash exception information to the local file.
In a possible implementation manner of the present application, the target debugging plug-in includes a log viewing plug-in, and the first invoking unit is specifically configured to:
responding to click operation on the debugging menu view aiming at the log viewing plug-in;
and calling the target log information stored in the local file to display the target log information on the mobile terminal.
In one possible implementation manner of the present application, before invoking the target log information stored in the local file, the apparatus is further configured to:
initializing the log viewing plug-in to start a preset log capturing thread;
capturing currently applied log information through the log capturing thread;
and exporting the log information to the local file to obtain target log information.
In one possible implementation manner of the present application, the apparatus is further configured to:
and when the target application is started, generating a floating window entrance for entering the debugging menu view on a display page of the mobile terminal.
In one possible implementation manner of the present application, the method is further configured to:
and when the target application is started, generating a return data display floating window on a display page of the mobile terminal, wherein the return data is generated by a preset interface interception plug-in.
In another aspect, the present application further provides a computer device, including:
one or more processors;
a memory; and
one or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the processor to implement the debug plug-in call method.
In another aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored, where the computer program is loaded by a processor to execute the steps in the debugging plug-in calling method.
In the method, a preset debugging module is packaged to obtain a packaged debugging plug-in, wherein the debugging module comprises a debugging method for debugging the application needing debugging; registering the debugging plug-in a debugging menu of a debugging center to generate a debugging menu view on a mobile terminal page, wherein the debugging center is positioned in a target application installed on the mobile terminal; and then responding to the click operation aiming at the target debugging plug-in on the debugging menu view, and calling the target debugging plug-in. Compared with the traditional application debugging, the method and the device have the advantages that other platforms are not required to be connected, the debugging plug-in can be directly called at the mobile terminal, the application debugging efficiency of the existing Android system is improved, in addition, when new application debugging requirements exist, the new plug-in is directly registered, source codes of the applications are not required to be modified, and therefore the stability and the safety of the applications cannot be influenced.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a flowchart illustrating an embodiment of a debug plug-in invocation method provided in an embodiment of the present application;
FIG. 2 is a schematic flow chart diagram illustrating one embodiment of step 102 in an embodiment of the present application;
FIG. 3 is a schematic flow chart diagram illustrating an embodiment of step 103 in the present application;
FIG. 4 is a flowchart illustrating another embodiment of a debugging plug-in calling method provided in the embodiment of the present application;
FIG. 5 is a schematic flow chart of another embodiment of step 103 in the present embodiment;
FIG. 6 is a flowchart illustrating a debugging plug-in calling method provided in an embodiment of the present application according to another embodiment;
FIG. 7 is a schematic flow chart of another embodiment of step 103 in the embodiment of the present application
Fig. 8 is a flowchart illustrating another embodiment of a debugging plug-in calling method provided in the embodiment of the present application.
FIG. 9 is a schematic structural diagram of an embodiment of a debugging plug-in calling device provided in the embodiment of the present application;
fig. 10 is a schematic structural diagram of an embodiment of a computer device provided in an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. 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 application.
In the description of the present application, it is to be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", and the like indicate orientations or positional relationships based on those shown in the drawings, and are used merely for convenience of description and for simplicity of description, and do not indicate or imply that the referenced device or element must have a particular orientation, be constructed in a particular orientation, and be operated, and thus should not be considered as limiting the present application. Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, features defined as "first", "second", may explicitly or implicitly include one or more of the described features. In the description of the present application, "a plurality" means two or more unless specifically limited otherwise.
In this application, the word "exemplary" is used to mean "serving as an example, instance, or illustration. Any embodiment described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments. The following description is presented to enable any person skilled in the art to make and use the application. In the following description, details are set forth for the purpose of explanation. It will be apparent to one of ordinary skill in the art that the present application may be practiced without these specific details. In other instances, well-known structures and processes are not set forth in detail in order to avoid obscuring the description of the present application with unnecessary detail. Thus, the present application is not intended to be limited to the embodiments shown, but is to be accorded the widest scope consistent with the principles and features disclosed herein.
The embodiments of the present application provide a debugging plug-in calling method, a debugging plug-in calling device, and a readable storage medium, which are described in detail below.
Next, a debugging plug-in calling method provided in the embodiment of the present application is introduced.
In the embodiment of the debugging plug-in calling method of the embodiment of the present application, a debugging plug-in calling device is used as an execution subject, and for simplicity and convenience of description, the execution subject will be omitted in subsequent method embodiments, and the debugging plug-in calling device is applied to a computer device, and the method includes: packaging a preset debugging module to obtain a packaged debugging plug-in, wherein the debugging module comprises a debugging method for debugging the application needing debugging; registering the debugging plug-in a debugging menu of a debugging center to generate a debugging menu view on a mobile terminal page, wherein the debugging center is positioned in a target application installed in the mobile terminal; and calling the target debugging plug-in response to the click operation aiming at the target debugging plug-in on the debugging menu view.
Referring to fig. 1 to 10, fig. 1 is a schematic flowchart illustrating an embodiment of a debugging plug-in calling method provided in an embodiment of the present application, where the debugging plug-in calling method specifically includes steps 101 to 104:
101. and packaging the preset debugging module to obtain the packaged debugging plug-in.
The debugging module comprises a debugging method for debugging the application needing debugging.
The number of the debugging modules can be one or more, and when the number of the debugging modules is multiple, the debugging modules are independent of each other and independent of each other. The method comprises the steps of establishing a plurality of dependency files respectively, enabling the dependency files to correspond to a plurality of debugging modules respectively, enabling the dependency files to provide support for operation of the corresponding debugging modules, integrating the debugging modules on a service layer, and integrating the dependency files on a bottom layer library (a dependency library).
It should be noted that the debugging method may be a method for automatically debugging an application that needs to be debugged, or may be a method for debugging the debugging process in an auxiliary manner, for example, when a target application crashes during a use process, the debugging module may be an exception capture module, and the exception capture module is only used for capturing crash exception information occurring in the application corresponding to the target application and storing the crash exception information in a local place, so as to provide an auxiliary debugging method for a later-stage debugging worker during the debugging process.
It should be noted that, a target application, that is, an object to be integrated by a debugging plug-in, a mobile terminal may have multiple applications, and in the present application, when an application integrated with the debugging plug-in is the target application.
Under the background of rapid development of the mobile internet, application software on an Android platform presents a vigorous development situation, a large number of users are attracted, Android becomes a mobile terminal operating system with the largest number of users, and for Android applications, functional modules borne by one application are often numerous.
The plug-in is a special form of modular idea, and in the evolution of complex systems, the plug-in module is a special framework after dynamic equalization. The plug-in module development is an architectural model in the development of the application program, and is not a certain agreed universal technical standard, and the plug-in development project can be regarded as being composed of a plurality of logically independent plug-in modules and a host program loading the independent modules.
102. And registering the debugging plug-in a debugging menu of a debugging center so as to generate a debugging menu view on a mobile terminal page.
The debugging center is located in a target application installed on the mobile terminal.
The debugging plug-in the application can be a page of the application and also can be a dialog box of the application. All debugging methods of the required application are packaged and registered in the form of the plug-in, so that the plug-in provides different debugging functions in a visual form. For example, a plug-in for debugging a network request issued within an application, a plug-in for obtaining a page jump link, a plug-in for obtaining a log, or a plug-in for modifying an application execution environment, etc.
103. And calling the target debugging plug-in response to the click operation aiming at the target debugging plug-in on the debugging menu view.
It should be noted that the service layer needs to access the corresponding APP, and the service layer APP that needs to call the debugging plug-in only needs to access the debugging plug-in as a third-party library is accessed, and does not need to make redundant configuration, and the intrusiveness to the original code of the APP is extremely low.
In the method, a preset debugging module is packaged to obtain a packaged debugging plug-in, wherein the debugging module comprises a debugging method for debugging the application needing debugging; registering the debugging plug-in a debugging menu of a debugging center to generate a debugging menu view on a mobile terminal page, wherein the debugging center is positioned in a target application installed on the mobile terminal; and then responding to the click operation aiming at the target debugging plug-in on the debugging menu view, and calling the target debugging plug-in. Compared with the traditional application debugging, the method and the device have the advantages that other platforms are not required to be connected, the debugging plug-in can be directly called at the mobile terminal, the application debugging efficiency of the existing Android system is improved, in addition, when new application debugging requirements exist, the new plug-in is directly registered, source codes of the applications are not required to be modified, and therefore the stability and the safety of the applications cannot be influenced.
In the embodiment of the present application, as shown in fig. 2, step 102, registering a debugging plug-in a debugging menu of a debugging center to generate a debugging menu view on a mobile terminal page, specifically includes step 201 and step 202:
201. when the target application starts, the debugging center is initialized to create a debugging menu.
202. And registering the debugging plug-in the debugging menu, and binding the debugging menu with the data source of the registered debugging plug-in so as to generate a debugging menu view on the page of the mobile terminal.
In step 201 and step 202, when the debug menu is bound with the registered data source of the debug plug-in, a debug menu view is generated on the mobile terminal page, and an icon of each debug plug-in is formed in the debug menu view.
In the embodiment of the present application, as shown in fig. 3, the target debugging plug-in includes a server environment switching plug-in, and step 103, in response to a click operation on the debugging menu view for the target debugging plug-in, the method invokes the target debugging plug-in, which specifically includes the steps of:
301. responding to the click operation of the plug-in for the server environment switching on the debugging menu view.
302. And calling a target server environment list for switching the network environment.
303. And performing server environment switching operation based on the target server environment list.
In steps 301 to 303, the server environment list corresponds to hosts file, the hosts file is used for local DNS service, and is written in a text file in the format of IP domain name, and hosts is a system file without extension name, and can be opened by using a notepad or other tools, and its function is to establish an association "database" between some commonly used website domain names and their corresponding IP addresses, when a user inputs a website to be logged in a browser, the system will automatically find the corresponding IP address from the hosts file first, once found, the system will immediately open the corresponding web page, if not found, the system will submit the website to the DNS domain name resolution server to perform IP address resolution.
In this embodiment of the present application, as shown in fig. 4, before invoking a target server environment list for switching a network environment, the method further includes steps 401 to 402:
401. initializing a preset first server environment list to obtain an initialized target server environment list.
402. And performing memory caching and local caching on the target server environment list.
In steps 401 and 402, initializing a preset first server environment list to set a server environment list required by a user in the preset first server environment list to obtain an initialized target server environment list. The preset first server environment list may be a server environment list that has been pre-embedded from the code.
By carrying out memory caching and local caching on the target server environment list, a user can conveniently and directly call the target server environment list through the mobile terminal. Here, the local cache refers to a portion of space that is formed by dividing the physical memory local to the client for buffering the data written back to the server by the client, and is generally called local write back because of its outstanding contribution in write back. The local cache concept is first appeared in the field of diskless, and is widely applied as a core technology of a PXD diskless. The local cache is used for writing the data written back by the client into the server hard disk firstly, but writing the data written back into the local write-back cache firstly, and writing the data back to the server when the cache space reaches a certain threshold value. After the local write-back cache function is provided, the read-write pressure of the server and the network load can be greatly reduced.
In the embodiment of the present application, as shown in fig. 5, the target debugging plug-in includes an exception capture plug-in, and step 103, in response to a click operation on the debugging menu view for the target debugging plug-in, the target debugging plug-in is called, which specifically includes steps 501 to 503:
501. and responding to the click operation aiming at the abnormal capture plug-in on the debugging menu view.
502. And calling the crash exception information stored in the local file.
503. And analyzing the collapse abnormal information to obtain the target collapse abnormal information so as to display the target collapse abnormal information on the mobile terminal.
In steps 501 to 503, if the target application on the mobile terminal is flashed back, the corresponding operating system generates a crash report, also called a crash log, that is, crash exception information in the present application, which can be stored on the mobile terminal. There is a lot of useful information on crash exception information, including what the application is flashed down. Typically, there is complete stack trace information for each executing thread on top.
In the embodiment of the present application, as shown in fig. 6, before invoking crash exception information generated by the mobile terminal, the method further includes steps 601 to 604:
601. when the target application is started, initializing the abnormal capturing plug-in so as to associate the abnormal capturing plug-in with the target application and an operation platform of the mobile terminal.
602. And if the target application has an abnormal condition, acquiring abnormal operation data of the target application on the operating platform.
603. And analyzing the abnormal operation data to obtain crash abnormal information.
604. And storing the crash exception information into a local file.
In steps 601 to 604, the crash exception information stored in the local file may be used for subsequent debugging personnel to review, so as to determine the cause of the crash of the target application according to the crash exception information, thereby greatly saving the debugging work of the debugging personnel.
In the embodiment of the present application, as shown in fig. 7, the target debugging plug-in includes a log viewing plug-in, and step 103, in response to a click operation on the debugging menu view for the target debugging plug-in, the target debugging plug-in is called, which specifically includes step 701 and step 702:
701. and responding to the click operation aiming at the log viewing plug-in on the debugging menu view.
702. And calling the target log information stored in the local file so as to display the target log information on the mobile terminal.
In this embodiment of the present application, as shown in fig. 8, before invoking target log information stored in a local file, the method further includes steps 801 to 803:
801. initializing the log viewing plug-in to start a preset log grabbing thread.
802. And capturing the currently applied log information through the log capturing thread.
803. And exporting the log information to a local file to obtain target log information.
In steps 801 to 803, the network device, system and service program, etc. will generate an event record called log, i.e. log information, during operation; each row of the log records the description of the date, time, user and action.
In an embodiment of the present application, the method further includes: and when the target application is started, generating a floating window entrance for entering the debugging menu view on a display page of the mobile terminal.
In an embodiment of the present application, the method further includes: when the target application is started, a return data display floating window is generated on a display page of the mobile terminal, and the return data is generated by a preset interface interception plug-in.
In order to better implement the debugging plug-in calling method in the embodiment of the present application, on the basis of the debugging plug-in calling method, the embodiment of the present application further provides a debugging plug-in calling device, as shown in fig. 9, the debugging plug-in calling device 900 includes a first packaging unit 901, a first registration unit 902, and a first calling unit 903:
the first packaging unit 901 is configured to package a preset debugging module to obtain a packaged debugging plug-in, where the debugging module includes a debugging method for debugging an application that needs to be debugged.
A first registering unit 902, configured to register the debug plug-in a debug menu of a debug center to generate a debug menu view on a page of the mobile terminal, where the debug center is located in a target application installed in the mobile terminal.
A first calling unit 903, configured to call the target debugging plug-in response to a click operation on the debugging menu view for the target debugging plug-in.
In a possible implementation manner of the present application, the first registration unit 902 is specifically configured to:
when the target application starts, the debugging center is initialized to create a debugging menu.
And registering the debugging plug-in the debugging menu, and binding the debugging menu with the data source of the registered debugging plug-in so as to generate a debugging menu view on the page of the mobile terminal.
In a possible implementation manner of the present application, the target debugging plug-in includes a server environment switching plug-in, and the first invoking unit 903 is specifically configured to:
responding to the click operation of the plug-in for the server environment switching on the debugging menu view.
And calling a target server environment list for switching the network environment.
And performing server environment switching operation based on the target server environment list.
In one possible implementation manner of the present application, before invoking the target server environment list for switching the network environment, the apparatus is further configured to:
initializing a preset first server environment list to obtain an initialized target server environment list.
And performing memory caching and local caching on the target server environment list.
In a possible implementation manner of the present application, the target debugging plug-in includes an exception capture plug-in, and the first invoking unit 903 is specifically configured to:
and responding to the click operation aiming at the abnormal capture plug-in on the debugging menu view.
And calling the crash exception information stored in the local file.
And analyzing the collapse abnormal information to obtain the target collapse abnormal information so as to display the target collapse abnormal information on the mobile terminal.
The first invoking unit is specifically configured to, before invoking the crash exception information generated by the mobile terminal, further:
when the target application is started, initializing the abnormal capturing plug-in so as to associate the abnormal capturing plug-in with the target application and an operation platform of the mobile terminal.
And if the target application has an abnormal condition, acquiring abnormal operation data of the target application on the operating platform.
And analyzing the abnormal operation data to obtain crash abnormal information.
And storing the crash exception information into a local file.
In a possible implementation manner of the present application, the target debugging plug-in includes a log viewing plug-in, and the first invoking unit 903 is specifically configured to:
and responding to the click operation aiming at the log viewing plug-in on the debugging menu view.
And calling the target log information stored in the local file so as to display the target log information on the mobile terminal.
In one possible implementation manner of the present application, before invoking the target log information stored in the local file, the apparatus is further configured to:
initializing the log viewing plug-in to start a preset log grabbing thread.
And capturing the currently applied log information through the log capturing thread.
And exporting the log information to a local file to obtain target log information.
In one possible implementation manner of the present application, the apparatus is further configured to:
and when the target application is started, generating a floating window entrance for entering the debugging menu view on a display page of the mobile terminal.
In one possible implementation manner of the present application, the method is further configured to:
when the target application is started, a return data display floating window is generated on a display page of the mobile terminal, and the return data is generated by a preset interface interception plug-in.
In the present application, a preset debugging module is first packaged by a first packaging unit 901 to obtain a packaged debugging plug-in, where the debugging module includes a debugging method for debugging an application to be debugged; then, the first registration unit 902 registers the debugging plug-in to the debugging menu of the debugging center to generate a debugging menu view on the page of the mobile terminal, and the debugging center is located in the target application installed in the mobile terminal; then, the first calling unit 903 calls the target debugging plug-in response to the click operation on the target debugging plug-in on the debugging menu view. Compared with the traditional application debugging, the method and the device have the advantages that other platforms are not required to be connected, the debugging plug-in can be directly called at the mobile terminal, the application debugging efficiency of the existing Android system is improved, in addition, when new application debugging requirements exist, the new plug-in is directly registered, source codes of the applications are not required to be modified, and therefore the stability and the safety of the applications cannot be influenced.
In addition to the method and apparatus for invoking a debug plug-in described above, an embodiment of the present application further provides a computer device, which integrates any one of the debug plug-in invoking apparatuses provided in the embodiments of the present application, where the computer device includes:
one or more processors;
a memory; and
one or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the processor to perform the operations of any of the methods described in any of the above-described debug plug-in call method embodiments.
The embodiment of the present application further provides a computer device, which integrates any one of the debugging plug-in calling apparatuses provided in the embodiments of the present application. Referring to fig. 10, fig. 10 is a schematic structural diagram of an embodiment of a computer device according to an embodiment of the present application.
Fig. 10 is a schematic diagram illustrating a structure of a debug plug-in calling apparatus according to an embodiment of the present application, specifically:
the debugging plug-in calling device may include components such as a processor 101 of one or more processing cores, a storage unit 102 of one or more computer-readable storage media, a power supply 103, and an input unit 104. Those skilled in the art will appreciate that the debug plug-in invocation means architecture shown in fig. 1 does not constitute a limitation on the debug plug-in invocation means, and may include more or fewer components than shown, or some components in combination, or a different arrangement of components. Wherein:
the processor 101 is a control center of the debugging plug-in calling device, connects various parts of the whole debugging plug-in calling device by using various interfaces and lines, and executes various functions and processes data of the debugging plug-in calling device by running or executing software programs and/or modules stored in the storage unit 102 and calling data stored in the storage unit 102, thereby performing overall monitoring of the debugging plug-in calling device. Optionally, processor 101 may include one or more processing cores; preferably, the processor 101 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 the processor 101.
The storage unit 102 may be used to store software programs and modules, and the processor 101 executes various functional applications and data processing by operating the software programs and modules stored in the storage unit 102. The storage unit 102 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 created according to the use of the debug plug-in calling apparatus, and the like. In addition, the storage unit 102 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. Accordingly, the memory unit 102 may also include a memory controller to provide the processor 101 with access to the memory unit 102.
The debugging plug-in calling device further comprises a power supply 103 for supplying power to each component, preferably, the power supply 103 can be logically connected with the processor 101 through a power management system, so that functions of charging, discharging, power consumption management and the like can be managed through the power management system. The power supply 103 may also include any component of one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
The debugging plug-in invoking device may further comprise an input unit 104, and the input unit 104 may be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
Although not shown, the debugging plug-in calling device may further include a display unit and the like, which are not described in detail herein. Specifically, in this embodiment of the present application, the processor 101 in the debugging plug-in calling device loads the executable file corresponding to the process of one or more application programs into the storage unit 102 according to the following instructions, and the processor 101 runs the application programs stored in the storage unit 102, thereby implementing various functions as follows:
packaging the preset debugging module to obtain a packaged debugging plug-in, wherein the debugging module comprises a debugging method for debugging the application needing debugging; registering the debugging plug-in a debugging menu of a debugging center to generate a debugging menu view on a mobile terminal page, wherein the debugging center is positioned in a target application installed in the mobile terminal; and calling the target debugging plug-in response to the click operation on the target debugging plug-in on the debugging menu view.
In the method, a preset debugging module is packaged to obtain a packaged debugging plug-in, wherein the debugging module comprises a debugging method for debugging the application needing debugging; registering the debugging plug-in a debugging menu of a debugging center to generate a debugging menu view on a mobile terminal page, wherein the debugging center is positioned in a target application installed on the mobile terminal; and then responding to the click operation aiming at the target debugging plug-in on the debugging menu view, and calling the target debugging plug-in. Compared with the traditional application debugging, the method and the device have the advantages that other platforms are not required to be connected, the debugging plug-in can be directly called at the mobile terminal, the application debugging efficiency of the existing Android system is improved, in addition, when new application debugging requirements exist, the new plug-in is directly registered, source codes of the applications are not required to be modified, and therefore the stability and the safety of the applications cannot be influenced.
To this end, an embodiment of the present application provides a computer-readable storage medium, which may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like. The computer readable storage medium has stored therein a plurality of instructions that can be loaded by a processor to perform the steps of any of the debug plug-in invocation methods provided by the embodiments of the present application. For example, the instructions may perform the steps of:
packaging the preset debugging module to obtain a packaged debugging plug-in, wherein the debugging module comprises a debugging method for debugging the application needing debugging; registering the debugging plug-in a debugging menu of a debugging center to generate a debugging menu view on a mobile terminal page, wherein the debugging center is positioned in a target application installed in the mobile terminal; and calling the target debugging plug-in response to the click operation on the target debugging plug-in on the debugging menu view.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
The method, the apparatus, and the readable storage medium for invoking the debug plug-in provided by the embodiments of the present application are described in detail above, and a specific example is applied in the present application to explain the principle and the implementation of the present application, and the description of the above embodiments is only used to help understanding the method and the core idea of the present application; meanwhile, for those skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (13)

1. A debugging plug-in calling method is characterized by comprising the following steps:
packaging the preset debugging module to obtain a packaged debugging plug-in, wherein the debugging module comprises a debugging method for debugging the application needing debugging;
registering the debugging plug-in a debugging menu of a debugging center to generate a debugging menu view on a mobile terminal page, wherein the debugging center is positioned in a target application installed in the mobile terminal;
and calling the target debugging plug-in response to the click operation on the target debugging plug-in on the debugging menu view.
2. The debugging plug-in calling method according to claim 1, wherein the registering the debugging plug-in into the debugging menu of the debugging center to generate the debugging menu view on the mobile terminal page comprises:
when a target application is started, initializing the debugging center to create a debugging menu;
and registering the debugging plug-in the debugging menu, and binding the debugging menu with a data source of the registered debugging plug-in so as to generate a debugging menu view on a mobile terminal page.
3. The debugging plug-in calling method according to claim 1, wherein the target debugging plug-in comprises a server environment switching plug-in, and said calling the target debugging plug-in response to a click operation on the target debugging plug-in on the debugging menu view comprises:
responding to the click operation of the server environment switching plug-in on the debugging menu view;
calling a target server environment list for switching the network environment;
and performing server environment switching operation based on the target server environment list.
4. The debug plug-in invoking method according to claim 3, wherein before invoking the list of target server environments for switching the network environment, said method further comprises:
initializing a preset first server environment list to obtain an initialized target server environment list;
and performing memory caching and local caching on the target server environment list.
5. The debugging plug-in calling method according to claim 1, wherein the target debugging plug-in comprises an exception capture plug-in, and said calling the target debugging plug-in response to a click operation on the debugging menu view for the target debugging plug-in comprises:
responding to a click operation on the debugging menu view for an exception capture plug-in;
calling crash exception information stored in a local file;
analyzing the collapse abnormal information to obtain target collapse abnormal information so as to display the target collapse abnormal information on the mobile terminal.
6. The debug plug-in invocation method according to claim 5, wherein prior to invoking crash exception information generated by said mobile terminal, said method further comprises:
when the target application is started, initializing the abnormal capturing plug-in so as to associate the abnormal capturing plug-in with the target application and an operation platform of the mobile terminal;
if the target application is in an abnormal condition, acquiring abnormal operation data of the target application on the operating platform;
analyzing the abnormal operation data to obtain the crash abnormal information;
and storing the crash exception information to the local file.
7. The debugging plug-in calling method according to claim 1, wherein the target debugging plug-in comprises a log viewing plug-in, and the calling the target debugging plug-in response to a click operation on the debugging menu view for the target debugging plug-in comprises:
responding to click operation on the debugging menu view aiming at the log viewing plug-in;
and calling the target log information stored in the local file to display the target log information on the mobile terminal.
8. The debug plug-in invocation method of claim 7, wherein prior to invoking the target log information stored into the local file, said method further comprises:
initializing the log viewing plug-in to start a preset log capturing thread;
capturing currently applied log information through the log capturing thread;
and exporting the log information to the local file to obtain target log information.
9. The debug plug-in invocation method according to claim 1, wherein said method further comprises:
and when the target application is started, generating a floating window entrance for entering the debugging menu view on a display page of the mobile terminal.
10. The debug plug-in invocation method according to claim 1, wherein said method further comprises:
and when the target application is started, generating a return data display floating window on a display page of the mobile terminal, wherein the return data is generated by a preset interface interception plug-in.
11. A debug plug-in invocation apparatus, said apparatus comprising:
the first packaging unit is used for packaging the preset debugging module to obtain a packaged debugging plug-in, and the debugging module comprises a debugging method for debugging the application needing debugging;
the first registration unit is used for registering the debugging plug-in to a debugging menu of a debugging center so as to generate a debugging menu view on a mobile terminal page, wherein the debugging center is positioned in a target application installed in the mobile terminal;
and the first calling unit is used for responding to the click operation aiming at the target debugging plug-in on the debugging menu view and calling the target debugging plug-in.
12. A computer device, characterized in that the computer device comprises:
one or more processors;
a memory; and
one or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the processor to implement the debug plug-in call method of any of claims 1 to 10.
13. A computer-readable storage medium, having stored thereon a computer program which is loaded by a processor to perform the steps in the debug plug-in call method of any of claims 1 to 10.
CN202111094789.8A 2021-09-17 2021-09-17 Debugging plug-in calling method and device and computer readable storage medium Pending CN113867834A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111094789.8A CN113867834A (en) 2021-09-17 2021-09-17 Debugging plug-in calling method and device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111094789.8A CN113867834A (en) 2021-09-17 2021-09-17 Debugging plug-in calling method and device and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN113867834A true CN113867834A (en) 2021-12-31

Family

ID=78996563

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111094789.8A Pending CN113867834A (en) 2021-09-17 2021-09-17 Debugging plug-in calling method and device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN113867834A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114338813A (en) * 2022-01-07 2022-04-12 挂号网(杭州)科技有限公司 Network request display method and device, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107729238A (en) * 2017-10-09 2018-02-23 郑州云海信息技术有限公司 A kind of plug-in unit adjustment method, system, device and computer-readable recording medium
CN111008132A (en) * 2019-11-29 2020-04-14 浙江大搜车软件技术有限公司 Application debugging method and device for Android system, computer equipment and storage medium
CN112685308A (en) * 2020-12-30 2021-04-20 平安普惠企业管理有限公司 Front-end code debugging method and device, computer equipment and computer storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107729238A (en) * 2017-10-09 2018-02-23 郑州云海信息技术有限公司 A kind of plug-in unit adjustment method, system, device and computer-readable recording medium
CN111008132A (en) * 2019-11-29 2020-04-14 浙江大搜车软件技术有限公司 Application debugging method and device for Android system, computer equipment and storage medium
CN112685308A (en) * 2020-12-30 2021-04-20 平安普惠企业管理有限公司 Front-end code debugging method and device, computer equipment and computer storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114338813A (en) * 2022-01-07 2022-04-12 挂号网(杭州)科技有限公司 Network request display method and device, electronic equipment and storage medium
CN114338813B (en) * 2022-01-07 2023-12-01 挂号网(杭州)科技有限公司 Display method and device of network request, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
KR102268355B1 (en) Cloud deployment infrastructure validation engine
US8296104B2 (en) Rule-based engine for gathering diagnostic data
US7953772B2 (en) Method and system for inspecting memory leaks and analyzing contents of garbage collection files
US8631401B2 (en) Capacity planning by transaction type
JP4436036B2 (en) Information processing apparatus, trace processing method, program, and recording medium
US20120331449A1 (en) Device, method and computer program product for evaluating a debugger script
US20140237454A1 (en) Automated debug trace specification
US20070288937A1 (en) Virtual Device Driver
US20080270840A1 (en) Device and method for testing embedded software using emulator
CN102667730A (en) Design time debugging
US9588872B2 (en) Discovery of code paths
US7523446B2 (en) User-space return probes
US20060161896A1 (en) Performing debug requests that are within the debug domain of a class loader
US11580228B2 (en) Coverage of web application analysis
CN115658529A (en) Automatic testing method for user page and related equipment
EP3769222B1 (en) Testing kernel mode computer code by executing the computer code in user mode
CN113867834A (en) Debugging plug-in calling method and device and computer readable storage medium
CN104487935A (en) Recording external processes
CN114765051A (en) Memory test method and device, readable storage medium and electronic equipment
JP4144885B2 (en) How to reuse application objects
CN117112522A (en) Concurrent process log management method, device, equipment and storage medium
CN101425034A (en) Log recording method and log system
CN108197041B (en) Method, device and storage medium for determining parent process of child process
CN111090821A (en) Method, device, electronic equipment and storage medium for realizing dynamic webpage
CN111078570B (en) Parameter format detection method, device, equipment and medium based on interface framework

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