CN111176870B - Reason positioning method, device, terminal and storage medium - Google Patents

Reason positioning method, device, terminal and storage medium Download PDF

Info

Publication number
CN111176870B
CN111176870B CN201910708698.5A CN201910708698A CN111176870B CN 111176870 B CN111176870 B CN 111176870B CN 201910708698 A CN201910708698 A CN 201910708698A CN 111176870 B CN111176870 B CN 111176870B
Authority
CN
China
Prior art keywords
application
terminal
server
information
breakpoint
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.)
Active
Application number
CN201910708698.5A
Other languages
Chinese (zh)
Other versions
CN111176870A (en
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201910708698.5A priority Critical patent/CN111176870B/en
Publication of CN111176870A publication Critical patent/CN111176870A/en
Application granted granted Critical
Publication of CN111176870B publication Critical patent/CN111176870B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/079Root cause analysis, i.e. error or fault diagnosis
    • 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/366Software debugging using diagnostics
    • 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/46Multiprogramming arrangements
    • G06F9/461Saving or restoring of program or task context

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Quality & Reliability (AREA)
  • Computer Hardware Design (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Debugging And Monitoring (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The embodiment of the application provides a reason positioning method, a reason positioning device, a terminal and a storage medium, which are applied to a first application in the terminal, wherein the first application can start and track a code execution state of a second application when the terminal runs, and if breakpoint information matched with a currently executed code of the second application exists in the received breakpoint information sent by a server of the first application, the second application is hung in the terminal, local site information of the current second application is obtained, and the local site information is sent to the server so that the server can position a reason of running problems of the second application in the terminal based on the local site information. The method and the device can remotely reproduce the operation problem of the second application in the terminal and timely realize the positioning of the reason of the operation problem of the second application in the terminal.

Description

Reason positioning method, device, terminal and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method, an apparatus, a terminal, and a storage medium for locating a cause.
Background
With the development of science and technology, the variety of computer applications is increasing, which not only provides entertainment for the life of users, but also provides convenience for the life of users. In order to bring good user experience to a user, when the computer application has an operation problem with the terminal, it is usually necessary to determine a reason why the computer application has the operation problem with the terminal, so as to avoid that the computer application has the same operation problem with the terminal again.
When the computer on the terminal is applied to the operation problem, the debugging personnel can not timely reproduce the operation problem because a certain space distance exists between a terminal holder and the debugging personnel, so that the condition that the debugging personnel can not timely position the reason of the operation problem of the computer applied to the terminal generally exists.
Especially, when a terminal holder with operation problems and debugging personnel are in different parties, or the terminal holder with operation problems does not want to give the mobile phone to the debugging personnel for local debugging to reproduce the operation problems, even the situation that the reason why the computer application has the operation problems at the terminal cannot be positioned exists.
Disclosure of Invention
In view of the above, to solve the above problems, the present invention provides a method, an apparatus, a terminal and a storage medium for locating a reason for an operation problem of a computer application on the terminal in time. The technical scheme is as follows:
a reason positioning method is applied to a first application in a terminal, and comprises the following steps:
starting and tracking a code execution state of a second application when the terminal runs, wherein the second application is an application with running problems at the terminal;
if breakpoint information matched with the currently executed code of the second application exists in the received breakpoint information sent by the server side of the first application, suspending the second application in the terminal and acquiring local site information of the current second application; the local field information indicates execution information of the second application at the terminal;
and sending the local field information to the server, so that the server can locate the reason of the running problem of the second application on the terminal based on the local field information.
A cause locating apparatus applied to a first application in a terminal, the apparatus comprising:
the state tracking unit is used for starting and tracking a code execution state when a second application runs at the terminal, wherein the second application is an application with running problems at the terminal;
a breakpoint matching unit, configured to suspend the second application in the terminal and obtain local site information of the current second application if breakpoint information matched with a currently executed code of the second application exists in the received breakpoint information sent by the server of the first application; the local field information indicates execution information of the second application at the terminal;
and the reason positioning unit is used for sending the local field information to the server so that the server can position the reason of the running problem of the second application on the terminal based on the local field information.
A terminal, comprising: the system comprises a processor and a memory, wherein the processor and the memory are connected through a communication bus; the processor is used for calling and executing the program stored in the memory; the memory for storing a program for implementing the cause localization method of any one of claims 1-7.
A computer-readable storage medium having stored therein computer-executable instructions for the cause locating method.
The embodiment of the application provides a reason positioning method, a reason positioning device, a terminal and a storage medium, which are applied to a first application in the terminal, wherein the first application can start and track the code execution state of a second application in the terminal operation process, if breakpoint information which is matched with the current execution code of the second application exists in the received breakpoint information sent by a server of the first application, the second application is hung in the terminal, the local site information of the current second application is obtained, and the local site information is sent to the server, so that the server can position the reason of the operation problem of the second application in the terminal based on the local site information. The method and the device can remotely reproduce the running problem of the second application in the terminal and timely realize the positioning of the reason of the running problem of the second application in the terminal.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a schematic structural diagram of a cause locating system according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of another reason location system provided in the embodiment of the present application;
fig. 3 is a schematic structural diagram of another reason location system provided in the embodiment of the present application;
fig. 4 is a flowchart of a cause locating method according to an embodiment of the present application;
fig. 5 is a flowchart of another cause locating method provided in the embodiment of the present application;
fig. 6 is a schematic structural diagram of a cause locating device according to an embodiment of the present disclosure;
fig. 7 is a block diagram of a hardware structure of a terminal to which a cause location method provided in the embodiment of the present application is applied.
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 only a part of the embodiments of the present invention, 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 invention.
Example (b):
the computer application in the terminal may be considered as a computer application installed on the terminal (in this embodiment, the computer application installed on the terminal is referred to as an application for short temporarily), and when the application runs on the terminal, if a running problem occurs, the reason why the application runs on the terminal usually needs to be located.
It should be noted that: the computer application installed on the terminal in the embodiment of the application refers to a client of the computer application, and the server of the computer application provides technical support for the client of the computer application, so that the computer application can normally provide services to the outside.
When the reason why the application has the operation problem on the terminal is located, debugging personnel is often required to reproduce the operation problem on the terminal. However, because the holder of the terminal may be far away from the debugger, and the debugger cannot acquire the terminal in time, the running problem is not reproduced on the terminal in time, and thus the reason why the running problem occurs on the terminal cannot be determined in time.
In order to solve the problem that the reason for determining the running problem of the application on the terminal is not timely, embodiments of the present application provide a method, an apparatus, a terminal, and a storage medium for locating the reason, so that the application with the running problem in the terminal can be located without requiring a debugger to obtain the terminal.
A reason positioning method provided in the embodiments of the present application will be described in detail from the perspective of a system. Fig. 1 is a schematic structural diagram of a cause locating system according to an embodiment of the present application.
As shown in fig. 1, the system includes: the terminal comprises a terminal, a first application and a second application which are installed on the terminal, and a first application server. The terminal may be a desktop or a mobile terminal, which is not limited herein.
In the embodiment of the application, the first application is different from the second application, and the first application on the terminal is used for locating the problem occurrence reason of the second application with the operation problem on the terminal by combining with the first application server when the second application on the terminal has the operation problem.
As a preferred implementation manner of the embodiment of the present application, when a second application in the terminal has a running problem, a problem occurrence reason of the second application having the running problem on the terminal may be located by combining a first application server in a manner of locally starting and tracking a code execution state of the second application when the terminal runs. Accordingly, please refer to fig. 2 for a schematic structural diagram of another reason positioning system provided in the embodiment of the present application.
In the embodiment of the present application, whether the reason positioning system shown in fig. 1 or the reason positioning system shown in fig. 2 is used, the reason positioning method can be referred to another reason positioning system shown in fig. 3. As can be seen from fig. 3: when a second application in the terminal has an operation problem, the first application server can send breakpoint information to the first application on the terminal, the first application on the terminal starts and tracks the code execution state of the second application in the terminal operation, and when breakpoint information matched with the currently executed code of the second application exists in the received breakpoint information sent by the first application server, a hang instruction is sent to the second application to control the second application to hang and obtain the local site information of the current second application in the terminal, and then the local site information is sent to the first application server, so that a debugging person located at the first application server can locate the reason for the second application to have the operation problem in the terminal based on the local site information.
It should be noted that, in the cause locating system shown in fig. 3, the second application in the terminal may be started and run in the first application in the terminal, or may be started and run independently of the first application, which is not limited herein.
Furthermore, after receiving the local field information of the second application, a debugging person of the first application server may directly determine the reason for the second application to have the operation problem according to the local field information, or may not directly determine the reason for the second application to have the operation problem according to the local field information, and at this time, the debugging person may further send a debugging instruction to the first application on the terminal through the first application server to further debug the second application on the terminal, thereby determining the reason for the second application to have the operation problem on the terminal.
Based on the reason positioning system provided by the embodiment of the application, a debugging person only needs to perform reason positioning on the terminal with running problems of the second applications in different regions at the first application server, and the timeliness of the reason positioning is effectively improved.
For ease of understanding, a reason location method provided in the embodiments of the present application will now be described in detail. Fig. 4 is a flowchart of a cause locating method according to an embodiment of the present application. The cause location method as shown in fig. 4 is applied to a first application in a terminal of a cause location system.
As shown in fig. 4, the method includes:
s401, starting and tracking a code execution state of a second application when the terminal runs;
in the embodiment of the application, a first application and a second application are installed in a terminal, the second application is an application which has an operation problem in the terminal, and a terminal holder can locate the reason of the second application which has the operation problem in the terminal through a service end of the first application and the service end of the first application installed in the terminal.
After the second application in the terminal has an operation problem, the terminal holder can feed the operation problem of the second application in the terminal back to the server of the second application, so that the server of the second application can send the operation problem of the second application in the terminal to the server of the first application, a debugger on the server side of the first application sets breakpoint information according to the operation problem of the second application in the terminal and sends the breakpoint information to the first application in the terminal, and the first application in the terminal and the server of the first application are combined to locate the reason of the operation problem of the second application in the terminal.
As a preferred implementation manner of the embodiment of the present application, after a running problem occurs to a second application in a terminal, a terminal holder may start to run the first application in the terminal, an application list of the terminal is displayed in the first application, the application list includes applications installed in the terminal, and the terminal holder may select the second application having the running problem from the application list, and click a "cause location" button to control the first application to trigger the second application to start and run in the terminal. Accordingly, the first application may track the code execution state of the second application while the terminal is running.
In this embodiment of the present application, the manner for the first application to start and track the code execution state of the second application when the terminal runs may be: the first application triggers the second application to start locally and track the code execution state of the second application when the terminal runs, or the first application triggers the second application to start in the terminal independently of the first application and track the code execution state of the second application when the terminal runs.
As a preferred implementation manner of the embodiment of the present application, triggering, by the first application, the second application to locally start the first application and tracking a code execution state of the second application when the second application runs on the terminal may be: the first application triggers the second application to locally start the first application, explains and executes the second application, and tracks the code execution state of the second application when the terminal runs.
In this embodiment, the core of the first application may be a JVM interpreter, the second application may run in the first application in an interpreted execution manner, and each line of code when the second application runs may be executed by the first application, so that the first application may perform code level tracking and control on the code execution state of the second application. The first application can determine whether breakpoint information matched with the currently executed code of the second application exists in the received breakpoint information sent by the server of the first application through a reflection technology, and the second application interpretation and execution are suspended when the breakpoint information matched with the currently executed code of the second application exists in the received breakpoint information sent by the server of the first application through a dynamic hook technology, so that the current local live information of the second application is sent to the server of the first application.
The core of the first application adopts a JVM interpreter mode, can be adapted to different second applications, and provides a uniform reason positioning solution for the different second applications.
In this embodiment of the present application, preferably, the first application server is provided with a second application script, the second application script can be compiled to obtain a target second application script, the terminal achieves the purpose of running the second application in a manner of executing the target second application script, and the target second application script is in a form of machine code.
As a preferred implementation manner of the embodiment of the present application, the tracking, by the first application, the code execution state of the second application when the terminal runs includes tracking, by the first application, a line number of a currently executed code of the second application in the target second application script when the terminal runs by the second application.
S402, if breakpoint information matched with a current execution code of a second application exists in the received breakpoint information sent by the server side of the first application, suspending the second application in the terminal and acquiring local site information of the current second application;
as a preferred implementation of the embodiment of the present application, the local presence information indicates execution information of the second application at the terminal.
In this embodiment of the application, the breakpoint information of the first application, which is sent by the server of the first application to the terminal, may indicate a critical path, and the critical path may be a target line number of the target code in the second application script. For example, the critical path may be set to line 3 in the code of the second application script, the critical path may be set to line 10 in the code of the second application script, and so on. The above is only a preferred manner of the critical path provided in the embodiment of the present application, and the inventor may set the specific setting manner of the critical path according to his own needs, which is not limited herein.
The server side of the first application can send a plurality of breakpoint information to the first application of the terminal, each breakpoint information indicates that a critical path exists, the first application in the terminal starts a second application in the terminal, and tracks a code execution state of the second application when the terminal runs (namely, the number of lines of a currently executed code in the terminal in a target second application script); and if target breakpoint information exists in the received breakpoint information sent by the server side of the first application, controlling the second application to be suspended in the terminal, and acquiring the local site information of the second application in the terminal at present.
Wherein, the critical path indicated by the target breakpoint information (the critical path is the target line number of the target code in the critical path in the second application script) is the same as the line number of the currently executed code in the terminal in the target second application script. That is, the object code in the critical path indicated by the target breakpoint information corresponds to the currently executed code of the second application in the terminal, where if the currently executed code of the second application in the terminal is compiled from the object code in the critical path indicated by the target breakpoint information, it is indicated that the object code in the critical path indicated by the target breakpoint information corresponds to the currently executed code of the second application in the terminal.
And S403, sending the local field information to the server.
In the embodiment of the application, after the first application in the terminal acquires the local field information, the local field information can be sent to the server of the first application, so that the server can locate the reason of the running problem of the second application in the terminal based on the local field information.
Referring to fig. 4, a cause locating method provided in an embodiment of the present application may further include:
s404, receiving a debugging instruction returned by the server;
in the embodiment of the application, after receiving the local field information, the server may determine the reason for the operation problem of the second application according to the local field information directly, or may not determine the reason for the operation problem of the second application directly. If the reason that the second application has the running problem cannot be directly determined, the server of the first application can receive the debugging instruction sent by the debugging personnel and send the debugging instruction to the first application of the terminal, after the first application receives the debugging instruction sent by the server, the second application can be continuously executed on the terminal in response to the debugging instruction, and then the second application on the terminal is continuously debugged by the server of the first application and the server of the first application so as to determine the reason that the second application has the running problem on the terminal.
As a preferred embodiment of the present application, after the second application is suspended, only the debugging instruction sent by the server is received, and the execution can be continued. The debugging instruction indicates a debugging mode, and the debugging mode can be single-step debugging or debugging when breakpoint information matched with a currently executed code of a second application exists in received breakpoint information sent by a server of the first application.
S405, responding to the debugging information, and continuing to execute the second application.
After the first application receives the debugging instruction indicating the single step debugging, the first application responds to the debugging instruction to control the second application to continue executing, and executes a line of codes in the target second application script, so that the second application is suspended, the current local field information of the second application is obtained, and the second application is sent to the server, and the server can determine the reason of the running problem of the second application terminal according to the local field information.
If the debugging instruction received by the first application indicates that debugging is performed when breakpoint information matched with the currently executed code of the second application exists in the received breakpoint information sent by the server of the first application, the first application responds to the debugging instruction to control the second application to continue executing after receiving the debugging instruction until the breakpoint information matched with the currently executed code of the second application exists in the received breakpoint information sent by the server of the first application, the second application is hung and the current local site information of the second application is obtained and sent to the server, so that the server determines the reason of the running problem of the second application at the terminal according to the local site information.
As a preferred implementation manner of the embodiment of the present application, if step S401 specifically triggers the second application to locally start and interpret the first application to execute the second application, and when tracking a code execution state of the second application when the terminal runs, step S405 specifically responds to the debugging information to continue interpreting and executing the second application.
Further, according to the reason positioning method provided by the embodiment of the application, after the local field information is sent to the server of the first application, a debugger on the server side can also set new breakpoint information for the second application and send the set breakpoint information to the first application.
Fig. 5 is a flowchart of another reason location method according to an embodiment of the present application.
As shown in fig. 5, the method includes:
s501, receiving a reason positioning request, wherein the reason positioning request indicates a second application of the running problem occurring in the terminal;
s502, determining whether target binding information exists in the binding information stored in the binding information base, wherein the target binding information indicates the model, the second application and the operation problem of the terminal; if the target binding information exists in the binding information base, executing step S503; if the target binding information does not exist in the binding information base, executing step S504;
s503, determining the reason indicated by the target binding information as the reason of the running problem of the second application at the terminal;
s504, starting and tracking a code execution state of a second application when the terminal runs, wherein the second application is an application with running problems at the terminal;
s505, if breakpoint information matched with a current execution code of a second application exists in the received breakpoint information sent by the server side of the first application, suspending the second application in the terminal and acquiring local site information of the current second application;
s506, sending the local field information to the server so that the server can position the reason of the running problem of the second application on the terminal based on the local field information.
In this embodiment of the application, after determining the reason for the second application to have the operation problem at the terminal, the server may obtain the device model of the terminal, and generate binding information according to the device model of the terminal, the operation problem at the terminal of the second application, and the reason for the operation problem at the terminal of the second application, where the binding information indicates the device model of the terminal, the second application, the operation problem at the terminal of the second application, and the reason for the operation problem at the terminal of the second application.
As a preferred implementation manner of the embodiment of the present application, a binding information base may be further set at the server, and the generated binding information is stored in the binding information base each time a binding information is generated, so that after receiving the reason location request, it is determined whether the reason can be located according to the binding information in the binding information base, and if the reason cannot be located, the reason is located according to the method shown in the above steps S504 to S506.
In the embodiment of the present application, preferably, the local field information includes any one or more of variable information and operating environment information. The above is only the preferred content of the local field information provided in the embodiment of the present application, and the inventor may set the content according to his own needs, which is not limited herein.
As a preferred implementation manner of the embodiment of the application, a first application installed on a terminal can be regarded as a local debugging container, and a server of the first application can be regarded as a cloud debugging container. For example, the terminal holder may find that a second application on the terminal will be lost when entering a video, and, at this time, the terminal holder can install a local debugging container on the terminal, the local debugging container can receive breakpoint information set by a debugging person on the cloud end debugging container for the second application, starting a second application on the local debugging container and tracking the code execution state of the second application, and when breakpoint information matched with the currently executed code of the second application exists in the received breakpoint information, the local debugging container can suspend the second application, meanwhile, the current local field information of the second application is sent to the cloud debugging container, so that a debugging worker can obtain the current state of the second application through the local field information, and debugging the second application by setting a new breakpoint or releasing the breakpoint so as to determine the reason of the running problem of the second application at the terminal.
In this embodiment of the present application, a process of sending a debug instruction may be considered as a process of releasing a breakpoint, if breakpoint information matched with a currently executed code of a second application exists in received breakpoint information sent by a server of a first application, suspend the second application and obtain local site information of the current second application, and send the local site information to the server, where the server sends the debug instruction to the first application, and a process in which the first application continues to execute the second application in response to the debug instruction may be considered as a process of releasing a breakpoint.
The embodiment of the application provides a reason positioning method, which is applied to a first application in a terminal, wherein the first application can start and track a code execution state of a second application when the terminal runs, and if breakpoint information matched with a currently executed code of the second application exists in received breakpoint information sent by a server of the first application, the second application is hung in the terminal, local site information of the current second application is obtained, and the local site information is sent to the server, so that the server can position a reason of running problems of the second application in the terminal based on the local site information. The method and the device can remotely reproduce the running problem of the second application in the terminal and timely realize the positioning of the reason of the running problem of the second application in the terminal.
The embodiment of the present application further provides a cause positioning device on the basis of providing the cause positioning method, and fig. 6 is a schematic structural diagram of the cause positioning device provided in the embodiment of the present application.
The reason positioning apparatus shown in fig. 6 is applied to a first application in a terminal, and includes, referring to fig. 6:
the state tracking unit 61 is configured to start and track a code execution state of a second application when the terminal runs, where the second application is an application that has a running problem at the terminal;
a breakpoint matching unit 62, configured to suspend the second application in the terminal and obtain local site information of the current second application if breakpoint information matched with the current execution code of the second application exists in the received breakpoint information sent by the server of the first application; the local field information indicates execution information of the second application at the terminal;
and the reason positioning unit 63 is configured to send the local field information to the server, so that the server positions the reason why the second application has the operation problem with the terminal based on the local field information.
In the embodiment of the present application, preferably, the state tracking unit includes:
the interpretation execution unit is used for locally starting the first application and interpreting and executing the second application;
a tracking unit for tracking a code execution state of the second application at runtime.
In the embodiment of the present application, preferably, the breakpoint matching unit includes:
the matching unit is used for detecting whether the current execution code of the second application corresponds to a target code in a received critical path indicated by breakpoint information sent by the server of the first application;
and the information acquisition unit is used for suspending the second application in the terminal and acquiring the local site information of the current second application if the current execution code of the second application corresponds to the received target code in the critical path indicated by the breakpoint information sent by the server side of the first application.
Further, a reason locating device provided in the embodiment of the present application further includes a debugging unit, where the debugging unit includes:
the debugging instruction receiving unit is used for receiving a debugging instruction returned by the server;
and the debugging instruction response unit is used for continuously interpreting and executing the second application in response to the debugging instruction.
In this embodiment of the application, preferably, the debug instruction response unit is specifically configured to continue to interpret and execute the second application in response to the debug instruction according to a debug mode indicated by the debug instruction, where the debug mode indicates single step debugging or indicates debugging if breakpoint information matched with a currently executed code of the second application exists in received breakpoint information sent by the server of the first application.
Further, the reason positioner that this application embodiment provided still includes:
a cause positioning request receiving unit, configured to receive a cause positioning request indicating a second application of an operation problem occurring at the terminal;
a target binding information determining unit, configured to determine whether target binding information exists in the binding information stored in the binding information base, where the target binding information indicates a model of the terminal, a second application, and an operation problem;
the reason determining unit is used for determining the reason indicated by the target binding information as the reason of the running problem of the second application in the terminal if the target binding information exists in the binding information base;
correspondingly, the state tracking unit is specifically configured to: and if the target binding information does not exist in the binding information base, starting and tracking the code execution state of the second application when the terminal runs.
In the embodiment of the present application, it is preferable that the local field information includes any one or more of variable information and operating environment information.
For convenience of understanding, a detailed description will be given of a terminal to which the cause positioning method provided in the embodiment of the present application is applied, specifically referring to fig. 7.
As shown in fig. 7, the terminal may include: a processor 701, a memory 702, a communication interface 703, an input unit 704, and a display 705 and communication bus 706.
The memory 702 is used for storing one or more programs, which may include program codes including computer operation instructions, and in this embodiment, the memory stores at least the programs for implementing the following functions:
starting and tracking a code execution state of a second application when the terminal runs, wherein the second application is an application with running problems at the terminal;
if breakpoint information matched with a current execution code of a second application exists in received breakpoint information sent by a server side of a first application, suspending the second application in the terminal and acquiring local site information of the current second application; the local field information indicates execution information of the second application at the terminal;
and sending the local field information to the server so that the server can locate the reason of the running problem of the second application on the terminal based on the local field information.
Alternatively, the detailed function and the extended function of the program may be described with reference to the following.
The processing module 701, the memory 702, the communication interface 703, the input unit 704, and the display 705 all communicate with each other via the communication bus 706.
In the embodiment of the present application, the processor 701 may be a Central Processing Unit (CPU), an application-specific integrated circuit (ASIC), a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA), or other programmable logic devices.
The processor may call and execute programs stored in memory 702.
The communication interface 703 may be an interface of a communication module, such as an interface of a GSM module.
The present application may further include an input unit 704, which may include a touch sensing unit sensing a touch event on the touch display panel, a keyboard, and the like.
The display 705 includes a display panel, such as a touch display panel or the like. In one possible case, the display panel may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
Of course, the terminal structure shown in fig. 7 does not constitute a limitation of the terminal in the embodiment of the present application, and in practical applications, the terminal may include more or less components than those shown in fig. 7, or some components may be combined.
Furthermore, an embodiment of the present application also provides a computer-readable storage medium, where computer-executable instructions are stored in the computer-readable storage medium, and the computer-executable instructions are used to execute the cause location method according to the above-mentioned embodiment.
For a detailed description of the program stored in the storage medium provided in the embodiments of the present application, reference may be made to the above embodiments, which are not described herein again.
The embodiment of the application provides a reason positioning method, a reason positioning device, a terminal and a storage medium, which are applied to a first application in the terminal, wherein the first application can start and track a code execution state of a second application when the terminal runs, and if breakpoint information matched with a currently executed code of the second application exists in the received breakpoint information sent by a server of the first application, the second application is hung in the terminal, local site information of the current second application is obtained, and the local site information is sent to the server so that the server can position a reason of running problems of the second application in the terminal based on the local site information. The method and the device can remotely reproduce the running problem of the second application in the terminal and timely realize the positioning of the reason of the running problem of the second application in the terminal.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. 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.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A cause positioning method, applied to a first application in a terminal, the method comprising:
starting and tracking a code execution state of a second application when the terminal runs, wherein the second application is an application with running problems at the terminal;
determining whether breakpoint information matched with a currently executed code of the second application exists in received breakpoint information sent by a server of the first application through a reflection technology, and suspending the second application in the terminal and acquiring local field information of the second application when determining that breakpoint information matched with the currently executed code of the second application exists in the received breakpoint information sent by the server of the first application through a dynamic hook technology; the local field information indicates execution information of the second application at the terminal, breakpoint information sent by a server of the first application is breakpoint information set according to running problems occurring in the terminal by the server of the first application after the running problems occurring in the second application occur in the terminal, the running problems occurring in the terminal by the server of the second application are sent to the server of the second application by the server of the second application, and the running problems occurring in the terminal by the server of the first application are set according to the breakpoint information set according to the running problems occurring in the terminal by the second application;
and sending the local field information to the server, so that the server can locate the reason of the running problem of the second application on the terminal based on the local field information.
2. The method of claim 1, wherein the launching and tracking a code execution state of the second application when the terminal is running comprises:
locally starting and interpreting the first application to execute the second application;
tracking a code execution state of the second application at runtime.
3. The method according to claim 1, wherein the determining, by using a reflection technique, whether breakpoint information matching with a currently executed code of the second application exists in the received breakpoint information sent by the server of the first application, and suspending, in the terminal, the second application and acquiring local presence information of the current second application when determining, by using a dynamic hook technique, that breakpoint information matching with a currently executed code of the second application exists in the received breakpoint information sent by the server of the first application comprises:
detecting whether the currently executed code of the second application corresponds to a target code in a received critical path indicated by breakpoint information sent by the server of the first application;
and if the current execution code of the second application corresponds to the received target code in the critical path indicated by the breakpoint information sent by the server side of the first application, suspending the second application in the terminal and acquiring the current local site information of the second application.
4. The method of claim 2, further comprising:
receiving a debugging instruction returned by the server;
and continuing to interpret and execute the second application in response to the debugging instruction.
5. The method of claim 4, wherein continuing to interpret execution of the second application in response to the debug instruction comprises:
and responding to the debugging instruction to continue interpreting and executing the second application according to the debugging mode indicated by the debugging instruction, wherein the debugging mode indicates single step debugging or indicates debugging if breakpoint information matched with the currently executed code of the second application exists in the received breakpoint information sent by the server of the first application.
6. The method of claim 1, further comprising:
receiving a cause location request indicating the second application of the operational problem occurring at the terminal;
determining whether target binding information exists in binding information stored in a binding information base, wherein the target binding information indicates the model of the terminal, the second application and the operation problem;
if the target binding information exists in a binding information base, determining the reason indicated by the target binding information as the reason for the running problem of the second application at the terminal;
the starting and tracking the code execution state of the second application when the terminal runs comprises the following steps: and if the target binding information does not exist in the binding information base, starting and tracking the code execution state of the second application when the terminal runs.
7. The method of any one of claims 1-6, wherein the local field information includes any one or more of variable information and operating environment information.
8. A cause locating apparatus, applied to a first application in a terminal, the apparatus comprising:
the state tracking unit is used for starting and tracking a code execution state when a second application runs at the terminal, wherein the second application is an application with a running problem at the terminal;
a breakpoint matching unit, configured to determine, by using a reflection technology, whether breakpoint information matched with a currently executed code of the second application exists in received breakpoint information sent by the server of the first application, and suspend, by using a dynamic hook technology, the second application in the terminal and acquire current local presence information of the second application when it is determined that breakpoint information matched with the currently executed code of the second application exists in the received breakpoint information sent by the server of the first application; the local field information indicates execution information of the second application at the terminal, breakpoint information sent by a server of the first application is breakpoint information set according to running problems occurring in the terminal by the server of the first application after the running problems occurring in the second application occur in the terminal, the running problems occurring in the terminal by the server of the second application are sent to the server of the second application by the server of the second application, and the running problems occurring in the terminal by the server of the first application are set according to the breakpoint information set according to the running problems occurring in the terminal by the second application;
and the reason positioning unit is used for sending the local field information to the server so that the server can position the reason of the running problem of the second application on the terminal based on the local field information.
9. A terminal, comprising: the system comprises a processor and a memory, wherein the processor and the memory are connected through a communication bus; the processor is used for calling and executing the program stored in the memory; the memory for storing a program for implementing the cause localization method of any one of claims 1-7.
10. A computer-readable storage medium having computer-executable instructions stored thereon for performing the cause location method of any of claims 1-7.
CN201910708698.5A 2019-08-01 2019-08-01 Reason positioning method, device, terminal and storage medium Active CN111176870B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910708698.5A CN111176870B (en) 2019-08-01 2019-08-01 Reason positioning method, device, terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910708698.5A CN111176870B (en) 2019-08-01 2019-08-01 Reason positioning method, device, terminal and storage medium

Publications (2)

Publication Number Publication Date
CN111176870A CN111176870A (en) 2020-05-19
CN111176870B true CN111176870B (en) 2022-07-08

Family

ID=70647292

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910708698.5A Active CN111176870B (en) 2019-08-01 2019-08-01 Reason positioning method, device, terminal and storage medium

Country Status (1)

Country Link
CN (1) CN111176870B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101739333A (en) * 2008-11-25 2010-06-16 国际商业机器公司 Method, tool and device for debugging application program
CN103747330A (en) * 2013-12-24 2014-04-23 深圳市九洲电器有限公司 Program monitoring method, apparatus and digital television receiving terminal
CN104281520A (en) * 2013-07-10 2015-01-14 腾讯科技(深圳)有限公司 Tracking and debugging method, device and system
CN104536838A (en) * 2014-12-18 2015-04-22 中国电子科技集团公司第三十八研究所 Remote debugging method and system with asynchronous monitoring function
CN107451040A (en) * 2017-07-07 2017-12-08 深信服科技股份有限公司 Localization method, device and the computer-readable recording medium of failure cause
CN109344064A (en) * 2018-09-26 2019-02-15 北京酷我科技有限公司 It is a kind of to apply remote debugging method
CN109783342A (en) * 2017-11-10 2019-05-21 华为技术有限公司 Script debugging method, equipment and computer storage medium
CN109800173A (en) * 2019-01-28 2019-05-24 腾讯科技(深圳)有限公司 Program debugging method, device and storage medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2205096C (en) * 1997-05-09 2001-10-09 Ibm Canada Limited-Ibm Canada Limitee A system for remote debugging of client/server applications
US9251039B2 (en) * 2012-02-17 2016-02-02 Microsoft Technology Licensing, Llc Remote debugging as a service
US9648139B2 (en) * 2013-12-19 2017-05-09 Adobe Systems Incorporated Inserting server-side breakpoints requested by remote development clients
US10037265B2 (en) * 2015-08-04 2018-07-31 International Business Machines Corporation Enhancing the debugger stack with recently reported errors under debug
CN108628739A (en) * 2018-03-19 2018-10-09 北京奇艺世纪科技有限公司 A kind of method that Lua scripts are debugged, client, server and debugger

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101739333A (en) * 2008-11-25 2010-06-16 国际商业机器公司 Method, tool and device for debugging application program
CN104281520A (en) * 2013-07-10 2015-01-14 腾讯科技(深圳)有限公司 Tracking and debugging method, device and system
CN103747330A (en) * 2013-12-24 2014-04-23 深圳市九洲电器有限公司 Program monitoring method, apparatus and digital television receiving terminal
CN104536838A (en) * 2014-12-18 2015-04-22 中国电子科技集团公司第三十八研究所 Remote debugging method and system with asynchronous monitoring function
CN107451040A (en) * 2017-07-07 2017-12-08 深信服科技股份有限公司 Localization method, device and the computer-readable recording medium of failure cause
CN109783342A (en) * 2017-11-10 2019-05-21 华为技术有限公司 Script debugging method, equipment and computer storage medium
CN109344064A (en) * 2018-09-26 2019-02-15 北京酷我科技有限公司 It is a kind of to apply remote debugging method
CN109800173A (en) * 2019-01-28 2019-05-24 腾讯科技(深圳)有限公司 Program debugging method, device and storage medium

Also Published As

Publication number Publication date
CN111176870A (en) 2020-05-19

Similar Documents

Publication Publication Date Title
JP6571277B2 (en) Method and apparatus for loading terminal application
US8843895B2 (en) Debugger connection
US8296445B1 (en) Software testing harness
CN106557424A (en) Internal storage testing method, measured terminal, test client and system
WO2018077041A1 (en) Method and apparatus for running application
CN106886331B (en) Data processing method and device of touch terminal and touch terminal
CN104967550A (en) Method and apparatus for displaying unread messages
CN106294176B (en) The method and system that application failure positions in Mac OS systems
CN107329901B (en) Data packet capturing method, terminal, server and storage medium
CN103777967A (en) Page returning method and page generating method and device
CN113672441B (en) Method and device for testing intelligent equipment
CN105847325A (en) Method and device for debugging application client side
CN107967207B (en) Method and device for testing user interface interaction function
CN111330280A (en) Data processing method and device in game, storage medium and electronic equipment
CN110795354A (en) Information processing method, device and storage medium
CN106020917B (en) A kind of software installation method and device, user terminal
CN114218072A (en) Test script generation method and device, storage medium and computer equipment
WO2024088053A1 (en) Code debugging method, electronic device, and computer readable storage medium
CN111176870B (en) Reason positioning method, device, terminal and storage medium
CN106713446A (en) Relocation method and device, server and mobile terminal
CN114296986B (en) Memory leakage positioning method, device, medium and electronic equipment
CN109669715A (en) application program dynamic updating method, device and storage medium
CN108347456B (en) Application program downloading method and device
CN111124627A (en) Method, device, terminal and storage medium for determining application program caller
CN112631812A (en) Identification setting 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
GR01 Patent grant
GR01 Patent grant