A software debugging method, an electronic device, and a debugging system
By introducing server and client devices into the debugging cluster and utilizing the identification information of debugging commands and data, the problem of multi-device collaborative debugging was solved, cross-device collaborative debugging was realized, and debugging efficiency and accuracy were improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-30
- Publication Date
- 2026-03-27
AI Technical Summary
Existing software debugging technologies can only support a single debugger to monitor and debug a single device application process, making it difficult to achieve collaborative debugging between multiple devices.
By introducing server and client devices into the debugging cluster and utilizing the identification information of debugging commands and data, collaborative debugging of multiple devices and processes can be achieved, including the forwarding of debugging commands, the transmission and display of data.
It enables collaborative debugging among multiple devices, improving debugging efficiency and accuracy, and supports cross-device debugging operations.
Smart Images

Figure CN114691483B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present application relate to the technical field of software development, and particularly relate to a software debugging method, an electronic device, and a debugging system. BACKGROUND
[0002] With the development of communication technology and the diversification of electronic devices, more and more forms of electronic devices (such as smart phones, televisions, wireless earphones, smart speakers, smart home devices, etc.) can provide users with intelligent life or work experience based on communication technology. For example, users can perform collaborative work between devices based on a distributed device cluster architecture such as the one shown in FIG. 1, for example, control smart home devices through a smart phone, etc. Figure 1
[0003] Generally, the implementation of the functions of an electronic device needs to be based on a software system developed by a software developer for implementing related functions. The development of the software system needs to be continuously debugged by the software developer to achieve stable function performance. In the scenario of collaborative work between multiple devices, collaborative debugging of multiple devices is often required.
[0004] However, in the conventional software system debugging technology, only one debugger can support the monitoring and debugging of a single device application process. SUMMARY
[0005] Embodiments of the present application provide a software debugging method, an electronic device, and a debugging system, which can realize collaborative debugging of devices.
[0006] To achieve the above-mentioned purpose, embodiments of the present application adopt the following technical solutions:
[0007] In a first aspect, a software debugging method is provided, which includes: a first device receiving, from a second device, a first debugging command corresponding to a first process in a third device, the first debugging command carrying an identifier of the third device and an identifier of the first process; the first device sending the first debugging command to the third device; the first device receiving, from the third device, first debugging data, the first debugging data being debugging data obtained by the third device after executing the first debugging command on the first process, the first debugging data carrying the identifier of the third device and the identifier of the first process; and the first device sending the first debugging data to the second device.
[0008] The technical solution provided in the first aspect above can realize, through a server device (such as the first device) connected to a master device (such as the third device) in a distributed device cluster, the forwarding of a debugging command triggered by a user to a device under debugging by a client device (such as the second device) in a debugging cluster composed of multiple debugging devices (such as the first device and the second device), to realize collaborative debugging of a process under debugging by multiple debugging devices in a debugging system.
[0009] In a possible implementation, the method further includes: in response to a user triggered debugging event, the first device acquires a second debugging command corresponding to a second process in the fourth device, the second debugging command carrying an identifier of the fourth device and an identifier of the second process; the first device sends the second debugging command to the third device; the first device receives second debugging data from the third device, the second debugging data being debugging data acquired by the fourth device after executing the second debugging command on the second process; the second debugging data is sent by the fourth device to the third device after executing the second debugging command on the second process, and the second debugging data carries the identifier of the fourth device and the identifier of the second process. In some embodiments of the present application, the server device (such as the first device) and the client device (such as the second device) in the debugging cluster can cooperatively debug multiple processes (such as the first process and the second process) associated with each other in multiple devices (such as the third device and the fourth device) in the distributed device cluster.
[0010] In a possible implementation, the method further includes: the first device receives a third debugging command from the second device, the third debugging command corresponding to a third process in the fourth device, the third debugging command carrying an identifier of the fourth device and an identifier of the third process; the first device sends the third debugging command to the third device; the first device receives third debugging data from the third device, the third debugging data being debugging data acquired by the fourth device after executing the third debugging command on the third process, the third debugging data being sent by the fourth device to the third device after executing the third debugging command on the third process, and the third debugging data carrying the identifier of the fourth device and the identifier of the third process; and the first device sends the third debugging data to the second device. In some embodiments of the present application, the client device (such as the second device) in the debugging cluster can cooperatively debug multiple processes (such as the first process and the third process) associated with each other in multiple devices (such as the third device and the fourth device) in the distributed device cluster.
[0011] In a possible implementation, the method further includes: the first device receives a viewing request from the second device; and in response to the viewing request, the first device sends the second debugging data to the second device. In some embodiments of the present application, the server device (such as the first device) can also receive a viewing request from the client device (such as the second device), and send the second debugging data corresponding to the second debugging command to the client device (such as the second device) so as to be displayed on a UI interface by the client device (such as the second device).
[0012] In a possible implementation, after the first device receives the second debugging data from the third device, the method further includes that the first device displays the second debugging data through a user interface (UI). In some embodiments of the present application, the server device (e.g., the first device) can directly display the second debugging data corresponding to the second debugging command on the UI interface of the server device (e.g., the first device).
[0013] In a possible implementation, the method further includes that the first device displays the first debugging data through the UI interface. In some embodiments of the present application, the server device (e.g., the first device) can also display the first debugging data corresponding to the first debugging command on the UI interface of the server device (e.g., the first device).
[0014] In a possible implementation, the first device is communicatively connected with the second device, the first device is communicatively connected with the third device, and the third device is communicatively connected with the fourth device. The cooperative debugging of multiple debugging devices on one device to be debugged in the distributed device cluster, the cross-device cooperative debugging of one debugging device on multiple devices to be debugged, and the cross-device cooperative debugging of multiple debugging devices on multiple devices to be debugged provided in the present application can be implemented based on the established debugging cluster including the debugging server and the debugging client.
[0015] In a possible implementation, the first device sends the first debugging data to the second device includes that the first device sends the first debugging data to the second device according to the identifier of the third device and the identifier of the first process carried in the first debugging data. In the scheme provided in the present application, the server device (e.g., the first device) can perform unified management and distribution of the debugging command.
[0016] In a possible implementation, before the first device receives the first debugging command from the second device, the method further includes that the first device sends a command for discovering a debuggable process to the third device, to discover the debuggable process; and the first device receives debuggable process information from the third device, the debuggable process information including information of the debuggable process discovered by the third device and the fourth device. In the scheme provided in the present application, the first device can be used to uniformly report all the debuggable processes in the distributed device cluster, to facilitate the user to determine the device to be debugged and the process to be debugged.
[0017] In a possible implementation, the debuggable process includes information of the first process, information of the second process, and information of the third process.
[0018] In a possible implementation, the first debugging command includes a breakpoint command and / or a time debugging command. The second debugging command includes a breakpoint command and / or a time debugging command. For example, the debugging device can implement the cooperative debugging of the one or more debugged processes through the breakpoint command and / or the time debugging command.
[0019] In a possible implementation, the breakpoint command includes one or more of a data breakpoint command, a synchronous breakpoint command, or a conditional breakpoint command. For example, the debugging device can implement the cooperative debugging of the one or more debugged processes through the data breakpoint command, the synchronous breakpoint command, or the conditional breakpoint command.
[0020] In a second aspect, a software debugging method is provided. The method includes: receiving, by a third device, a first debugging command corresponding to a first process in the third device from a first device, the first debugging command carrying an identifier of the third device and an identifier of the first process; executing, by the third device, the first debugging command on the first process according to the identifier of the third device and the identifier of the first process carried in the first debugging command, to obtain first debugging data, the first debugging data carrying the identifier of the third device and the identifier of the first process; and sending, by the third device, the first debugging data to the first device.
[0021] The second aspect provides a technical solution in which a client device (e.g., the second device) in a debugging cluster composed of multiple debugging devices (e.g., the first device and the second device) can forward a debugging command triggered by a user to a debugged device through a server device (e.g., the first device) connected to a master device (e.g., the third device) in the distributed device cluster, so that the debugged device (e.g., the third device) executes a debugging operation on a debugged process (e.g., the first process) according to the debugging command and returns debugging data (e.g., the first debugging data). In this way, the multiple debugging devices can cooperatively debug the debugged process in the existing debugging system.
[0022] In a possible implementation, the method further includes: receiving, by the third device, a second debugging command corresponding to a second process in the fourth device from the first device, the second process being associated with the first process, the second debugging command carrying an identifier of the fourth device and an identifier of the second process; sending, by the third device, the second debugging command to the fourth device according to the identifier of the fourth device carried in the second debugging command; receiving, by the third device, second debugging data from the fourth device, the second debugging data being debugging data obtained by the fourth device after executing the second debugging command on the second process, the second debugging data carrying the identifier of the fourth device and the identifier of the second process; and sending, by the third device, the second debugging data to the first device. In some embodiments of the present application, the server device (e.g., the first device) and the client device (e.g., the second device) in the debugging cluster can cooperatively debug the processes (e.g., the first process and the second process) associated with each other in the multiple devices (e.g., the third device and the fourth device) in the distributed device cluster.
[0023] In a possible implementation, the method further includes: receiving, by the third device, a third debugging command from the first device, the third debugging command corresponding to a third process in the fourth device, the third debugging command carrying an identifier of the fourth device and an identifier of the third process; sending, by the third device, the third debugging command to the fourth device according to the identifier of the fourth device carried in the third debugging command; receiving, by the third device, third debugging data from the fourth device, the third debugging data being debugging data obtained by the fourth device after executing the third debugging command on the third process, the third debugging data carrying the identifier of the fourth device and the identifier of the third process; and sending, by the third device, the third debugging data to the first device. In some embodiments of the present application, the client device (e.g., the second device) in the debugging cluster can cooperatively debug the processes (e.g., the first process and the third process) associated with each other in the multiple devices (e.g., the third device and the fourth device) in the distributed device cluster.
[0024] In a possible implementation, before the third device receives the first debugging command from the first device, the method further includes: performing, by the third device, device discovery, and establishing a communication connection with the fourth device after discovering the fourth device; and the third device is in communication connection with the first device. The cooperative debugging of the multiple debugging devices on the one device to be debugged in the distributed device cluster, the cross-device cooperative debugging of one debugging device on the multiple devices to be debugged, and the cross-device cooperative debugging of the multiple debugging devices on the multiple devices to be debugged provided in the present application can be implemented based on the established distributed device cluster including the master device (e.g., the third device) and the slave device (e.g., the fourth device).
[0025] In a possible implementation, after the distributed device cluster is established, the method further includes: the third device receiving, from the first device, a command of discovering a debuggable process; the third device sending the command of discovering the debuggable process to the fourth device; the third device discovering a first debuggable process, the first debuggable process including the first process; the third device receiving, from the fourth device, information of a second debuggable process discovered by the fourth device, the second debuggable process including a second process and a third process; the third device sending, to the first device, information of the debuggable process; the information of the debuggable process including information of the first debuggable process and information of the second debuggable process. In the scheme provided in the application, the first device can be used to uniformly report all the debuggable processes in the distributed device cluster, so as to facilitate the user to determine the device to be debugged and the process to be debugged.
[0026] In a possible implementation, the first debug command includes a breakpoint command and / or a time travel debug command. For example, the debug device can implement cooperative debugging of one or more processes to be debugged through the breakpoint command and / or the time travel debug command.
[0027] In a possible implementation, the breakpoint command includes one or more of the following: a data breakpoint command, a synchronization breakpoint command, or a conditional breakpoint command.
[0028] In a possible implementation, the first debug command includes a breakpoint command and / or a time travel debug command. For example, the debug device can implement cooperative debugging of one or more processes to be debugged through the breakpoint command and / or the time travel debug command.
[0029] The third aspect provides a software debugging method, which includes: a first device receiving, from a second device, a first debug command corresponding to a first process in a third device, the first debug command carrying an identifier of the third device and an identifier of the first process; the first device sending the first debug command to the third device; the third device executing the first debug command on the first process according to the identifier of the third device and the identifier of the first process carried in the first debug command, to obtain first debug data, the first debug data carrying the identifier of the third device and the identifier of the first process; the third device sending the first debug data to the first device; the first device sending the first debug data to the second device; and the second device displaying the first debug data through a UI interface.
[0030] In a possible implementation, the method further includes: in response to a user triggering a debugging event, the first device acquires a second debugging command corresponding to a second process in the fourth device, the second debugging command carrying an identifier of the fourth device and an identifier of the second process; the first device sends the second debugging command to the third device; the third device sends the second debugging command to the fourth device according to the identifier of the fourth device carried in the second debugging command; the fourth device performs a debugging operation on the second process according to the identifier of the second process carried in the second debugging command, acquires second debugging data, and the second debugging data carries the identifier of the fourth device and the identifier of the second process; the fourth device sends the second debugging data to the third device; the third device sends the second debugging data to the first device; and the first device displays the second debugging data through a UI interface. In some embodiments of the present application, the server device (such as the first device) and the client device (such as the second device) in the debugging cluster can cooperatively debug the processes (such as the first process and the second process) associated with each other in the multiple devices (such as the third device and the fourth device) in the distributed device cluster.
[0031] In a possible implementation, the method further includes: the first device receives a third debugging command from the second device, the third debugging command corresponding to a third process in the fourth device, the third debugging command carrying an identifier of the fourth device and an identifier of the third process; the first device sends the third debugging command to the third device; the third device sends the third debugging command to the fourth device according to the identifier of the fourth device carried in the third debugging command; the fourth device performs a debugging operation on the third process according to the identifier of the third process carried in the third debugging command, acquires third debugging data, and the third debugging data carries the identifier of the fourth device and the identifier of the third process; the fourth device sends the third debugging data to the third device; the first device sends the third debugging data to the second device; and the second device displays the third debugging data through a UI interface. In some embodiments of the present application, the client device (such as the second device) in the debugging cluster can cooperatively debug the processes (such as the first process and the third process) associated with each other in the multiple devices (such as the third device and the fourth device) in the distributed device cluster.
[0032] In a fourth aspect, a first device is provided, which includes: a second debugging module configured to receive a first debugging command corresponding to a first process in a third device from a second device, send the first debugging command to the third device, receive first debugging data from the third device, and send the first debugging data to the second device; wherein the first debugging command carries an identifier of the third device and an identifier of the first process; and the first debugging data is debugging data acquired by the third device after executing the first debugging command on the first process, and the first debugging data carries the identifier of the third device and the identifier of the first process.
[0033] The fourth aspect provides a technical solution. A client device (e.g., the second device) in a debugging cluster composed of multiple debugging devices (e.g., the first device and the second device) can forward a user-triggered debugging command to a device under debugging through a server device (e.g., the first device) connected to a master device (e.g., the third device) in a distributed device cluster, so as to realize cooperative debugging of multiple debugging devices on a process under debugging in a debugging system.
[0034] In a possible implementation, the first device further includes a framework layer configured to: in response to a user-triggered debugging event, acquire a second debugging command; and send the second debugging command for a second process in the fourth device to the second debugging module; the second process is associated with the first process, and the second debugging command carries an identifier of the fourth device and an identifier of the second process; the second debugging module is further configured to: send the second debugging command to the third device; and receive second debugging data from the third device, the second debugging data being debugging data acquired by the fourth device after executing the second debugging command on the second process; the second debugging data is sent by the fourth device to the third device after executing the second debugging command on the second process, and the second debugging data carries the identifier of the fourth device and the identifier of the second process. In some embodiments of the present application, the server device (e.g., the first device) and the client device (e.g., the second device) in the debugging cluster can cooperatively debug multiple processes (e.g., the first process and the second process) associated with each other in multiple devices (e.g., the third device and the fourth device) in the distributed device cluster.
[0035] In a possible implementation, the second debugging module is further configured to: receive a third debugging command from the second device, send the third debugging command to the third device; receive third debugging data from the third device, and send the third debugging data to the second device; the third debugging command corresponds to a third process in the fourth device, and the third debugging command carries an identifier of the fourth device and an identifier of the third process; the third debugging data is debugging data acquired by the fourth device after executing the third debugging command on the third process, and the third debugging data is sent by the fourth device to the third device after executing the third debugging command on the third process, and the third debugging data carries the identifier of the fourth device and the identifier of the third process. In some embodiments of the present application, the client device (e.g., the second device) in the debugging cluster can cooperatively debug multiple processes (e.g., the first process and the third process) associated with each other in multiple devices (e.g., the third device and the fourth device) in the distributed device cluster.
[0036] In a possible implementation, the second debugging module is further configured to receive a viewing request from the second device; and in response to the viewing request, send the second debugging data to the second device. In some embodiments of the present application, the server device (e.g., the first device) can further receive a viewing request from the client device (e.g., the second device), and send the second debugging data corresponding to the second debugging command to the client device (e.g., the second device) so as to display the second debugging data on the UI interface of the client device (e.g., the second device).
[0037] In a possible implementation, the second debugging module is further configured to send the second debugging data to the framework layer so as to display the second debugging data on the UI interface by the framework layer. In some embodiments of the present application, the server device (e.g., the first device) can directly display the second debugging data corresponding to the second debugging command on the UI interface of the server device (e.g., the first device).
[0038] In a possible implementation, the second debugging module is further configured to send the first debugging data to the framework layer so as to display the first debugging data on the UI interface by the framework layer. In some embodiments of the present application, the server device (e.g., the first device) can further display the first debugging data corresponding to the first debugging command on the UI interface of the server device (e.g., the first device).
[0039] In a possible implementation, the second debugging module is further configured to establish a communication connection with the second device, and the first device is in communication connection with the third device. The collaborative debugging of multiple debugging devices on one device to be debugged in the distributed device cluster, the cross-device collaborative debugging of one debugging device on multiple devices to be debugged, and the cross-device collaborative debugging of multiple debugging devices on multiple devices to be debugged provided in the present application can be implemented based on the established debugging cluster including the debugging server and the debugging client.
[0040] In a possible implementation, the second debugging module is specifically configured to send the first debugging data to the second device according to the identifier of the third device and the identifier of the first process carried in the first debugging data. In the scheme provided in the present application, the server device (e.g., the first device) can perform unified management and distribution of the debugging commands.
[0041] In a possible implementation, the second debugging module is further configured to send a command for discovering a debuggable process to the third device, and discover the debuggable process; and receive debuggable process information from the third device, wherein the debuggable process information includes information of the debuggable process discovered by the third device and the fourth device. In the scheme provided in the present application, the first device can be configured to perform unified reporting of all debuggable processes in the distributed device cluster so as to facilitate the user to determine the device to be debugged and the process to be debugged.
[0042] In a fifth aspect, a third device is provided, and the third device comprises: a distributed debugging assistant configured to receive a first debugging command from a first device; invoke a debugging tool in the third device to execute the first debugging command on a first process to obtain first debugging data according to an identifier of the third device and an identifier of the first process carried in the first debugging command; and send the first debugging data to the first device; wherein the first debugging command corresponds to the first process in the third device, the first debugging command carries the identifier of the third device and the identifier of the first process, and the first debugging data carries the identifier of the third device and the identifier of the first process.
[0043] The technical solution provided in the fifth aspect above can enable a client device (e.g., the second device) in a debugging cluster composed of multiple debugging devices (e.g., the first device and the second device) to forward a debugging command triggered by a user to a device under debugging (e.g., the third device) through a server device (e.g., the first device) connected to a master device (e.g., the third device) in the distributed device cluster, so that the device under debugging (e.g., the third device) can execute a debugging operation on a process under debugging (e.g., the first process) according to the debugging command and return debugging data (e.g., the first debugging data). In this way, the multiple debugging devices can perform collaborative debugging on the process under debugging in the existing debugging system.
[0044] In a possible implementation, the distributed debugging assistant is further configured to receive a second debugging command from the first device; send the second debugging command to a fourth device according to an identifier of the fourth device carried in the second debugging command; receive second debugging data from the fourth device; and send the second debugging data to the first device; wherein the second debugging command corresponds to a second process in the fourth device, the second process is associated with the first process, the second debugging command carries the identifier of the fourth device and the identifier of the second process, and the second debugging data carries the identifier of the fourth device and the identifier of the second process. In some embodiments of the present application, the server device (e.g., the first device) and the client device (e.g., the second device) in the debugging cluster can collaboratively perform debugging on multiple processes (e.g., the first process and the second process) associated with each other in multiple devices (e.g., the third device and the fourth device) in the distributed device cluster.
[0045] In a possible implementation, the distributed debugging assistant is further configured to: receive a third debugging command from the first device, send the third debugging command to a fourth device according to an identifier of the fourth device carried in the third debugging command, receive third debugging data from the fourth device, and send the third debugging data to the first device, where the third debugging command corresponds to a third process in the fourth device, the third debugging command carries an identifier of the fourth device and an identifier of the third process, and the third debugging data is debugging data obtained by the fourth device after the third process executes the third debugging command, and the third debugging data carries the identifier of the fourth device and the identifier of the third process. In some embodiments of the present application, the client device (for example, the second device) in the debugging cluster can perform cooperative debugging on the processes (for example, the first process and the third process) associated with each other in the multiple devices (for example, the third device and the fourth device) in the distributed device cluster.
[0046] In a possible implementation, the distributed debugging assistant is further configured to: perform device discovery, and establish a communication connection with the fourth device after discovering the fourth device, where the third device is in communication connection with the first device. The cooperative debugging of multiple debugging devices on one device to be debugged in the distributed device cluster, the cross-device cooperative debugging of one debugging device on multiple devices to be debugged, and the cross-device cooperative debugging of multiple debugging devices on multiple devices to be debugged provided in the present application can be implemented based on the established distributed device cluster including the master device (for example, the third device) and the slave device (for example, the fourth device).
[0047] In a possible implementation, the distributed debugging assistant is further configured to: receive, from the first device, a command for discovering a debuggable process, send the command for discovering the debuggable process to the fourth device, discover a first debuggable process, receive, from the fourth device, information about a second debuggable process discovered by the fourth device, and send the information about the debuggable process to the first device, where the first debuggable process includes the first process, the second debuggable process includes the second process and the third process, and the information about the debuggable process includes information about the first debuggable process and information about the second debuggable process. In the scheme provided in the present application, the first device can be configured to uniformly report all the debuggable processes in the distributed device cluster, so as to facilitate the user to determine the device to be debugged and the process to be debugged.
[0048] In a sixth aspect, a first device is provided, comprising: a memory configured to store a computer program; a transceiver configured to transmit and receive radio signals; and a processor configured to execute the computer program to cause the first device to receive, from a second device via the transceiver, a first debugging command corresponding to a first process in a third device, transmit the first debugging command to the third device, receive first debugging data from the third device, and transmit the first debugging data to the second device, wherein the first debugging command carries an identifier of the third device and an identifier of the first process, and the first debugging data is debugging data obtained by the third device after executing the first debugging command on the first process and carries the identifier of the third device and the identifier of the first process.
[0049] The sixth aspect provides a technical solution in which a client device (e.g., the second device) in a debugging cluster composed of multiple debugging devices (e.g., the first device and the second device) can forward a user-triggered debugging command to a device under debugging via a server device (e.g., the first device) connected to a master device (e.g., the third device) in a distributed device cluster, thereby achieving cooperative debugging of a process under debugging by multiple debugging devices in a debugging system.
[0050] In a possible implementation, the processor is further configured to execute the computer program to cause the first device to, in response to a user-triggered debugging event, obtain a second debugging command, and transmit the second debugging command for a second process in a fourth device to a second debugging module via the transceiver, transmit the second debugging command to the third device, and receive second debugging data from the third device, the second debugging data being debugging data obtained by the fourth device after executing the second debugging command on the second process, the second debugging data being transmitted by the fourth device to the third device after executing the second debugging command on the second process, the second debugging data carrying an identifier of the fourth device and an identifier of the second process, the second process being associated with the first process, and the second debugging command carrying the identifier of the fourth device and the identifier of the second process. In some embodiments of the present application, a server device (e.g., the first device) and a client device (e.g., the second device) in a debugging cluster can cooperatively debug multiple processes (e.g., the first process and the second process) associated with each other in multiple devices (e.g., the third device and the fourth device) in a distributed device cluster.
[0051] In a possible implementation, the transceiver is further configured to receive a third debugging command from the second device, send the third debugging command to the third device, receive third debugging data from the third device, and send the third debugging data to the second device, wherein the third debugging command corresponds to a third process in the fourth device, the third debugging command carries an identifier of the fourth device and an identifier of the third process, the third debugging data is obtained by the fourth device after executing the third debugging command on the third process, the third debugging data is sent by the fourth device to the third device after executing the third debugging command on the third process, and the third debugging data carries the identifier of the fourth device and the identifier of the third process. In some embodiments of the present application, the client device (such as the second device) in the debugging cluster can cooperatively debug the processes (such as the first process and the third process) associated with the multiple devices (such as the third device and the fourth device) in the distributed device cluster.
[0052] In a possible implementation, the transceiver is further configured to receive a viewing request from the second device, and send the second debugging data to the second device in response to the viewing request. In some embodiments of the present application, the server device (such as the first device) can further receive a viewing request from the client device (such as the second device), and send the second debugging data corresponding to the second debugging command to the client device (such as the second device) to facilitate the client device (such as the second device) to display the second debugging data on the UI interface.
[0053] In a possible implementation, the transceiver is further configured to send the second debugging data to the framework layer to facilitate the framework layer to display the second debugging data on the UI interface. In some embodiments of the present application, the server device (such as the first device) can directly display the second debugging data corresponding to the second debugging command on the UI interface of the server device (such as the first device).
[0054] In a possible implementation, the processor is further configured to send the first debugging data to the framework layer to facilitate the framework layer to display the first debugging data on the UI interface. In some embodiments of the present application, the server device (such as the first device) can further display the first debugging data corresponding to the first debugging command on the UI interface of the server device (such as the first device).
[0055] In a possible implementation, the processor is further configured to establish a communication connection with the second device, and the first device is in communication connection with the third device. The cooperative debugging of the multiple debugging devices on the one device to be debugged in the distributed device cluster, the cross-device cooperative debugging of one debugging device on the multiple devices to be debugged, and the cross-device cooperative debugging of the multiple debugging devices on the multiple devices to be debugged provided in the present application can be implemented based on the established debugging cluster including the debugging server and the debugging client.
[0056] In a possible implementation, the processor is configured to send the first debugging data to the second device via the transceiver according to the identifier of the third device and the identifier of the first process carried in the first debugging data. In the solution provided in the present application, the server device (e.g., the first device) can uniformly manage and distribute the debugging commands.
[0057] In a possible implementation, the transceiver is further configured to send, to the third device, a command for discovering a debuggable process, to discover the debuggable process; and receive, from the third device, debuggable process information including information of the debuggable process discovered by the third device and the fourth device. In the solution provided in the present application, the first device can be configured to uniformly report all the debuggable processes in the distributed device cluster, to facilitate the user to determine the device to be debugged and the process to be debugged.
[0058] In a seventh aspect, a third device is provided, which includes: a memory configured to store a computer program; a transceiver configured to send and receive radio signals; and a processor configured to execute the computer program, so that the third device performs the following operations: receiving, via the transceiver, a first debugging command from a first device; invoking a debugging tool in the third device according to an identifier of the third device and an identifier of a first process carried in the first debugging command, to execute the first debugging command on the first process, to obtain first debugging data; and sending, via the transceiver, the first debugging data to the first device; wherein the first debugging command corresponds to the first process in the third device, and the first debugging command carries the identifier of the third device and the identifier of the first process; and the first debugging data carries the identifier of the third device and the identifier of the first process.
[0059] The solution provided in the seventh aspect can be used for the client device (e.g., the second device) in the debugging cluster composed of multiple debugging devices (e.g., the first device and the second device) to forward the debugging command triggered by the user to the device to be debugged via the server device (e.g., the first device) connected to the master device (e.g., the third device) in the distributed device cluster, so that the device to be debugged (e.g., the third device) performs the debugging operation on the process to be debugged (e.g., the first process) according to the debugging command, and returns the debugging data (e.g., the first debugging data), in this way, the multiple debugging devices can perform the cooperative debugging on the process to be debugged in the debugging system.
[0060] In a possible implementation, the transceiver is further configured to receive a second debugging command from the first device, send the second debugging command to a fourth device according to an identifier of the fourth device carried in the second debugging command, receive second debugging data from the fourth device, and send the second debugging data to the first device, wherein the second debugging command corresponds to a second process in the fourth device, the second process is associated with the first process, the identifier of the fourth device and an identifier of the second process are carried in the second debugging command, and the identifier of the fourth device and the identifier of the second process are carried in the second debugging data. In some embodiments of the present application, the server device (such as the first device) and the client device (such as the second device) in the debugging cluster can cooperatively debug the processes (such as the first process and the second process) associated with each other in the multiple devices (such as the third device and the fourth device) in the distributed device cluster.
[0061] In a possible implementation, the transceiver is further configured to receive a third debugging command from the first device, send the third debugging command to a fourth device according to an identifier of the fourth device carried in the third debugging command, receive third debugging data from the fourth device, and send the third debugging data to the first device, wherein the third debugging command corresponds to a third process in the fourth device, the identifier of the fourth device and an identifier of the third process are carried in the third debugging command, the third debugging data is obtained by the fourth device after executing the third debugging command on the third process, and the identifier of the fourth device and the identifier of the third process are carried in the third debugging data. In some embodiments of the present application, the client device (such as the second device) in the debugging cluster can cooperatively debug the processes (such as the first process and the third process) associated with each other in the multiple devices (such as the third device and the fourth device) in the distributed device cluster.
[0062] In a possible implementation, the processor is further configured to perform device discovery, and establish a communication connection with a fourth device after discovering the fourth device, wherein the third device is in a communication connection with the first device. The cooperative debugging of the multiple debugging devices on the one device to be debugged in the distributed device cluster, the cross-device cooperative debugging of one debugging device on the multiple devices to be debugged, and the cross-device cooperative debugging of the multiple debugging devices on the multiple devices to be debugged provided in the present application can be implemented based on the established distributed device cluster including the master device (such as the third device) and the slave device (such as the fourth device).
[0063] In a possible implementation, the transceiver is further configured to: receive, from the first device, a command to discover the debuggable processes; send, to the fourth device, the command to discover the debuggable processes; receive, from the fourth device, information of second debuggable processes discovered by the fourth device; and send, to the first device, the information of the debuggable processes; and the processor is further configured to discover the first debuggable processes, wherein the first debuggable processes comprise the first processes, the second debuggable processes comprise the second processes and the third processes, and the information of the debuggable processes comprises the information of the first debuggable processes and the information of the second debuggable processes. In the scheme provided in the present application, the first device can be configured to uniformly report all the debuggable processes in the distributed device cluster, so as to facilitate the user to determine the debugged device and the debugged process.
[0064] In an eighth aspect, a debugging system is provided, which comprises the first device in any possible implementation of the fourth aspect or the sixth aspect, and the third device in any possible implementation of the fifth aspect or the seventh aspect. The debugging system is configured to implement the method in any possible implementation of the third aspect.
[0065] In a ninth aspect, a computer readable storage medium is provided, which stores computer program codes. The computer program codes are executed by a processor to implement the method in any possible implementation of the first aspect or the second aspect.
[0066] In a tenth aspect, a chip system is provided, which comprises a processor and a memory. The memory stores computer program codes. The computer program codes are executed by the processor to implement the method in any possible implementation of the first aspect or the second aspect. The chip system can be composed of a chip, or can comprise a chip and other discrete devices.
[0067] In an eleventh aspect, a computer program product is provided, which, when running on a computer, enables the implementation of the method in any possible implementation of the first aspect or the second aspect. BRIEF DESCRIPTION OF DRAWINGS
[0068] Figure 1 An example diagram of a distributed device cluster architecture is provided.
[0069] Figure 2 An example diagram of a hardware structure of an electronic device provided by an embodiment of the present application is provided.
[0070] Figure 3A An example diagram of a debugging system framework provided by an embodiment of the present application is provided.
[0071] Figure 3B Another example diagram of a debugging system framework provided by an embodiment of the present application is provided.
[0072] Figure 4 An example diagram of a debugging system framework is provided for an embodiment of the present application;
[0073] Figure 5 An example diagram of a debugging system structure is provided for an embodiment of the present application;
[0074] Figure 6A An example diagram of a debugging device structure is provided for an embodiment of the present application;
[0075] Figure 6B An example diagram of a second debugging module workflow is provided for an embodiment of the present application;
[0076] Figure 7 An example diagram of another debugging device structure is provided for an embodiment of the present application;
[0077] Figure 8 An example diagram of a connection establishment stage and a debuggable process determination stage process is provided for an embodiment of the present application;
[0078] Figure 9 An example diagram of a network topology structure UI interface is provided for an embodiment of the present application;
[0079] Figure 10A An example diagram of a debuggable process UI interface is provided for an embodiment of the present application;
[0080] Figure 10B An example diagram of a hardware state interface of a device being debugged is provided for an embodiment of the present application;
[0081] Figure 11 A method flowchart of multi-device debugging multi-device is provided for an embodiment of the present application;
[0082] Figure 12 Another method flowchart of multi-device debugging multi-device is provided for an embodiment of the present application;
[0083] Figure 13 A method flowchart of single-device debugging multi-device is provided for an embodiment of the present application;
[0084] Figure 14 A method flowchart of multi-device debugging single-device is provided for an embodiment of the present application;
[0085] Figure 15 A structural block diagram of an electronic device is provided for an embodiment of the present application. DETAILED DESCRIPTION
[0086] The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application. In the description of the embodiments of the present application, unless otherwise specified, " / " represents the meaning of or, for example, A / B can represent A or B; in this document, "and / or" is only a description of the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B, which can represent: A exists alone, A and B exist together, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.
[0087] Hereinafter, the terms "first" and "second" are only for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Therefore, the features defined with "first" and "second" can explicitly or implicitly include one or more of the features. In the description of the embodiments, unless otherwise specified, the meaning of "multiple" is two or more than two.
[0088] The embodiments of the present application provide a software debugging method, which is used in the debugging process of an application process running in one or more debugged devices by a developer using one or more debugging devices, for example, in the debugging process of an application process running in one or more devices in a distributed device cluster by a developer using one or more debugging devices.
[0089] For example, the distributed device cluster can include Figure 1 The illustrated smart phone, television, wireless earphone, smart watch, sound box, personal computer (PC), tablet computer, augmented reality (AR) / virtual reality (VR) device, and internet of things (IOT) device (such as smart home device). Among them, IOT is an important part of the future information technology development, and its main technical feature is to connect objects through communication technology and network, so as to realize the intelligent network of man-machine interconnection and object-object interconnection. IOT technology can realize mass connection, deep coverage and terminal power saving, etc.
[0090] For another example, a "1+8+N" terminal product can be included in a distributed device cluster. The "1+8+N" terminal product is used to create a full-scene smart life of future fifth-generation (5G) mobile communication technology. For example, "1" refers to a smartphone, which is an entry to future smart life; "8" refers to a tablet, a PC, a wearable device, a high-definition (HD) device, an artificial intelligence (AI) sound box, a headset, an AR / VR device, and a car device; and "N" refers to an IOT device, such as a smart home device.
[0091] A process is a running activity of a program on a certain data set in a computer, is a basic unit of resource allocation and scheduling of a system, and is a basis of an operating system structure. In an early computer structure designed for a process, a process is a basic execution entity of a program. In a contemporary computer structure designed for a thread, a process is a container of a thread. A program is a description of an instruction, data, and an organization form, and a process is an entity of a program.
[0092] In the embodiments of the present application, the device under test can be a desktop device, a laptop device, a handheld device, a wearable device, a smart home device, a computing device, or a vehicle-mounted device, for example. For example, the device under test can be a smartphone, a television, a wireless earphone, a smart watch, a sound box, a PC, a tablet computer, an AR / VR device, an IOT device, a netbook, an ultra-mobile personal computer (UMPC), a smart camera, a personal digital assistant (PDA), a portable multimedia player (PMP), an airborne device on an aircraft, an airborne device on a robot, a control device in industrial control, a wireless device in telemedicine, a smart device in a smart grid, a smart device in a smart city, a smart device in a smart home, and the like. Figure 1 In the embodiments of the present application, the device under test can be a desktop device, a laptop device, a handheld device, a wearable device, a smart home device, a computing device, or a vehicle-mounted device, for example. For example, the device under test can be a smartphone, a television, a wireless earphone, a smart watch, a sound box, a PC, a tablet computer, an AR / VR device, an IOT device, a netbook, an ultra-mobile personal computer (UMPC), a smart camera, a personal digital assistant (PDA), a portable multimedia player (PMP), an airborne device on an aircraft, an airborne device on a robot, a control device in industrial control, a wireless device in telemedicine, a smart device in a smart grid, a smart device in a smart city, a smart device in a smart home, and the like.
[0093] Moreover, the device being debugged can also be an access terminal, a subscriber unit, a subscriber station, a mobile station, a mobile, a relay station, a remote station, a remote terminal, a mobile device, a user terminal (UE), a terminal, a wireless communication device, a user agent, or a user device. The terminal device can also be a cellular phone, a cordless phone, a session initiation protocol (SIP) phone, a wireless local loop (WLL) station, a handheld device having wireless communication function, a computing device, or other processing device connected to a wireless modem, a terminal device in future 5G network, a terminal device in future evolved PLMN, a terminal device in future vehicle-to-everything, etc.
[0094] Moreover, the device being debugged can also be a terminal device in IOT system, etc. The specific type and structure of the device being debugged are not limited in the application.
[0095] In the embodiments of the application, the debugging device usually has a display screen for showing the debugging UI interface to the developer. For example, the debugging device can be a PC, a UMPC, a tablet computer, a netbook, etc. The embodiments of the application are not limited.
[0096] Please refer to Figure 2 , Figure 2 A hardware structure schematic diagram of an electronic device provided in an embodiment of the application is shown. The electronic device can be a debuggable device or a debugging device. As Figure 2 shown, the electronic device can specifically include a processor 210, a memory 220, a USB interface 230, a charging management module 240, a power management module 241, a battery 242, an antenna 1, an antenna 2, a mobile communication module 250, a wireless communication module 260, an audio module 270, a loudspeaker 270A, a receiver 270B, a microphone 270C, a headset interface 270D, a key 280, a motor 291, an indicator 292, a camera 293, a display screen 294, etc.
[0097] It can be understood that the structure shown in the embodiments of the application does not constitute a specific limitation on the electronic device. In other embodiments of the application, the electronic device can include more or fewer components than those shown, or combine certain components, or split certain components, or different arrangement of components. The components shown can be implemented in hardware, software, or a combination of software and hardware.
[0098] The processor 210 can include one or more processing units. For example, the processor 210 can include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a flight controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units can be independent devices or integrated in one or more processors.
[0099] The processor 210 can also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 210 is a cache memory. The memory can hold instructions or data that the processor 210 has just used or is recycling. If the processor 210 needs to use the instructions or data again, it can call them directly from the memory. This avoids repeated access and reduces the processor 210's waiting time, thus improving the efficiency of the system.
[0100] In some embodiments, the processor 210 can include one or more interfaces. The interfaces can include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a USB interface, etc. In the embodiments of the present application, the USB interface of the debugging device can be used to perform Client / Server (C / S) networking. In some embodiments, the USB interface of the debugging device can also be used to establish a communication connection with devices in a distributed device cluster.
[0101] The wireless communication function of the electronic device can be implemented by the antenna 1, the antenna 2, the mobile communication module 250, the wireless communication module 260, the modem processor, and the baseband processor, etc.
[0102] The antenna 1 and the antenna 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the electronic device can be used to cover a single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization of the antennas. For example, the antenna 1 can be multiplexed as a diversity antenna of a wireless local area network. In some other embodiments, the antennas can be used in combination with a tuning switch.
[0103] The mobile communication module 250 can provide a solution for wireless communication including 2G / 3G / 4G / 5G, etc. applied on the electronic device. The mobile communication module 250 can include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 250 can receive electromagnetic waves by the antenna 1, and perform filtering, amplification, etc. on the received electromagnetic waves, and transmit the processed electromagnetic waves to the modem processor for demodulation. The mobile communication module 250 can also amplify the signals modulated by the modem processor, and convert the signals into electromagnetic waves radiated by the antenna 1. In some embodiments, at least part of the functional modules of the mobile communication module 250 can be arranged in the processor 210. In some embodiments, at least part of the functional modules of the mobile communication module 250 and at least part of the modules of the processor 210 can be arranged in the same device.
[0104] The modem processor can include a modulator and a demodulator. The modulator is used to modulate a low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. The low-frequency baseband signal processed by the baseband processor is transmitted to the application processor. The application processor outputs a sound signal through an audio device (not limited to the loudspeaker 270A, the microphone 270B, etc.), or displays an image or a video through the display screen 294. In some embodiments, the modem processor can be an independent device. In some other embodiments, the modem processor can be independent of the processor 210, and arranged in the same device as the mobile communication module 250 or other functional modules.
[0105] The wireless communication module 360 can provide a wireless communication solution applied to the electronic device, including wireless local area networks (WLAN) (such as a Wi-Fi network), Bluetooth (BT), a global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (IR), and the like. The wireless communication module 260 can be one or more devices that integrate at least one communication processing module. The wireless communication module 260 receives electromagnetic waves via the antenna 2, frequency-modulates and filters the electromagnetic wave signals, and transmits the processed signals to the processor 210. The wireless communication module 260 can also receive signals to be transmitted from the processor 210, frequency-modulate them, amplify them, and radiate them as electromagnetic waves via the antenna 2. In the embodiments of the present application, the wireless communication module 260 of the debugging device can be used to perform client / server (C / S) networking. In some embodiments, the wireless communication module 260 of the debugging device can also be used to establish a communication connection with devices in a distributed device cluster.
[0106] In some embodiments, the antenna 1 and the mobile communication module 250 of the electronic device are coupled, and the antenna 2 and the wireless communication module 360 are coupled, so that the electronic device can communicate with a network and other devices through wireless communication technology. The wireless communication technology can include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology, etc. The GNSS can include a global positioning system (GPS), a global navigation satellite system (GLONASS), a beidu navigation satellite system (BDS), a quasi-zenith satellite system (QZSS), and / or a satellite based augmentation systems (SBAS).
[0107] The electronic device implements a display function through a GPU, the display 294, and an application processor, etc. The GPU is a microprocessor for image processing, connected to the display 294 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. For example, in the embodiments of the present application, the processor 210 can include one or more GPUs that execute program instructions to generate or change display information. In the embodiments of the present application, the device under test can implement the display of the UI interface through the GPU, the display 294, and the application processor, etc. The device under test can implement the display of the application interface corresponding to the process through the GPU, the display 294, and the application processor, etc.
[0108] The display screen 294 is configured to display images, videos, and the like. The display screen 294 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flex light-emitting diode (FLED), a Miniled, a MicroLed, a Micro-oLed, a quantum dot light emitting diodes (QLED), or the like. In some embodiments, the electronic device can include one or N display screens 294, where N is a positive integer greater than 1. In the embodiments of the present application, the debugging device can display a UI interface through the one or N display screens 294. The device being debugged can display an application interface corresponding to a process through the one or N display screens 294.
[0109] The memory 220 can be configured to store computer-executable program code including instructions. The memory 220 can include a program storage area and a data storage area. The program storage area can store an operating system, at least one application program required by a function (such as a sound playing function, an image playing function, and the like), and the like. The data storage area can store data (such as audio data, a phone book, and the like) created during use of the electronic device, and the like. In addition, the memory 220 can include a high-speed random access memory, and can further include a nonvolatile memory such as at least one of a magnetic disk storage device, a flash memory device, a universal flash storage (UFS), and the like. The processor 210 executes various function applications and data processing of the electronic device by running the instructions stored in the memory 220 and / or the instructions stored in the memory disposed in the processor.
[0110] It should be noted that, Figure 2 The hardware modules included in the electronic device shown are only described by way of example, and do not limit the specific structure of the electronic device. For example, the electronic device can further include other hardware modules that have an interaction relationship with the hardware modules shown in the figure, which are not specifically limited here.
[0111] In the embodiments of the present application, the application process running in one or more devices can be implemented based on a programming language, for example, C / C++, Java, JavaScript (JS), Python, hypertext markup language (HTML), or professional hypertext preprocessor (PHP), etc. The embodiments of the present application are not limited.
[0112] Generally, a developer can debug an application process based on a debugger, for example, an integrated development environment (IDE). For example, the IDE can be a DevEco Studio development platform, IntelliJ IDEA developed by JetBrains based on the Intellij open source framework, Android Studio developed by Google based on the Intellij open source framework, Visual Studio developed by Microsoft, or Eclipse developed by Eclipse Foundation, NetBeans developed by Apache,
[0113] The DevEco Studio development platform is designed to help developers quickly, conveniently and efficiently use the open capabilities of the operating system. For example, it is used to help developers support application development for “1+8+N” all-scene general terminals, and realize cross-terminal ecological sharing. For example, the DevEco Studio development platform can be specifically used for remote real machine and cloud testing capabilities, and help developers improve application quality and experience. Generally, the IDE can also be referred to as a compiler, debugger or programming software.
[0114] For example, please refer to Figure 3A , Figure 3A Taking the Intellij open source framework as an example, a debugging system framework example diagram is shown. As Figure 3A shown, the debugging system includes a debugging device and a debugged device. The debugging device integrates a framework (Framework) layer and a first debugging module. For example, the first debugging module can include a debugging plug-in (debug plugin). The debugged device integrates a debugging tool (debug tool) and runs one or more debuggable processes (wherein Figure 3A only taking an example of the debugged device running one debuggable process).
[0115] In Figure 3AOn the debugging device shown, the Framework layer can generate a debugging command according to a detected debugging event triggered by a developer (for example, a debugging event triggered by the developer on a user interface (UI) (hereinafter referred to as a UI interface)) on the process being debugged, and send the debugging command to the first debugging module. The first debugging module can convert the debugging command from the Framework layer into a debugging command corresponding to a specific debug tool protocol. In addition, the first debugging module can send the converted debugging command to the debug tool of the device being debugged through a communication connection (such as a wired connection or a wireless connection) between the debugging device and the device being debugged. For example, the debugging command can include, but is not limited to, a breakpoint command, a jump command, a read / write command, and the like. The breakpoint command refers to a debugging command that pauses the current task (i.e., program), executes another task (interruption service program), and then returns to the original task for continuous execution after execution.
[0116] For example, the wired connection can be a connection through a universal serial bus (USB) or a network cable connection, and the like; and the wireless connection can be a wireless fidelity (Wi-Fi) connection, and the like. The application does not limit the specific network connection mode between the debugging device and the device being debugged.
[0117] For example, the debug tool can be a Java language debugging tool JDB, a C++ language debugging tool GDB or LLDB, or a JS debugging tool V8, and the like, and the embodiments of the application are not limited.
[0118] The debug tool of the device being debugged parses the received debugging command from the debugging device to obtain the instruction and data corresponding to the debugging command. In addition, the debug tool (debug tool) interrupts the debuggable process according to the instruction and data obtained by parsing, and obtains the specified debugging information (such as variable value and / or stack information, and the like) after interruption and feeds back to the debugging plugin. The debugging plugin parses the debugging information from the debug tool (debug tool), and calls the framework interface on the UI interface according to the data model required by the Framework layer to display to the developer. The data model can include, but is not limited to, the file path line of the breakpoint or the line where the breakpoint is located, and the like.
[0119] It should be noted that, based on similar Figure 3AThe debug system framework shown can realize the debugging of a debug device on a debugable process on a debugged device. However, based on a similar Figure 3A The debug system framework shown, the debug device cannot perform cross-process debugging. Cross-process debugging refers to cooperative debugging of multiple application processes that are associated with each other.
[0120] In addition, based on a similar Figure 3A The debug system framework shown also cannot realize cross-device / cross-process cooperative debugging in a distributed scenario. For example, assume that in a scenario in which a smart watch controls a large screen device (such as a television), communication, connection, and control synchronization between the smart watch and the large screen device need to be cooperatively debugged. However, based on a similar Figure 3A The debug system framework shown cannot realize cross-device cooperative debugging of the smart watch and the large screen device.
[0121] To solve the above problems, embodiments of the present application provide a software debugging method, which can realize cooperative debugging of one or more devices in a distributed scenario. For example, the method can realize cooperative debugging of multiple debug devices on one debugged device in a distributed device cluster, cooperative debugging of one debug device on multiple debugged devices, cooperative debugging of multiple debug devices on multiple debugged devices, and the like.
[0122] The software debugging method provided by embodiments of the present application can be implemented based on the debug system framework shown in Figure 3B As shown in Figure 3B The debug system provided by embodiments of the present application can include a debug device and a debugged device. The debug device integrates a framework layer and a second debugging module. For example, the second debugging module can include a debugger distribute layer. The debugged device integrates a distributed debugging assistant and a debug tool, and one or more debugable processes run in the debugged device (wherein Figure 3B For example, only one debugable process runs in the debugged device). The debugged device integrates a distributed debugging assistant and a debug tool, and one or more debugable processes run in the debugged device (wherein Figure 3B For example, only one debugable process runs in the debugged device).
[0123] In Figure 3BThe framework layer can generate a debugging command according to a detected debugging event triggered by a developer (for example, a debugging event triggered by a developer on a UI interface) of a debugging process of the debugging device, and send the debugging command to the second debugging module.
[0124] The second debugging module can be used for networking between multiple debugging devices. Through the networking between multiple debugging devices, the developer can realize the cooperative debugging of one or more debugging devices on one or more debugging devices.
[0125] The second debugging module can also be used to shield the debugging protocol differences between debugging devices in different languages. For example, the data model (such as a java object, a C++ object, etc.) of the framework layer in different languages is connected using a unified protocol, such as a specified protocol (such as a DAP protocol) or a custom protocol.
[0126] In some embodiments, the second debugging module can convert the debugging command from the Figure 3B The framework layer into a debugging command corresponding to a specific debugging tool protocol. Further, the second debugging module can also send the converted debugging command to the second debugging module of other debugging devices (wherein the other debugging devices are not shown) so that the second debugging module of the other debugging devices forwards the debugging command to the corresponding debugging device. Among them, the debugging command received by the second debugging module carries the identification of the debugging device and the identification of the debugging process. Figure 3B
[0127] In other embodiments, the second debugging module can also receive the debugging command from the second debugging module of other debugging devices (wherein the other debugging devices are not shown). And forward the debugging command from the second debugging module of the other debugging devices to the corresponding debugging device. Figure 3B
[0128] The second debugging module is also used to establish a direct connection relationship with the debugging device, or to establish an indirect connection relationship with the debugging device through other electronic devices. Among them, the second debugging module establishes an indirect connection relationship with the debugging device through other electronic devices means that the second debugging module establishes a direct connection relationship through other electronic devices to establish an indirect connection relationship with the debugging device connected to the device through the device. About this part, it will be introduced in detail below.
[0129] The distributed debugging assistant in the debugging device is used to receive the debugging command from the second debugging module.
[0130] In some embodiments, in the debugging device shown in Figure 3B and the second debugging module shown in Figure 3B The second debugging module establishes a direct connection relationship, Figure 3B The distributed debugging assistant can distribute or execute the debugging command according to the identification of the debugging device carried in the debugging command from the second debugging module.
[0131] For example, when the debugging command is for Figure 3B the process in the debugging device, Figure 3B The distributed debugging assistant can convert the debugging command into a debugging command in the corresponding thread language, and call the specific debugging tool (such as LLDB-MI or JDB) installed in the debugging device to send the debugging command to the debugging process and receive the debugging information of the debugging process returned by the debugging tool.
[0132] For another example, when the debugging command is for other debugging devices (wherein Figure 3B other debugging devices are not shown), Figure 3B The distributed debugging assistant can distribute the debugging command to the distributed debugging assistant of the corresponding debugging device according to the identification of the debugging device carried in the debugging command from the second debugging module. And, receive the debugging information of the debugging process returned by the other debugging devices.
[0133] Further, when Figure 3B the debugging device establishes a direct connection relationship with Figure 3B the second debugging module, Figure 3B The distributed debugging assistant can also be used to feed back the obtained debugging information to the second debugging module of the debugging device, so that the second debugging module converts the debugging information into a data format and a data model corresponding to the language. And, call the interface of the framework layer to trigger the display of the result of the debugging operation on the UI interface of the debugging device, so as to feed back the result of the debugging operation to the developer through the UI interface.
[0134] In some other embodiments, when Figure 4 the debugging device establishes an indirect connection relationship with Figure 4 the debugging device through other electronic devices (wherein Figure 4 other debugging devices are not shown), Figure 4The illustrated distributed debugging assistant can be used to receive the debugging command forwarded by the distributed debugging assistant of the other electronic device. The debugging command is converted into a debugging command in the corresponding thread language, and a specific debugging tool (such as LLDB-MI or JDB) installed in the device under debugging is called to send the debugging command to the process under debugging, and the debugging information returned by the debugging tool is obtained. The debugging information obtained is forwarded to the second debugging module of the debugging device through the distributed debugging assistant of the other electronic device, so that the second debugging module converts the debugging information into a data format and a data model corresponding to the language. In addition, the interface of the framework layer is called to trigger the display of the result of the debugging operation on the UI interface of the debugging device, so as to feed back the result of the debugging operation to the developer through the UI interface.
[0135] Based on Figure 4 The debugging device integrated with the second debugging module and the device under debugging integrated with the distributed debugging assistant can be used by the developer to cooperatively debug the application processes associated with each other in multiple devices under debugging according to actual needs.
[0136] Please refer to Figure 1 , Figure 4 An example diagram of a debugging system framework provided by an embodiment of the present application is shown. The software debugging method provided by the embodiment of the present application can be implemented based on a debugging system framework similar to Figure 4 .
[0137] As Figure 4 shown, the debugging system provided by the embodiment of the present application can include a debugging server 41 and a distributed device cluster 42. The distributed device cluster 42 includes one or more electronic devices, for example Figure 4 is an example of multiple electronic devices for implementing the same or different functions in the structure shown in Figure 4 .
[0138] In some embodiments, the debugging system can also include one or more debugging clients. Among them, Figure 4 Taking an example of a debugging system including two debugging clients (debugging client A 43 and debugging client B 44), when the debugging system includes multiple debugging devices, for example, a debugging server and one or more debugging clients, the debugging server and the one or more debugging clients can form a debugging cluster (also referred to as an IDE cluster). For example, Figure 4 The debugging server 41, the debugging client A 43 and the debugging client B 44 shown can form a debugging cluster.
[0139] Among them, Figure 4In the illustrated debugging system framework, the debugging server 41 is mainly used to establish a communication connection with the host of the distributed device cluster 42 (for example, to establish a communication connection through USB or Wi-Fi, etc.), to network the distributed device cluster, to implement multi-debugger breakpoint power management, to perform cross-process debugging command combination, to manage debugging command distribution, to manage debugging information distribution, and to perform debugging system registration capability monitoring, etc.
[0140] Among them, the host of the distributed device cluster 42 is mainly used to discover the debuggable devices in the distributed device cluster, to discover the debuggable processes, to communicate with the debugging server 41, to forward the debugging commands in the distributed device cluster 42, and to forward the debugging information in the distributed device cluster 42, etc. For example, in the debugging system framework illustrated in Figure 4 In the illustrated debugging system framework, the smartphone is the host (hereinafter referred to as the master device) of the distributed device cluster 42. Corresponding to the master device is the slave device, such as Figure 4 The illustrated television, wireless earphone, smartwatch, sound box, PC, tablet computer, AR / VR device and IOT device are all slave devices.
[0141] It can be understood that the master device is the device in the distributed device cluster that establishes a direct communication connection with the debugging device in the debugging cluster. The slave device is the device in the distributed device cluster that establishes an indirect communication connection with the debugging device in the debugging cluster through the communication connection between the master device.
[0142] In addition, the debugging server 41, the debugging client A 43 and the debugging client B 44 can be electronic devices (such as PCs) of the same structure, and whether the electronic device is a server or a client in the debugging cluster can be defined and set by the developer. For example, if the electronic device 1 (such as the Figure 4 illustrated debugging server 41) is directly connected to the master device (such as the Figure 4 illustrated smartphone) in the distributed device cluster, the electronic device 1 can be understood as a server in the debugging cluster. For another example, if the electronic device 2 (such as the Figure 4 illustrated debugging client A 43 and the debugging client B 44) establishes an indirect connection relationship with the master device (such as the Figure 4 illustrated smartphone) in the distributed device cluster through the communication connection between the electronic device 1 (such as the Figure 4 illustrated debugging server 41), the electronic device 2 can be understood as a client in the debugging cluster.
[0143] As shown in Figure 4 After the debugging client A 43 and the debugging client B 44 perform C / S networking with the debugging server 41, the debugging client A 43 and the debugging client B 44 can communicate with the devices in the distributed device cluster 42 through the debugging server 41. Specifically, as shown in Figure 5As shown, the debugging client A 43 and the debugging client B 44 can communicate with a smartphone (i.e., a master device) or other slave devices (e.g., a TV set, a wireless earphone, a smart watch, a sound box, a PC, a tablet computer, an AR / VR device, and an IOT device) in the distributed device cluster 42 through the debugging server 41. Figure 5 As shown, the TV set, the wireless earphone, the smart watch, the sound box, the PC, the tablet computer, the AR / VR device, and the IOT device are all slave devices.
[0144] In the embodiments of the present application, the debugging client A 43, the debugging client B 44, and the debugging server 41 can implement the following functions: distributed database viewing management, viewing and management of the device registration capability in the distributed device cluster, command overreach detection, and breakpoint decentralization management. Among them, the distributed database is used to provide storage of, for example, debugging devices, debugging commands, debugged devices, debugged processes, and debugging data in a debugging system. The distributed database can store data in multiple data storage nodes connected by communication to obtain greater storage capacity and higher concurrent access.
[0145] Further, the debugging client A 43 and the debugging client B 44 can also implement the aggregation of debugging commands to the server side (i.e., the debugging server 41). The debugging server 41 can also implement debugging command coordination.
[0146] In some embodiments, the debugging client A 43, the debugging client B 44, and the debugging server 41 can rely on modules or units with debugging features to implement one or more of the above functions. In the embodiments of the present application, the devices in the distributed device cluster can communicate with each other. However, it should be noted that the embodiments of the present application do not limit the modules or units relied on to implement the above functions.
[0147] In the embodiments of the present application, the master device and the slave device in the distributed device cluster 42 can implement the following functions: device discovery, distributed device cluster master selection under the master / slave mode, distributed device cluster networking, and distributed database viewing. Among them, the device discovery is used to discover electronic devices, for example, to discover electronic devices connected to the same local area network. The distributed device cluster master selection is used to determine a master device (Master) and one or more slave devices (Slave) in a debugging system. The distributed device cluster networking is used to establish a communication connection between devices in the distributed device cluster. The distributed database viewing is used to obtain data such as debugging devices, debugging commands, debugged devices, and debugged processes in a debugging system by viewing the distributed database.
[0148] In some embodiments, the master device and the slave device can rely on a module or unit with distributed characteristics to implement one or more of the above functions. However, it should be noted that the embodiments of the present application do not limit the specific module or unit relied on to implement the above functions. Further, the master device in the distributed device cluster 42 can also establish a communication connection (such as a communication connection established through USB or Wi-Fi, etc.) with the debugging server 41 and the slave device in the distributed device cluster 42. In some embodiments, if the device being debugged is a slave device in the distributed device cluster, the master device in the distributed device cluster can also issue a debugging command to one or more slave devices, receive debugging data (also referred to as debugging information) fed back by the one or more slave devices, and forward the debugging information to the debugging server.
[0149] It should be noted that the present application does not limit the specific networking mode of the debugging system. For example, the method provided by the embodiments of the present application can also be applied to micro-service debugging systems, etc.
[0150] Based on the debugging system framework shown in FIG. 1, the developer can implement debugging in any of the following scenarios: Figure 5
[0151] 1. Multi-device debugging multi-device.
[0152] For example, the developer uses the debugging client A 43 and / or the debugging client B 44 to perform collaborative debugging on the master device and one or more slave devices in the distributed device cluster 42, or the debugged process in the one or more slave devices, through the debugging server 41. For another example, the developer uses the debugging server 41, and the debugging client A 43 and / or the debugging client B 44 to perform collaborative debugging on the master device and one or more slave devices in the distributed device cluster 42, or the debugged process in the one or more slave devices.
[0153] 2. Single-device debugging multi-device.
[0154] For example, the developer uses the debugging server 41 to perform collaborative debugging on the master device and the debugged process in one or more devices in the distributed device cluster 42. Alternatively, the developer uses the debugging server 41 to perform collaborative debugging on the debuggable process in one or more slave devices in the distributed device cluster 42.
[0155] 3. Multi-device debugging single-device.
[0156] For example, a developer uses the debugging client A 43 and / or the debugging client B 44 to perform collaborative debugging on a debuggee process in a master device in the distributed device cluster 42 through the debugging server 41. For another example, a developer uses the debugging server 41, and the debugging client A 43 and / or the debugging client B 44 to perform collaborative debugging on a debuggee process in a master device in the distributed device cluster 42.
[0157] 4. Single-device debugging single device.
[0158] For example, a developer uses the debugging server 41 to perform debugging on a debuggee process in a master device in the distributed device cluster 42.
[0159] It should be noted that although the conventional debugging technology can also achieve single-device debugging single device, in the conventional debugging technology, the debugging device is directly connected to the debuggee process of the debuggee device through a debugging tool (such as JDB, GDB, etc.). In the scheme provided in the embodiments of the present application, single-device debugging single device can rely on a debugging system framework similar to that shown in the figure. Specifically, in the single-device debugging single device provided in the embodiments of the present application, the debugging device (such as the debugging server 41) itself serves as its own server, and the debuggee device (such as the smart phone) itself serves as its own master device, thereby achieving debugging of the debuggee process in the debuggee device by the debugging device. The implementation details of the two are essentially different, and based on the software debugging method provided in the embodiments of the present application, software debugging in multiple scenarios (such as the multi-device debugging multi-device scenario, the single-device debugging multi-device scenario, the multi-device debugging single-device scenario, or the single-device debugging single-device scenario) can be flexibly implemented. Figure 5
[0160] It should be noted that the present application does not limit the specific networking mode of the debugging system. For example, the method provided in the embodiments of the present application can be applied to a debugging system such as a Hongmeng distributed debugging system or a micro-service distributed debugging system. Regardless of the networking mode of the debugging system, the debugging system has the ability to obtain the following information: the path of the registered interface class, the function name of the registered function, and the code line of the function, etc. For example, for a Hongmeng distributed debugging system, the above information can be obtained from the debugging server; for a micro-service distributed debugging system, the above information can be obtained from the configuration item of the code.
[0161] Please refer to Figure 5 , Figure 5 For example, the debugging cluster includes the debugging server 41, the debugging client A 43, and the debugging client B 44, the distributed device cluster includes the smart phone, the sound box, and the television, and the smart phone is the master device and the television and the sound box are the slave devices. An example diagram of a debugging system structure provided in the embodiments of the present application is shown.
[0162] As shown in Figure 5 Debugging server 41, debugging client A 43 and debugging client B 44 include a framework (Framework) layer and a second debugging module. Among them, the specific functions of the second debugging module are different when the electronic device (such as a PC) is as a debugging server and as a debugging client. For the convenience of understanding, Figure 5 The second debugging module (Server) represents the second debugging module of the debugging server 41, and the second debugging module (Client) represents the second debugging module of the debugging client A 43 and the debugging client B 44. The smart phone, the sound box and the television set include a distributed debugging assistant, a debugging tool and a debugged process (such as Figure 5 The first process, the second process and the third process shown in the figure). For the convenience of understanding, Figure 5 The distributed debugging assistant (Master) represents the distributed debugging assistant of the master device (that is, the smart phone), and the distributed debugging assistant (Slave) represents the distributed debugging assistant of the slave device.
[0163] Among them, the second debugging module (including the second debugging module (Server) and the second debugging module (Client)) is used for networking between multiple IDEs.
[0164] Further, in the embodiment of the present application, the second debugging module (including the second debugging module (Server) and the second debugging module (Client)) can also be used to shield the differences of the debugging protocols between the debugging devices of different languages, and use a unified debugging protocol to interface the data models of different languages of the framework layer. For example, use a specified protocol (such as DAP protocol) or a custom protocol to interface the data models of different languages of the framework layer (such as java objects, C++ objects, etc.).
[0165] The second debugging module (Server) can also be used to establish a communication connection (such as a communication connection established through USB or Wi-Fi, etc.) with the master device (such as Figure 5 The smart phone shown in the figure) in the distributed device cluster, and issue debugging commands to the debugged devices in the distributed device cluster, including the debugging commands sent by the debugging client A 43 or the debugging client B 44 to the second debugging module (Server) through the second debugging module (Client), or the debugging commands from the framework layer of the debugging server 41 are issued to the debugged devices in the distributed device cluster.
[0166] Among them, when the second debugging module (Server) issues the debugging command, the second debugging module (Server) first sends the debugging command to the master device (such as Figure 5a distributed debugging assistant (Master) of the debugging server, and the distributed debugging assistant (Master) further completes subsequent distribution of the debugging command. In addition, the second debugging module (Server) can also be used to send the debugging command to the master device (such as a smartphone shown in FIG. 1) and receive a returned result (that is, debugging information) of the debugging command returned from the debugging device after the distributed debugging assistant (Master) of the debugging server. Figure 5 The returned result (that is, debugging information) is converted into a data format and a data model of a corresponding language, and an interface of a framework layer is called to trigger display of a result of the debugging operation on a UI interface of the debugging device and feed back the result of the debugging operation to the developer.
[0167] The distributed debugging assistant of the debugging device (including the distributed debugging assistant (Master) and the distributed debugging assistant (Slave)) can be used to receive a debugging command for a debugging process in the debugging device, implement device discovery, and perform distributed device cluster master selection and distributed device cluster networking after the devices are discovered.
[0168] Further, the distributed debugging assistant is also used for debugging process discovery and reporting of information of the debugging process.
[0169] Further, the distributed debugging assistant of the master device (Master) is also used to establish a communication connection (such as a communication connection established through USB or Wi-Fi) with the debugging server and the slave device (Slave) in the distributed device cluster, receive a debugging command issued by the debugging server or the debugging client, and distribute the debugging command in the distributed device cluster.
[0170] Further, the distributed debugging assistant of the debugging device is also used to, after receiving the debugging command, convert the debugging command into a debugging command of a corresponding thread language, call a specific debugging tool (such as a debugging tool of LLDB-MI or JDB) installed in the debugging device to send the debugging command to the debugging process, and receive debugging information of the debugging process in the debugging device returned by the debugging tool. For example, the debugging tool can include any one of the following: LLDB-MI, JDB, GDB, LLDB, V8, or PDB.
[0171] In the embodiments of the present application, the debugging device can be a master device (such as a smartphone shown in FIG. 1) in the distributed device cluster, or one or more slave devices (such as a smartphone shown in FIG. 1) in the distributed device cluster. Figure 5 Figure 5 The device may include one or more of the following: television, wireless headphones, smartwatch, speaker, PC, tablet, AR / VR device, and IoT device. It may also include both master devices and one or more slave devices in the distributed device cluster. This application does not limit this.
[0172] When the device being debugged is the master device in a distributed device cluster (e.g.) Figure 5 When the smartphone shown is used, the main device (such as...) Figure 5 The distributed debugging assistant (Master) of the smartphone shown can directly send debugging information for debugging commands to the second debugging module (Server), so that the second debugging module (Server) can then distribute the debugging information. When the device being debugged is a slave device in a distributed device cluster (such as...), the distributed debugging assistant (Master) can directly send debugging information for debugging commands to the second debugging module (Server), so that the second debugging module (Server) can then distribute the debugging information. Figure 5 When the main device (such as the TV or speakers shown) is used, the main device (such as the TV or speakers shown) should be used. Figure 6A The distributed debugging assistant (Master) of the smartphone shown can receive data from slave devices (such as...) Figure 6A The distributed debugging assistant (Slave) of the TV or speaker shown receives debugging information in response to debugging commands and sends the received debugging information to the second debugging module (Server) so that the second debugging module (Server) can distribute subsequent debugging information.
[0173] It should be noted that, Figure 6A In a distributed device cluster, only one debuggable process runs on the master and slave devices (e.g., ...). Figure 6B Taking the first, second, and third processes shown as examples, this application does not limit the number of processes running in the device being debugged. Furthermore, the embodiments of this application do not limit the correspondence between the debugged processes and the debugging tools. For example, Figure 6B The first, second, and third processes shown can be debugged using any of the following debugging tools: LLDB-MI, JDB, GDB, LLDB, V8, or PDB.
[0174] For more details, please refer to Figure 6B , Figure 5 This illustrates one possible structure for the second debug module. For example... Figure 6AAs shown, the second debugging module (including the second debugging module (Server) and the second debugging module (Client)) can include a connector manager, a device manager, a breakpoints manager, a command manager, a debug info manager, and a distributed ability manager.
[0175] In the embodiments of the present application, the connector manager can be specifically used to provide networking capability (for example, C / S networking capability) between the debugging client and the debugging server.
[0176] It should be noted that in the single-device debugging or multi-device debugging scenario in the embodiments of the present application, the above-mentioned connector manager (ConnectorManager) is not required.
[0177] The device manager can be specifically used to connect the master device in the distributed device cluster, so that the debugging server can obtain the device information of each device in the distributed device cluster through the master device. The device manager can also be used to view the capabilities and data of the device under debugging.
[0178] The breakpoints manager can be specifically used to provide breakpoint management between the debugging client and the debugging server. The breakpoint information between the debugging client and the debugging server is visible to each other. For example, the breakpoint information newly added by the debugging client A is visible to the debugging client B; the breakpoint information newly added by the debugging client B is visible to the debugging client A. In the same process, the debugging client or the debugging server can add breakpoints. However, the debugging client or the debugging server can only modify or delete the breakpoints added by itself; between different processes, the debugging client or the debugging server can only modify, delete, or add breakpoints in its own process.
[0179] The command manager can be specifically used to perform cross-process debugging command combination, debugging command issuing management, provide debugging command queue management, combine debugging commands between different IDEs, and manage debugging commands with distributed registration capability. The management of combining debugging commands between different IDEs is mainly used to implement cross-process debugging capability; the management of debugging commands with distributed registration capability is mainly used to support cross-process conditional breakpoint capability.
[0180] The debugging information manager can be specifically used for debugging information receiving, debugging information distribution management, providing distribution of debugging information in an IDE cluster, distribution of public data in the IDE cluster, and distribution of thread information in the IDE cluster. It should be noted that in the single-device debugging scenario of the embodiments of the present application, for example, in the single-device debugging single-device or single-device debugging multiple-device scenario, the distribution of the debugging information, the public data, and the thread information in the IDE cluster will not be involved, and the debugging information, the public data, and the thread information will all be returned to the one debugging device.
[0181] The distributed capability manager can be specifically used for debugging system registration capability monitoring, and providing tracking of the registered capability of each device in the distributed device cluster. For example, in the distributed debugging system of the distributed soft bus-based Harmony, the distributed capability manager can be used for querying the distributed soft bus, querying the registered capability of the devices in the distributed device cluster through the distributed soft bus, and querying the characteristics of the distributed debugging system of the Harmony, and the like. For another example, in the micro-service distributed debugging system, the distributed capability manager can be used for querying the registered interfaces of the micro-services, and the like.
[0182] It should be noted that in the embodiments of the present application, the second debugging module can also not include the distributed capability manager. The functions of querying the registered capability of the devices in the distributed device cluster or querying the characteristics of the distributed debugging system, and the like, for tracking the registered capability of each device in the distributed device cluster can be implemented by relying on other modules or units, and the present application does not limit this.
[0183] Please refer to Figure 7 , Figure 5 Taking the debugging server as an example, a working flow diagram of a second debugging module provided in the embodiments of the present application is shown. As shown in Figure 6A The connection manager of the second debugging module is mainly used for networking the debugging client and the debugging server to obtain a debugging cluster.
[0184] After the connection manager completes the networking and establishes the debugging cluster. The device manager of the second debugging module (more specifically, the device manager in the second debugging module of the debugging server) can connect to the master device in the distributed device cluster. For example, the device manager in the second debugging module of the debugging server can establish a communication connection with the master device in response to the operation of the developer establishing a communication connection between the debugging server and the master device in the distributed device cluster. Since the master device and the slave device in the distributed device cluster have already established a connection, at this time, the debugging system is established.
[0185] For example, the operation of the developer establishing a communication connection between the debugging server 41 and the host device can be an operation of the developer connecting the debugging server 41 and the host device through a wired connection mode such as a USB, a network cable, or the like, or an operation of the developer inputting an IP address of the host device on the debugging server 41 to establish a communication connection, an operation of the developer inputting an IP address of the debugging server 41 on the host device to establish a communication connection, or the like, and the embodiments of the present application are not limited.
[0186] Further, the distributed capability manager of the second debugging module (more specifically, the distributed capability manager in the second debugging module of the debugging server) can continuously track the registered capabilities of the debugging system and the registered capabilities of the devices in the cluster in the distributed device to ensure that the capability of the debugging system to support collaborative debugging is normal.
[0187] Further, the command manager of the second debugging module can perform cross-process debugging command combination, debugging command management, and debugging command queue management on the debugging commands from the debugging server and / or the debugging client. In addition, the command manager can perform debugging command distribution management, and distribute the debugging commands from the debugging server and / or the debugging client to the host device, so that the host device performs subsequent debugging command distribution.
[0188] For example, if the debugging command is a breakpoint command, the breakpoint manager of the second debugging module can provide breakpoint distribution management between the debugging client and the debugging server. For example, only the debugging device bound to the debugged process is allowed to debug the debugged process at the same time.
[0189] Further, after the debugged device completes the debugging operation according to the debugging command, the debugging information manager of the second debugging module can receive the debugging information from the debugged device, perform debugging information distribution management, debugging information distribution, public data distribution, and thread information distribution, so as to timely feedback the debugging information to the developer.
[0190] It should be noted that the structures of the debugging client and the debugging server in the above Figure 4 and Figure 4 are only examples. In some embodiments, as shown in Figure 4 , the debugging client and the debugging server can also include a debugging protocol adapter (DAP) layer. The debugging protocol adapter layer can be used to implement part of the functions of the second debugging module as shown in the above Figure 8 or Figure 8 .
[0191] For example, a debug protocol adaptation layer can be used to shield the differences in debug protocols between debugging devices of different languages, using a unified debug protocol to interface with the data models of different languages in the framework layer. For instance, it can use a predefined protocol (such as the DAP protocol) or a custom protocol to interface with the data models of different languages in the framework layer (such as Java objects, C++ objects, etc.).
[0192] In addition, the second debugging module can also be used to convert IDE debugging events triggered by developer operations into debugging commands. Furthermore, in this embodiment, the second debugging module can also be used to convert the return result (i.e., debugging information) of the debugging command returned by the device being debugged into a data format and data model in the corresponding language. And, it can call the framework layer's interface to trigger the display of the debugging operation results on the UI interface, so that the debugging operation results can be fed back to the developer through the UI interface.
[0193] As described above, in the embodiments of this application, software debugging in any of the following scenarios in a distributed architecture can be achieved: multi-device debugging of multiple devices, single-device debugging of multiple devices, multi-device debugging of a single device, and single-device debugging of a single device.
[0194] Multi-device debugging can include: one or more debugging clients and a debugging server collaboratively debugging processes in a master device and one or more slave devices; one or more debugging clients and a debugging server collaboratively debugging processes in multiple slave devices connected to a master device; a debugging client debugging processes in one or more slave devices connected to a master device through a debugging server; and multiple debugging clients debugging processes in one or more slave devices connected to a master device through a debugging server. For example, in Figure 4 In the debugging system framework shown, debugging client A43 or debugging client B44 debugging a slave device connected to a smartphone through debugging server 41 constitutes a multi-device debugging multi-device scenario. Similarly, a scenario where multiple debugging clients A43, B44, and debugging server 41 collaboratively debug a slave device connected to a smartphone also constitutes a multi-device debugging multi-device scenario.
[0195] Single-device debugging of multiple devices can include: a debugging server debugging processes on the master device and one or more slave devices, or a debugging server debugging processes on one or more slave devices connected to the master device. For example, in... Figure 4 In the debugging system framework shown, the scenario where the debugging server 41 debugs a slave device connected to a smartphone is a single-device debugging multi-device scenario.
[0196] Multi-device debugging single device can include: one debugging client debugging a process in a host device through a debugging server, multiple debugging clients debugging a process in a host device through a debugging server, and one or more debugging clients and a debugging server cooperatively debugging a process in a host device. For example, in Figure 4 In the debugging system framework shown, the scenario in which the debugging client A 43 and / or the debugging client B 44 debugs a process in a smart phone through the debugging server 41 is a multi-device debugging single device scenario.
[0197] Single device debugging single device can include: a debugging server debugging a process in a host device.
[0198] In the embodiments of the present application, the software debugging method can include the following stages: a debugging command generation stage (i.e., a first stage), a debugging command issuing stage (i.e., a second stage), a debugging stage (i.e., a third stage), a debugging information returning stage (i.e., a fourth stage), and a debugging information display stage (i.e., a fifth stage).
[0199] Generally, before the first stage, a connection establishment stage and a determinable process determination stage are further included. The connection establishment stage is used for the formation of a distributed device cluster and a debugging cluster. The determinable process determination stage is used for the developer to obtain information of a determinable process.
[0200] For example, in some embodiments, as shown in Figure 8 As shown, the connection establishment stage can include the following steps S801-S803:
[0201] S801, a plurality of electronic devices (such as a first device, a second device, a third device, and a fourth device) form a distributed device cluster network to obtain a distributed device cluster 42.
[0202] For example, as shown in Figure 4 is taken as a smart phone, the second device is taken as a television, the third device is taken as a sound box, and the fourth device is taken as Figure 4 wireless earphones, a smart watch, a sound box, a PC, a tablet computer, an AR / VR device, and an IOT device, as shown.
[0203] For example, in some embodiments of the present application, the plurality of electronic devices (such as a first device, a second device, a third device, and a fourth device) can be discovered through device discovery, a master is selected after the discovery of the devices, and a distributed device cluster network is formed to obtain a distributed device cluster 42.
[0204] For example, in the distributed debugging system of the distributed soft bus based on the distributed soft bus, multiple electronic devices can discover and network each other through the distributed soft bus. Among them, multiple electronic devices can complete the distributed device cluster networking through the establishment of USB connection or Wi-Fi connection between devices and the like.
[0205] In some embodiments of the present application, multiple electronic devices can remind the developer to set up the master device and the slave device. For example, the electronic device can remind the developer to set up the master device and the slave device by establishing the connection relationship between multiple electronic devices through the pop-up setting box, voice reminder and the like, so as to obtain the distributed device cluster 42, which is not limited in the embodiments of the present application. For example, the electronic device can remind the developer to establish the connection relationship between multiple electronic devices through the wired connection mode such as USB or network cable, or through the wireless connection mode such as inputting the IP address or establishing the Wi-Fi connection.
[0206] In some embodiments of the present application, multiple electronic devices can also select the master according to the performance of the device, the connection condition of the device and the like, which is not limited in the present application. For example, multiple electronic devices can preferentially select the first configured device as the master device, and other devices as the slave devices. For example, the first configured device can include the electronic device that automatically establishes the wireless connection with the first discovered device.
[0207] For another example, the first configured device can include the electronic device that first discovers the device. For this case, the electronic device that first discovers the device can remind the developer of the identification of the device discovered by the device, and remind the developer to establish the connection relationship between multiple electronic devices to obtain the distributed device cluster 42.
[0208] For the specific method and operation process of the developer to obtain the distributed device cluster by establishing the connection relationship between multiple electronic devices, reference can be made to the introduction in the conventional technology, and the embodiments of the present application will not be described in detail.
[0209] In some embodiments of the present application, more specifically, multiple electronic devices can discover the device through the distributed debugging assistant, and select the master of the distributed device cluster and network the distributed device cluster after discovering the device. Among them, the selection of the master of the distributed device cluster is used to determine a master device (such as the smart phone shown in Figure 4 ) and one or more slave devices (such as the television, wireless earphone, smart watch, sound box, PC, tablet computer, AR / VR device and IOT device shown in Figure 4 ). The networking of the distributed device cluster is used to establish the distributed device cluster.
[0210] S802, the debugging server 41, the debugging client A 43 and the debugging client B 44 are networked to obtain a debugging cluster.
[0211] It can be understood that the debugging server 41, the debugging client A 43 and the debugging client B 44 can be debugging devices (such as PCs) of the same structure, and whether the debugging devices are servers or clients in the debugging cluster can be defined and set by the developer.
[0212] For example, the developer can set the server and the client by setting the connection relationship between the plurality of debugging devices on a setting interface to obtain the debugging cluster, which is not limited in the embodiment of the application. Further, the developer can establish the connection relationship between the plurality of debugging devices by a wired connection mode such as USB or network cable, or by a wireless connection mode such as inputting an IP address or establishing a Wi-Fi connection.
[0213] For example, the debugging device 1 and the debugging device 2 can be understood as clients in the debugging cluster, and the debugging device 3 can be understood as a server in the debugging cluster.
[0214] It should be noted that in the embodiment of the application, the specific execution order of the steps S801 and S802 is not limited. For example, S801 can be executed first and then S802 can be executed, or S802 can be executed first and then S801 can be executed, or S801 and S802 can be executed simultaneously, which is not limited in the application.
[0215] S803, the debugging server 41 establishes a communication connection with the host device.
[0216] For example, the debugging server 41 can establish a communication connection with the host device in response to the operation of the developer to establish a communication connection between the debugging server 41 and the host device. For example, the operation of the developer to establish a communication connection between the debugging server 41 and the host device can be the operation of the developer to connect the debugging server 41 and the host device by a wired connection mode such as USB or network cable, or the operation of the developer to input the IP address of the host device on the debugging server 41 to establish a communication connection, the operation of the developer to input the IP address of the debugging server 41 on the host device to establish a communication connection, etc., which is not limited in the embodiment of the application.
[0217] For example, the distributed debugging assistant of the host device can map its port identification (port ID, PID) to the port specified by the debugging server 41, and the debugging server 41 can establish a communication connection with the distributed debugging assistant of the host device through the port.
[0218] After the debugging server 41 establishes a communication connection with the master device, for example, the debugging server 41 can directly obtain the device information of the master device through the device manager, or obtain the device information of one or more slave devices in the distributed device cluster 42 through the master device.
[0219] Furthermore, after the debugging server 41 establishes a communication connection with the master device, the debugging server 41 can debug the debuggable processes in the master device, and can also debug one or more slave devices in the distributed device cluster 42 through the master device.
[0220] Furthermore, such as Figure 9 As shown, the above-mentioned debuggable process determination stage may include the following steps S804-S807:
[0221] S804, Debug Server 41 sends a command to the smartphone to discover debuggable processes.
[0222] For example, the device manager of debug server 41 can communicate with the master device in the distributed device cluster (such as debug server 41) through debug server 41. Figure 9 Communication connections between smartphones (as shown), to the host device (such as...) Figure 9 The distributed debugging assistant of the smartphone shown sends the above command to discover the debuggable process.
[0223] In the main device (e.g.) Figure 9 After the distributed debugging assistant of the smartphone shown receives the command to discover a debuggable process, the main device (such as...) Figure 9 The distributed debugging assistant of the smartphone (shown) can forward the command to discover the debuggable process to each slave device in the distributed device cluster. Then, the master device (i.e., the first device, the smartphone) and slave devices (i.e., the second, third, and fourth devices) in the distributed device cluster execute the following steps S805:
[0224] S805, the first device, the second device, the third device, and the fourth device discover a debuggable process running on the current device.
[0225] For example, the first, second, third, and fourth devices can discover debuggable processes running on the current device through their respective distributed debugging assistants. For instance, the distributed debugging assistant can discover currently running, debuggable processes.
[0226] S806, the first device, the second device, the third device and the fourth device send information about the discovered debuggable process to the debug server 41.
[0227] For example, the distributed debugging assistant of the first device, the second device, the third device and the fourth device reports the discovered information of the debuggable process to the device manager of the debugging server 41.
[0228] Among them, the distributed debugging assistant of the master device can directly report the information of the debuggable process of the master device to the device manager of the debugging server 41, and the slave device can report the information of the debuggable process of the slave device to the device manager of the debugging server 41 through the master device.
[0229] It can be understood that since the purpose of sending the information of the debuggable process by the cluster device (such as the first device, the second device, the third device and the fourth device) to the debugging server 41 is to provide the developer with the understanding and further selection of the debugged device and the debugged process, therefore, in the embodiment of the present application, the above-mentioned information of the debuggable process can include the device information of the debuggable device corresponding to the debuggable process, such as device ID, etc. S807, the debugging server 41, the debugging client A 43 and the debugging client B 44 display the information of the debuggable process.
[0230] For example, the device manager of the debugging server 41 displays the acquired information of the debuggable process to the developer through the UI interface, so that the developer belonging to the debugging server 41 can select a debuggable process in a debuggable device. And the debugging server 41 can send the information of the debuggable process to the debugging client A 43 and the debugging client B 44, so that the device manager of the debugging client A 43 and the debugging client B 44 displays the acquired information of the debuggable process to the developer through the UI interface, so that the corresponding developer can select the debuggable process in the specific debuggable device.
[0231] Please refer to Figure 10A , Figure 10A A network topology structure UI interface example diagram provided by an embodiment of the present application is shown. As shown in Figure 4 , the network topology structure UI interface can display the master device (such as the Figure 4 smartphone shown) and the slave device (such as the Figure 4 TV, sound box, smart watch, wireless earphone, PC, tablet computer, IOT device and AR / VR device) in the distributed device cluster, and the connection relationship between the master device and the slave device. The debugging server 41, the debugging client A 43 or the debugging client B 44 can display the debuggable process UI interface shown in Figure 5 in response to receiving the selection operation of the developer on a certain device. For example, in response to the operation of the developer selecting the smartphone on the network topology structure UI interface of the debugging server 41, the debugging server 41 can display Figure 6AThe debuggable process UI shown allows developers to further select the process to be debugged.
[0232] Assuming the debugging system framework in the embodiments of this application is as follows: Figure 5 As shown, the structure of debugging client A43, debugging client B44, debugging server 41, and the master device in the distributed device cluster 42 (i.e., Figure 11 The smartphone shown) and the slave device (i.e. Figure 10A The structures of the television, wireless headphones, smartwatch, speaker, PC, tablet, AR / VR device, and IoT device shown are as follows: Figure 10A As shown, the structure of the second debugging module in debug client A43, debug client B44, and debug server 41 is as follows: Figure 10B As shown, the following will describe in detail a software debugging method provided by the embodiments of this application, in conjunction with specific examples and accompanying drawings.
[0233] Example 1: Debugging multiple devices.
[0234] In the scenario of multi-device debugging of multiple devices in Embodiment 1 of this application, developers can use a debugging device to collaboratively debug processes in one or more slave devices in a distributed device cluster 42. The debugging device may include at least two of a debugging server 41, a debugging client A 43, or a debugging client B 44, or the debugging device may include either debugging client A 43 or debugging client B 44. The device being debugged may include a master device and one or more slave devices, or the device being debugged may include multiple slave devices, or the device being debugged may include only one slave device.
[0235] If the debugging device includes at least one of debugging client A43 and debugging client B44, then debugging client A43 or debugging client B44 specifically needs to connect to debugging server 41 to achieve the above-mentioned collaborative debugging of multiple processes in multiple devices.
[0236] The following examples 1 and 2 illustrate the specific process of multi-device debugging of multiple devices in Embodiment 1 of this application.
[0237] Example 1, developers through Figure 10B The debug server 41, debug client A43, and debug client B44 shown perform collaborative debugging on the first process (such as the control process) in the smartphone, the second process (such as the video playback process) in the television, and the third process (such as the audio playback process) in the speaker in the distributed device cluster 42.
[0238] For example, the scenario in Example 1 could be a smartphone screen mirroring scenario, specifically, the smartphone plays video through a TV and audio through speakers. Wherein, such asFigure 10B As shown, the first stage (i.e. the debug command generation stage) of the example 1 of the present application can include the following steps S1.1.1-S1.2.1:
[0239] S1.1.1, in response to receiving the selection operation of the developer on the debuggable process, the debug server 41, the debug client A 43 and the debug client B 44 determine the corresponding debugged process.
[0240] For example, assuming that in response to receiving the selection operation of the developer A on the first process (e.g. the control process) in the smart phone on the UI interface of the debug server 41, in response to receiving the selection operation of the developer B on the second process (e.g. the video playing process) in the TV on the UI interface of the debug client A 43, and in response to receiving the selection operation of the developer C on the third process (e.g. the audio playing process) in the sound box on the UI interface of the debug client B 44, the debug server 41, the debug client A 43 and the debug client B 44 respectively determine the first process, the second process and the third process as the debugged process.
[0241] For example, the debug device (e.g. the debug server 41, the debug client A 43 and the debug client B 44) can determine the debugged process in response to the selection operation of the developer on the similar Figure 10B As shown, the debuggable process UI interface.
[0242] Further, after the debug device (e.g. the debug server 41, the debug client A 43 and the debug client B 44) determines the debugged process in response to the selection operation of the developer on the similar Figure 5 As shown, the debuggable process UI interface. Figure 5 As shown, assuming that the smart phone is the debugged device, the smart phone can include one or more hardware devices such as GPS, sensor, vibrator, NFC, FM, security chip, etc. The debug device (e.g. the debug server 41, the debug client A 43 or the debug client B 44) can view the details of the hardware device in response to receiving the selection operation of the developer on the hardware device in the left selection box 10-1 on the UI interface as shown. Figure 5 As shown, the hardware details box 10-2 on the UI interface can display the details of the specific hardware device. Among them, Figure 11 Figure 11 is an example of calling the GPS by the debugged process.
[0243] S1.2.1, the debugging server 41, the debugging client A 43 and the debugging client B 44 respectively generate a debugging command according to the detected debugging event triggered by the developer.
[0244] For example, it is assumed that, in response to receiving a first debugging event triggered by the developer A (such as inputting code or clicking a debugging button) on the UI interface of the debugging server 41 to a first process (such as a control process) in a smartphone, in response to receiving a second debugging event triggered by the developer B (such as inputting) on the UI interface of the debugging client A 43 to a second process (such as a video playing process) in a television, and in response to receiving a third debugging event triggered by the developer C (such as inputting) on the UI interface of the debugging client B 44 to a third process (such as an audio playing process) in a sound box, the debugging server 41, the debugging client A 43 and the debugging client B 44 respectively generate a first debugging command, a second debugging command and a third debugging command.
[0245] In the embodiments of the present application, the debugging command is mainly used to instruct the debugged process to step in, step out, step over or run at a corresponding program instruction, so as to obtain the running details of the debugged process, etc. For example, the debugging device (such as the debugging server 41, the debugging client A 43 or the debugging client B 44) can generate a debugging command (such as the first debugging command, the second debugging command and the third debugging command) according to the breakpoint set by the developer in the debugged process (such as the first process, the second process or the third process).
[0246] It should be noted that, for the debugging commands such as step in, step out and step over, in the embodiments of the present application, only the debugging device bound to the debugged process is allowed to debug the debugged process at the same time. The binding relationship between the debugged process and the debugging device can be determined according to the correspondence between the identifier (such as ID) of the debugged process and the identifier (such as ID) of the debugging device.
[0247] For example, if a process (such as the second process) is occupied by a debugging device (such as the debugging client A 43), that is, the second process is bound to the debugging client A 43, the debugging server 41 records the binding information (such as the binding relationship between the ID of the debugging client A 43 and the ID of the second process) of the debugging client A 43 and the second process in the command manager. When the command manager receives a new debugging command of a debugging device (such as the debugging device A) to the second process at a certain moment, the command manager can determine whether the ID of the debugging device A initiating the new command is consistent with the ID of the debugging client A 43 currently bound to the second process by checking the recorded binding information. If yes, the debugging server 41 allows the new command to be issued to the second process; if not, the debugging server 41 does not allow the new command to be issued to the second process.
[0248] Through the management of the debugging server on the debugging commands such as step-in, step-out, step-over and the like, mutual interference caused by multiple developers through multiple debugging devices on different debugging of the same process at the same time can be avoided, and the smooth progress of the debugging process and the accuracy of the debugging data can be affected.
[0249] It should be noted that the debugging command (such as the first debugging command, the second debugging command or the third debugging command) in the embodiments of the present application can be a breakpoint command. In the embodiments of the present application, the breakpoint can include but is not limited to any one of the following: a data breakpoint, a synchronization breakpoint or a conditional breakpoint.
[0250] Among them, the data breakpoint can include the following two types:
[0251] Type 1: Cross-process public data breakpoint.
[0252] For public data, such as the control instruction data, the audio playback progress data and the video playback progress data in the above example 1, the debugging server 41 can send a query command to the host device to obtain the public data of multiple processes from multiple debugging devices. For example, if the first debugging command is a data breakpoint command, the host device can obtain the public data of multiple debugging devices (such as a smart phone and a television) by timing the call of the soft bus interface, and report to the debugging server 41. The debugging server 41 can record the change of the public data over time, and distribute the time flow record of the public data to the debugging client A 43 and the debugging client B 44, so that the debugging client A 43 and the debugging client B 44 can display on the UI interface, and facilitate the developers to monitor and compare the change of the public data of multiple processes (such as the first process and the second process).
[0253] Type 2: Cross-process private data breakpoint.
[0254] For process private data, such as the local variables in the process of the TV adapter player in Example 1 above to obtain the video stream and parse the key frame, the local variables in the process of the sound box adapter player to obtain the audio stream and parse the key frame, etc., the debugging server 41 can send the data breakpoints set by multiple debugging devices (such as the debugging server 41, the debugging client A 43, and the debugging client B 44) to the corresponding device under test. For example, in Example 1 above, the debugging device can issue a data breakpoint command to the TV to monitor the data packet ID, and the TV can distribute the command to the debugging tool corresponding to the video playback. If the debugging tool obtains the relevant process private data, it returns to the debugging server 41 through the host device (such as a smart phone). The debugging server 41 synchronizes the private data to each debugging device (i.e., the debugging server 41, the debugging client A 43, and the debugging client B 44) in the debugging cluster, so that each debugging client can display the data breakpoints of the debugging client on the UI interface. For example, the corresponding data breakpoints can be displayed based on different debugging clients.
[0255] The synchronous breakpoint refers to the synchronization of multiple processes at a certain system time. For example, after a debugging device (such as the debugging client A 43) issues a synchronous breakpoint command for multiple processes (such as the first process and the second process), the command manager of the debugging server 41 can issue the debugging command to the host device (such as the smart phone shown in Figure 11 According to the process number corresponding to the debugging command, the host device (such as the smart phone shown in Figure 11 ) forwards it to the corresponding device under test (such as the TV), so as to synchronize and pause the corresponding processes at a certain system time with the TV, and after pausing the corresponding processes, the debugging data (including thread information, stack information, variable data, etc.) is reported to the breakpoint manager of the debugging server 41 through the host device (such as the smart phone shown in Figure 11 The breakpoint manager of the debugging server 41 broadcasts the debugging data to each debugging client (such as the debugging client A 43 and the debugging client B 44) so that each debugging client can display the UI interface, and the developer can perform time point slicing monitoring on the debugging data of multiple processes (such as the first process and the second process). For example, each debugging client can display the debugging data in the form of comparison between different processes, so as to facilitate the developer to further perform cross-process collaborative debugging.
[0256] The conditional breakpoint refers to setting conditions to control the breakpoints of one or more processes of a device in a distributed device cluster. For example, when a certain variable (such as the device state) of a device in the distributed device cluster meets a certain condition, a process in the device is paused, and another device in the distributed device cluster can obtain the debugging data (such as including stack information) of the paused process.
[0257] For example, in the smart phone screen projection scenario shown in Example 1, in order to solve the situation of audio and video being out of sync, a condition breakpoint command can be set to interrupt the video playing process of the TV when the playing progress in the smart phone playing control process reaches 2 minutes and 30 seconds, to check whether the data packet information obtained in the video decoder is healthy, and to obtain the debugging data of the TV (such as playing process data and stack information, etc.) that is adapted to the video playing process. Specifically, the condition breakpoint command can be sent to the debugger of the smart phone playing control process by the command manager of the debugging server 41. When the playing progress in the smart phone playing control process reaches 2 minutes and 30 seconds (i.e., the condition breakpoint is triggered), the debugger will pause the playing progress and return an interrupt message to the command manager of the debugging server 41. After receiving the interrupt message from the smart phone, the command manager of the debugging server 41 sends a playing process interrupt command to the TV through the smart phone to control the TV to interrupt the video playing process. After the TV interrupts the video playing process, the command manager of the debugging server 41 obtains the current stack information of the smart phone from the smart phone, and the current stack information of the TV forwarded by the smart phone. Then, the debugging server 41 distributes the obtained stack information to the corresponding debugging devices. For example, the debugging server 41 distributes the current stack information of the TV to the debugging client A 43 that is debugging the device.
[0258] For example, in the smart phone screen projection scenario shown in Example 1, in order to solve the situation of audio and video being out of sync, a condition breakpoint command can be set to interrupt the video playing process of the TV when the playing progress in the smart phone playing control process reaches 2 minutes and 30 seconds, to check whether the data packet information obtained in the video decoder is healthy, and to obtain the debugging data of the TV (such as playing process data and stack information, etc.) that is adapted to the video playing process. Specifically, the condition breakpoint command can be sent to the debugger of the smart phone playing control process by the command manager of the debugging server 41. When the playing progress in the smart phone playing control process reaches 2 minutes and 30 seconds (i.e., the condition breakpoint is triggered), the debugger will pause the playing progress and return an interrupt message to the command manager of the debugging server 41. After receiving the interrupt message from the smart phone, the command manager of the debugging server 41 sends a playing process interrupt command to the TV through the smart phone to control the TV to interrupt the video playing process. After the TV interrupts the video playing process, the command manager of the debugging server 41 obtains the current stack information of the smart phone from the smart phone, and the current stack information of the TV forwarded by the smart phone. Then, the debugging server 41 distributes the obtained stack information to the corresponding debugging devices. For example, the debugging server 41 distributes the current stack information of the TV to the debugging client A 43 that is debugging the device.
[0259] Further, in some embodiments, when the playing progress in the smart phone playing control process reaches 2 minutes and 30 seconds, the condition breakpoint command will be decomposed into a command to pause the video playing process of the TV. Then, when the debugging server receives the debugging data obtained by the TV after executing the command to pause the video playing process, the debugging server only distributes the debugging data to the debugging device that initiated the condition breakpoint (such as the debugging client A 43 in Example 1).
[0260] In some embodiments, when the debugging device that initiated the condition breakpoint (such as the debugging client A 43 in Example 1) receives the debugging data corresponding to the condition breakpoint, the debugging device can not display the debugging data on the UI interface, but use the debugging data as a trigger condition for the next debugging command.
[0261] Further, as Figure 11As shown, the second stage (i.e. the debug command issuing stage) of Example 1 of the present application can include the following steps S2.1.1-S2.2.1:
[0262] S2.1.1, the debug server 41, the debug client A 43 and the debug client B 44 send the debug commands to the smart phone.
[0263] In some embodiments, if the debug commands (such as the second debug command and the third debug command described above) are generated by the debug client A 43 or the debug client B 44 according to the detected debug events triggered by the developer, the debug client A 43 or the debug client B 44 can specifically send the debug commands to the smart phone (i.e. the master device) through the debug server 41.
[0264] In other embodiments, if the debug commands (such as the first debug command described above) are generated by the debug server 41 according to the detected debug events triggered by the developer, the debug server 41 directly sends the debug commands to the smart phone (i.e. the master device).
[0265] In some embodiments, the debug server 41 can specifically send the debug commands to the smart phone (i.e. the master device) through the communication connection between the debug server 41 and the smart phone.
[0266] It can be understood that the debug commands from the debug device usually correspond to a debug process in a certain debug device, and therefore, in the embodiments of the present application, the first debug command, the second debug command and the third debug command carry the target address corresponding to the debug command or the device identifier (such as the device ID) and the process identifier (such as the process number) corresponding to the debug command, so that the debug server 41 and the master device can accurately forward the debug command to the debug device according to the target address / device identifier carried in the debug command when distributing the subsequent debug command. In addition, when the debug device receives the debug command, the debug process can be accurately determined.
[0267] S2.2.1, the smart phone distributes the received debug commands to the debug device.
[0268] For example, after receiving the first debug command, the second debug command and the third debug command from the debug server 41, the smart phone can forward the debug commands to the corresponding devices according to the target address / device identifier corresponding to the debug command carried in the debug command. For example, in the example shown in FIG. 2, the smart phone can forward the first debug command to the debug device A 42, the second debug command to the debug device B 45 and the third debug command to the debug device C 46. Figure 11In the illustrated example 1, since the first debug command corresponds to a process in the smartphone, the first debug command usually carries a device address or a device ID of the smartphone, in which case the smartphone knows that the first debug command is for itself and does not forward the first debug command. Since the second debug command corresponds to a process in the television, the second debug command usually carries a device address or a device ID of the television, in which case the smartphone forwards the second debug command to the television. Since the third debug command corresponds to a process in the sound box, the third debug command usually carries a device address or a device ID of the sound box, in which case the smartphone forwards the third debug command to the sound box.
[0269] It should be noted that if the first debug command, the second debug command, or the third debug command is a conditional breakpoint command, for example, the conditions of the second debug command and the third debug command are that the first debug command is executed successfully, the above S2.1.1 specifically includes that the debug server 41 sends the first debug command to the smartphone, and after the debug server 41 receives the information that the first debug command is executed successfully from the smartphone, sends the second debug command and the third debug command to the smartphone. Correspondingly, the above S2.2.1 specifically includes that the smartphone distributes the received second debug command to the television and distributes the received third debug command to the sound box.
[0270] For example, if the first debug command is used to instruct the smartphone to pause the first process at a certain system time, and the conditions of the second debug command and the third debug command are that the first debug command is executed successfully, the smartphone pauses the first process when the system time is reached, and sends information that the first debug command is executed successfully to the debug server 41. After the debug server 41 receives the information that the first debug command is executed successfully, it triggers the second debug command and the third debug command to instruct the television and the sound box to execute the second debug command and the third debug command, respectively.
[0271] Further, as Figure 11 illustrated, the third phase (i.e., the debugging phase) of the example 1 of the present application can include the following steps S3.1.1-S3.3.1:
[0272] S3.1.1, the smartphone executes a debugging operation on the first process according to the received first debug command, and obtains first debugging data.
[0273] For example, the distributed debugging assistant of the smartphone can call a corresponding debugging tool to execute a debugging operation on the first process (such as a control process) indicated by the process identifier (such as a process number) carried in the received first debug command, and obtain first debugging data. Illustratively, in the embodiments of the present application, the debugging operation can include one or more of the following: step in, step out, step over, or run, etc.
[0274] S3.2.1, the television executes a debugging operation on the second process according to the received second debugging command, and obtains second debugging data.
[0275] For example, the distributed debugging assistant of the television can call a corresponding debugging tool to execute a debugging operation on the second process (such as a video playing process) indicated by the process identifier (such as a process number) carried in the received second debugging command, and obtain second debugging data.
[0276] S3.3.1, the sound box executes a debugging operation on the third process according to the received third debugging command, and obtains third debugging data.
[0277] For example, the distributed debugging assistant of the sound box can call a corresponding debugging tool to execute a debugging operation on the third process (such as an audio playing process) indicated by the process identifier (such as a process number) carried in the received third debugging command, and obtain third debugging data.
[0278] For example, if the first debugging command, the second debugging command and the third debugging command are synchronous breakpoint commands, the smartphone, the television and the sound box pause the corresponding processes at the specified system time according to the debugging commands, and obtain their own debugging data (including thread information, stack information, variable data, etc.).
[0279] For example, if the first debugging command, the second debugging command or the third debugging command is a conditional breakpoint command, for example, the condition is that the first debugging command is executed successfully, the television and the sound box execute the second debugging command and the third debugging command respectively when the smartphone executes the first debugging command successfully, and obtain their own debugging data (for example, which can include playing process data and stack information, etc.).
[0280] For example, if the first debugging command, the second debugging command and the third debugging command are data breakpoint commands, such as cross-process public data breakpoints or process private data, the smartphone, the television and the sound box obtain the public or private data of the corresponding process.
[0281] Further, as shown in the fourth phase (i.e. the debugging information return phase) of Example 1 of the present application, the following steps S4.1.1-S4.2.1 can be included: Figure 11
[0282] S4.1.1, the television sends the second debugging data to the smartphone; and the sound box sends the third debugging data to the smartphone.
[0283] For example, the television and the sound box can respectively send the second debugging data and the third debugging data to the smartphone through the respective distributed debugging assistants.
[0284] S4.2.1, the smartphone sends the first debugging data, the second debugging data and the third debugging data to the debugging server 41.
[0285] For example, the smartphone can send the first debugging data, the second debugging data and the third debugging data to the debugging information manager of the debugging server 41 through the distributed debugging assistant. Among them, the first debugging data, the second debugging data and the third debugging data carry the device identifier (such as device ID) of the device being debugged and the process identifier (such as process number) of the process being debugged.
[0286] For example, the debugging data can include thread information, stack information, frame, variable data, playing process data, public data or private data across processes, etc. after the process is paused. In some embodiments, the above-mentioned debugging data can also include call information. For example, the call information can include process call process record (such as function call in remote procedure call (RPC) mode, network call in web mode, call of distributed soft bus registration capability in distributed debugging system of Hongmeng), function call time, function call sequence, debugged device name or debugged device type, etc. The debugged device can send the debugging data to the debugging information manager of the debugging server through the distributed debugging assistant. Further, as shown in Figure 12 The fifth stage (i.e. the debugging information display stage) of example 1 of the present application can include the following steps S5.1.1 and S5.2.1:
[0287] S5.1.1, the debugging server 41 distributes the first debugging data, the second debugging data and the third debugging data.
[0288] In the embodiments of the present application, after receiving the first debugging data, the second debugging data and the third debugging data sent by the smartphone, the debugging server 41 can determine the debugging device corresponding to the debugging data according to the device identifier and the process identifier carried therein.
[0289] In some embodiments, if the debugging server 41 determines that a certain debugging data is corresponding to the debugging command of the debugging server 41 according to the device identifier and the process identifier carried in the debugging data, step S5.1.1 can include: the debugging server 41 displays the debugging data to the developer through the UI interface. For example, in example 1 shown in Figure 12 The debugging server 41 determines that the first debugging data corresponds to the first debugging command of the debugging server 41 according to the device identifier of the smartphone and the process identifier of the first process carried in the first debugging data.
[0290] In some embodiments, if the debugging server 41 determines, according to the device identifier and the process identifier carried in the debugging data, that the debugging data corresponds to the debugging command of the debugging client, the debugging server 41 distributes the debugging data to the debugging client, and the debugging client displays the corresponding debugging information on the UI interface.
[0291] For example, in Example 1 shown in FIG. 4, the debugging server 41 determines, according to the device identifier of the television set and the process identifier of the second process carried in the second debugging data, that the second debugging data corresponds to the second debugging command of the debugging client A 43, and determines, according to the device identifier of the sound bar and the process identifier of the third process carried in the third debugging data, that the third debugging data corresponds to the third debugging command of the debugging client B 44. Then, the debugging server 41 distributes the second debugging data to the debugging client A 43, and distributes the third debugging data to the debugging client B 44. Figure 12
[0292] S5.2.1, the debugging client A 43 and the debugging client B 44 display the debugging information.
[0293] For example, in Example 1 shown in FIG. 4, the debugging server 41 displays the first debugging data to the developer through the UI interface. The debugging client A 43 displays the second debugging data to the developer through the UI interface. The debugging client B 44 displays the third debugging data to the developer through the UI interface. Figure 12 In some embodiments, after the debugging information manager of the debugging server 41 receives the debugging data (such as the first debugging data, the second debugging data and the third debugging data) from the debugging devices (such as the smart phone, the television set and the sound bar), the debugging information manager of the debugging server 41 can save the breakpoint data, the stack information of the interrupted process and the like in the debugging data locally.
[0294] Further, in some embodiments, the debugging server 41 can also send the breakpoint data, the stack information of the interrupted process and the like in the debugging data saved locally to each debugging device participating in the collaborative debugging.
[0295] For example, the debugging information manager of the debugging server 41 can send the breakpoint data, the stack information of the interrupted process and the like in the debugging data saved locally to each debugging device participating in the collaborative debugging in the debugging cluster at the same time, so that each collaborative debugging device can display the relevant debugging results to the developer through the newly added tab page on the UI interface at any time when there is a viewing demand.
[0296]
[0297] For example, the debugging information manager of the debugging server 41 can receive a request from a co-debugging debugging client (e.g., the debugging client A 43) when the co-debugging debugging client has a viewing demand, and send the breakpoint data, the stack information of the interrupted process, and other data in the locally saved debugging data to the co-debugging debugging client. For example, the debugging client A 44 can be sent the breakpoint data, the stack information of the interrupted process, and other data in the first debugging data from the smart phone and the second debugging data from the television set, so that the debugging client A 44 can add a tab page on the UI interface to show the developer the relevant debugging results.
[0298] In addition, the debugging information manager of the debugging server 41 can distribute the data corresponding to the debugging operations (e.g., step in, step out, step over, run, pause, etc.) in the debugging data to the debugging device that issues the corresponding debugging command. For other debugging devices, the data corresponding to the debugging operations (e.g., step in, step out, step over, run, pause, etc.) is not allowed to be acquired.
[0299] It should be noted that the co-debugging debugging client can acquire the debugging data by sending a viewing request to the debugging server when the debugged process is not running, so as to realize the ability of locating the problem without reproducing the program execution scenario. The above debugging method is commonly referred to as time travel debugging. The principle of time travel debugging is to record the call information during the debugging process, so as to locate the problem in the process execution (e.g., a problem that is difficult to reproduce) without reproducing the program execution scenario.
[0300] In the case of debugging time opening, the debugged device can issue a non-blocking function breakpoint for a function (for example, a function corresponding to a capability registered by a distributed soft bus in the Hongmeng distributed debugging system) and send a non-blocking line breakpoint to the debugging device through the distributed debugging assistant. For example, in the smart phone screen projection scenario of example 1, when the smart phone play control interface pause button is triggered, the smart phone play control process will call the television play pause distributed interface according to the non-blocking function breakpoint, and the call information (for example, the called capability information in the debugged device, the function call sequence, the called parameters, the call initiation time point, and the call end time point, etc.) can be fed back to the debugging server through the smart phone. For example, in the scenario of example 1, the above call information helps to locate the problem of smart phone pause, slow or non-responsive television play, slow or non-responsive sound box play, or out-of-sync sound box and television play without the need to reproduce the program execution scenario. For example, according to the time difference between the time point at which the television pause interface is called and the time point at which the smart phone initiates the call, it can be determined whether there is a problem with the distributed soft bus. Specifically, if the above time difference is too long, that is, too much time is spent on transmitting the video stream from the smart phone to the television, attention should be paid to whether there is a problem with the distributed soft bus. If the above time difference is short, the specific problem of the television can be located by repeatedly calling the television pause interface.
[0301] In the embodiments of the present application, the debugging server 41 can perform breakpoint delegation management on the debugged device. The breakpoint delegation management on the debugged device refers to controlling the modification or deletion of breakpoints by the debugged device according to the permissions.
[0302] For example, the debugging server 41 can record the code line where the breakpoint is located, the identification information of the newly added breakpoint (including the identification information of the debugging device of the newly added breakpoint) in the breakpoint manager when there is a newly added breakpoint. When the debugging server 41 receives a modification or deletion event of a certain breakpoint (such as breakpoint A of the first process) by a certain debugging device (such as debugging client A 43), the breakpoint manager of the debugging server 41 can detect whether the ID of the debugging device A initiating the modification or deletion event is consistent with the ID of the debugging client A 43 newly adding the breakpoint A by checking the recorded identification information of the debugging device newly adding the breakpoint A. If they are consistent, the debugging server 41 allows the debugging device A to modify or delete the breakpoint A; if they are not consistent, the debugging server 41 does not allow the debugging device A to modify or delete the breakpoint A.
[0303] It should be noted that in the embodiments of the present application, any debugging device (such as the debugging server 41, the debugging client A 43 and the debugging client B 44 in Example 1) can add breakpoints to the first process (i.e. the control process) code in the smart phone, the second process (i.e. the video playing process) code in the television, and the third process (i.e. the audio playing) code in the sound box. The relevant information of the breakpoint operation added will be recorded in the breakpoint manager of the debugging server 41. For example, the debugging device identifier of the added breakpoint, the breakpoint type, the code file where the breakpoint is located, and the code line where the breakpoint is located.
[0304] Further, the breakpoints of each debugged process are visible to the debugging devices in the debugging cluster. When a breakpoint is captured (i.e. the process is paused at the specified breakpoint), the stack information of the paused process can be seen by the debugging devices in the debugging cluster.
[0305] Example 2: The developer performs collaborative debugging on the fourth process (such as the video playing process) in the television and the fifth process (such as the audio playing process) in the sound box in the distributed device cluster 42 through the debugging server 41 and the debugging client A 43.
[0306] For example, the scenario of Example 2 can be a scenario in which the sound box and the television cooperatively play, in which the sound box is used to play audio and the television is used to play video. For example, Example 2 can be used to solve the problem of audio-visual asynchronization of the television and the sound box. Among them, the fourth process (such as the video playing process) in the television and the fifth process (such as the audio playing process) in the sound box are different processes. Figure 12 Similarly to Example 1, as shown in Figure 12 The first stage (i.e. the debugging command generation stage) of Example 2 of the present application mainly includes the debugging device determining the debugged process, and the debugging device generating the debugging command according to the debugging event triggered by the developer. Taking the debugging server 41 and the debugging client A 43 as the debugging device, the debugging server 41 performs collaborative debugging on the fourth process (such as the video playing process) in the television in the distributed device cluster 42 according to the debugging event triggered by the developer, and the debugging client A 43 performs collaborative debugging on the fifth process (such as the audio playing process) in the sound box in the distributed device cluster 42 according to the debugging event triggered by the developer, for example, as shown in Figure 12 The first stage (i.e. the debugging command generation stage) can include the following steps S1.1.2-S1.2.2:
[0307] S1.1.2, in response to receiving the developer's selection operation on the debuggable process, the debugging server 41 and the debugging client A 43 determine the corresponding debugged process.
[0308] S1.2.2, the debugging server 41 and the debugging client A 43 respectively generate the debugging command according to the detected debugging event triggered by the developer.
[0309] Further, the second stage (i.e. the debug command issuing stage) of the example 2 of the present application mainly includes the sending of the debug commands from the debug device to the master device, and the distribution of the debug commands from the master device to the slave devices. As shown in Figure 12 The second stage (i.e. the debug command issuing stage) of the example 2 of the present application can include the following steps S2.1.2-S2.2.2:
[0310] S2.1.2, the debug server 41 and the debug client A 43 send the debug commands to the smart phone.
[0311] S2.2.2, the smart phone distributes the received debug commands to the debugged devices.
[0312] For example, in the example 2 shown in Figure 12 Since the fourth debug command corresponds to the process in the TV, the fourth debug command usually carries the device address or the device ID of the TV, in which case the smart phone forwards the fourth debug command to the TV. Since the fifth debug command corresponds to the process in the sound bar, the fifth debug command usually carries the device address or the device ID of the sound bar, in which case the smart phone forwards the fifth debug command to the sound bar.
[0313] Further, the third stage (i.e. the debugging stage) of the example 2 of the present application mainly includes the execution of the debugging operation by the debugged devices, and the acquisition of the debug data. As shown in Figure 11 The third stage (i.e. the debugging stage) of the example 2 of the present application can include the following steps S3.1.2-S3.2.2:
[0314] S3.1.2, the TV executes the debugging operation on the fourth process according to the received fourth debug command, and acquires the fourth debug data.
[0315] S3.2.2, the sound bar executes the debugging operation on the fifth process according to the received fifth debug command, and acquires the fifth debug data.
[0316] Further, the fourth stage (i.e. the debug information returning stage) of the example 2 of the present application mainly includes the sending of the debug data from the slave devices to the master device, and the forwarding of the debug data from the master device to the debug server. As shown in Figure 1 The fourth stage (i.e. the debug information returning stage) of the example 2 of the present application can include the following steps S4.1.2-S4.2.2:
[0317] S4.1.2, the TV sends the fourth debug data to the smart phone; the sound bar sends the fifth debug data to the smart phone.
[0318] S4.2.2, the smart phone sends the fourth debug data and the fifth debug data to the debug server 41.
[0319] Further, the fifth stage (i.e., the debugging information display stage) of the example 2 of the present application mainly includes distribution of the debugging data and display of the debugging information. As shown in Figure 1 The fifth stage (i.e., the debugging information display stage) of the example 2 of the present application can include the following steps S5.1.2 and S5.2.2:
[0320] S5.1.2, the debugging server 41 distributes the fourth debugging data and the fifth debugging data.
[0321] S5.2.2, the debugging server 41 and the debugging client A 43 perform the debugging information display.
[0322] For example, in the example 2 shown in Figure 11 The debugging server 41 and the debugging client A 43 can respectively display the fourth debugging data and the fifth debugging data to the developer through the UI interface. Among them, the specific steps of the example 2 shown in Figure 13 The specific step execution process of the example 2 shown in can refer to the introduction and description of the specific steps of the example 1 shown in above, which will not be repeated here. Figure 13
[0323] In the embodiments of the present application, the above-mentioned example 1 and example 2 are both taken as an example of multiple debugging clients and debugging servers cooperating to debug processes in two devices. The software debugging method provided in the embodiments of the present application is applicable to software debugging across multiple processes.
[0324] It should be noted that the above-mentioned example 1 is taken as an example of multiple debugging clients and debugging servers cooperating to debug processes in a master device and a slave device, and the above-mentioned example 2 is taken as an example of multiple debugging clients and debugging servers cooperating to debug processes in two slave devices connected with the master device. For other multi-device debugging scenarios, the software debugging method shown in the above-mentioned example 1 or example 2 can be referred to, and the embodiments of the present application will not be repeated. It should be noted that in the scenario of one debugging client debugging processes in a slave device connected with the master device through the debugging server, or in the scenario of multiple debugging clients debugging processes in a slave device connected with the master device through the debugging server, the master device only serves as a command distribution and coordination, and a debugging data forwarding device.
[0325] In addition, the above-described example 1 and example 2 are examples of multi-device debugging of multiple processes associated with each other. For independent functions between different processes, single-step debugging can be performed independently according to a conventional method. For example, the command manager of the debugging server can issue a debugging command to the master device, and the master device can distribute the debugging command to the corresponding debugging device according to the target address or device ID of the debugging command carried in the debugging command. The debugging device can perform a debugging operation on the corresponding process according to the process number of the debugging command carried in the debugging command, and obtain debugging data. Finally, the debugging device feeds back the obtained debugging data to the debugging information manager of the debugging server through the master device, and the debugging information manager distributes the debugging data to the corresponding debugging device.
[0326] By using the software debugging method shown in example 1 or example 2 of the above-described embodiment 1, cross-device collaborative debugging of multiple debugging devices on multiple debugging devices in a distributed device cluster can be achieved. For example, in a distributed scenario as shown in Figure 13 cross-process collaborative debugging of multiple devices working collaboratively can be performed. In addition, multiple developers can perform cross-process collaborative debugging of multiple devices working collaboratively in a distributed scenario as shown in Figure 13 by using multiple debugging devices. By using such a debugging method, the efficiency and quality of process debugging by developers can be greatly improved.
[0327] Embodiment 2: Single-device debugging of multiple devices.
[0328] In the scenario of single-device debugging of multiple devices in the embodiment 2 of the present application, a developer can debug processes in one or more devices in a distributed device cluster 42 by using a debugging server 41. The debugging devices can include a master device and one or more slave devices, or the debugging devices can include multiple slave devices, or the debugging devices can include one slave device.
[0329] The specific process of single-device debugging of multiple devices in the embodiment 2 of the present application is described below in example 3.
[0330] Example 3: A developer collaboratively debugs a sixth process (such as a control process) in a smartphone and a seventh process (such as a video playing process) in a television in a distributed device cluster 42 by using a debugging server 41.
[0331] For example, the scenario of example 1 can be a scenario in which a smartphone screens a television. For example, example 2 can be used to solve the problem of unsynchronized control of a smartphone and a television. Similar to Figure 13 example 1 shown in Figure 13As shown, the first stage (i.e. the debug command generation stage) of the example 3 of the present application mainly includes that the debug device determines the debugged processes, and the debug device generates the debug commands according to the debug events triggered by the developer. Taking the debug device is the debug server 41, the debug server 41 cooperatively debugs the sixth process (e.g. the control process) in the smartphone and the seventh process (e.g. the video playing process) in the TV set in the distributed device cluster 42 according to the debug events triggered by the developer as an example, the first stage (i.e. the debug command generation stage) of the example 3 of the present application mainly includes the following steps S1.1.3-S1.2.3: Figure 13 As shown, the first stage (i.e. the debug command generation stage) of the example 3 of the present application mainly includes that the debug device determines the debugged processes, and the debug device generates the debug commands according to the debug events triggered by the developer. Taking the debug device is the debug server 41, the debug server 41 cooperatively debugs the sixth process (e.g. the control process) in the smartphone and the seventh process (e.g. the video playing process) in the TV set in the distributed device cluster 42 according to the debug events triggered by the developer as an example, the first stage (i.e. the debug command generation stage) of the example 3 of the present application mainly includes the following steps S1.1.3-S1.2.3:
[0332] S1.1.3, in response to receiving the selection operation of the developer on the debuggable process, the debug server 41 determines the debugged process.
[0333] S1.2.3, the debug server 41 generates the debug commands according to the detected debug events triggered by the developer.
[0334] Further, the second stage (i.e. the debug command distribution stage) of the example 3 of the present application mainly includes that the debug device sends the debug commands to the master device, and the master device distributes the debug commands to the slave device. As shown in Figure 13 As shown, the second stage (i.e. the debug command distribution stage) of the example 3 of the present application mainly includes that the debug device sends the debug commands to the master device, and the master device distributes the debug commands to the slave device. As shown in
[0335] S2.1.3, the debug server 41 sends the debug commands to the smartphone.
[0336] S2.2.3, the smartphone distributes the received debug commands to the debugged device.
[0337] For example, in the example 3 as shown, since the sixth debug command corresponds to the process in the smartphone, the sixth debug command usually carries the device address or the device ID of the smartphone, in this case, the smartphone does not forward the sixth debug command. Since the seventh debug command corresponds to the process in the TV set, the seventh debug command usually carries the device address or the device ID of the TV set, in this case, the smartphone forwards the seventh debug command to the TV set. Figure 13
[0338] Further, the third stage (i.e. the debug stage) of the example 3 of the present application mainly includes that the debugged device executes the debug operation, and the debug data is acquired. As shown in Figure 11 As shown, the third stage (i.e. the debug stage) of the example 3 of the present application mainly includes that the debugged device executes the debug operation, and the debug data is acquired. As shown in
[0339] S3.1.3, the smartphone performs a debugging operation on the sixth process according to the received sixth debugging command, and obtains sixth debugging data.
[0340] S3.2.3, the television performs a debugging operation on the seventh process according to the received seventh debugging command, and obtains seventh debugging data.
[0341] Further, the fourth stage (i.e., the debugging information returning stage) of the example 3 of the present application mainly includes the sending of the debugging data from the slave device to the master device, and the forwarding of the debugging data from the master device to the debugging server. As shown in Figure 1 The fourth stage (i.e., the debugging information returning stage) of the example 3 of the present application can include the following steps S4.1.3-S4.2.3:
[0342] S4.1.3, the television sends the seventh debugging data to the smartphone.
[0343] S4.2.3, the smartphone sends the sixth debugging data and the seventh debugging data to the debugging server 41.
[0344] Further, the fifth stage (i.e., the debugging information displaying stage) of the example 3 of the present application mainly includes the displaying of the debugging information. As shown in Figure 11 The fifth stage (i.e., the debugging information displaying stage) of the example 3 of the present application can include the following step S5.1.3:
[0345] S5.1.3, the debugging server 41 displays the debugging information.
[0346] For example, in the example 3 shown in Figure 14 The debugging server 41 displays the debugging information corresponding to the sixth debugging data and the seventh debugging data to the developer through the UI interface.
[0347] The specific step execution process of the example 3 shown in Figure 14 The specific steps of the example 1 shown in Figure 14 The specific steps of the example 1 shown in
[0348] It should be noted that the above example 3 is an example of the debugging server debugging the processes in the master device and a slave device. For other single-device debugging multiple-device scenarios, the software debugging method shown in the above example 3 can be referred to, and the embodiments of the present application will not be described herein. It should be noted that in the scenario of the debugging server debugging the processes in a slave device connected to the master device, or in the scenario of the debugging server debugging the processes in multiple slave devices connected to the master device, the master device only serves as a command distribution and coordination device, and a debugging data forwarding device.
[0349] In addition, the above example 3 is taken as an example of single-device debugging of multiple processes associated with each other. For independent functions between different processes, single-step debugging can be performed independently according to a conventional method. For example, the command manager of the debugging server can send a debugging command to the master device, and the master device can distribute the debugging command to the corresponding device to be debugged according to the target address or device ID carried in the debugging command corresponding to the debugging command. The device to be debugged can perform a debugging operation on the corresponding process according to the process number carried in the debugging command corresponding to the debugging command, and obtain debugging data. Finally, the device to be debugged feeds back the obtained debugging data to the debugging information manager of the debugging server through the master device, and the debugging information manager distributes the debugging data to the corresponding debugging device.
[0350] By using the software debugging method shown in example 3 in example 2, the debugging device can realize cross-device collaborative debugging of multiple devices to be debugged in the distributed device cluster. For example, in the distributed scenario shown in example 4, multiple devices working collaboratively can be cross-process collaboratively debugged. By using such a debugging method, the efficiency and quality of process debugging by the developer can be greatly improved. Figure 14
[0351] Example 3: Multi-device debugging of a single device.
[0352] In the scenario of example 3 of the present application, the developer can perform collaborative debugging on the processes in one device in the distributed device cluster 42 through the debugging device. The debugging device can include at least two of the debugging server 41, the debugging client A 43, or the debugging client B 44, or the debugging device can include the debugging client A 43 or the debugging client B 44. The device to be debugged includes the master device.
[0353] If the debugging device includes at least one of the debugging client A 43 and the debugging client B 44, the debugging client A 43 or the debugging client B 44 needs to be connected to the debugging server 41 to realize the above-mentioned collaborative debugging of the processes in the master device.
[0354] The following example 4 describes the specific process of example 3 of the present application.
[0355] Example 4: The developer performs collaborative debugging on the eighth process (such as a control process, a video playback process, an audio playback process, a navigation process, an instant messaging process, etc.) in a smartphone (i.e., a master device) in the distributed device cluster 42 through the debugging server 41, the debugging client A 43, and the debugging client B 44.
[0356] For example, the scenario of Example 4 can be a scenario where multiple developers debug different execution processes in a process of a smart phone. Among them, similar to Figure 14 the example 1 shown, as Figure 14 shown, the first stage (i.e., the stage of determining the process to be debugged) of Example 4 of the present application mainly includes the debugging device determining the process to be debugged, and the debugging device generating a debugging command according to the debugging event triggered by the developer. Taking the debugging device as the debugging server 41, the debugging client A 43, and the debugging client B 44, and the debugging server 41, the debugging client A 43, and the debugging client B 44 respectively debugging different execution processes in the eighth process of the smart phone in the distributed device cluster 42 according to the debugging event triggered by the developer as an example, as Figure 14 shown, the first stage (i.e., the stage of generating the debugging command) can include the following steps S1.1.4 - S1.2.4:
[0357] S1.1.4. In response to receiving the selection operation of the process to be debugged by the developer, the debugging server 41, the debugging client A 43, and the debugging client B 44 determine the corresponding process to be debugged.
[0358] S1.2.4. The debugging server 41, the debugging client A 43, and the debugging client B 44 respectively generate debugging commands according to the detected debugging event triggered by the developer.
[0359] Furthermore, the second stage (i.e., the stage of sending the debugging command) of Example 4 of the present application mainly includes the debugging device sending the debugging command to the main device. As Figure 14 shown, the second stage (i.e., the stage of sending the debugging command) of Example 4 of the present application can include the following step S2.1.4:
[0360] S2.1.4. The debugging server 41, the debugging client A �3, and the debugging client B 44 send the debugging command to the smart phone.
[0361] Furthermore, the third stage (i.e., the debugging stage) of Example 4 of the present application mainly includes the debugged device executing the debugging operation and obtaining the debugging data. As Figure 11 shown, the third stage (i.e., the debugging stage) of Example 4 of the present application can include the following step S3.1.4:
[0362] S3.1.4. The smart phone executes the corresponding debugging operation on the eighth process according to the received eighth debugging command, ninth debugging command, and tenth debugging command, and respectively obtains the eighth debugging data, ninth debugging data, and tenth debugging data.
[0363] Furthermore, the fourth stage (i.e., the stage of returning the debugging information) of Example 4 of the present application mainly includes the main device forwarding the debugging data to the debugging server. AsFigure 15 As shown in FIG. 4B, the fourth stage (i.e., the debug information returning stage) of the example 4 of the present application can include the following steps S4.1.4:
[0364] S4.1.4, the smartphone sends the eighth debug data, the ninth debug data and the tenth debug data to the debug server 41.
[0365] Further, the fifth stage (i.e., the debug information displaying stage) of the example 4 of the present application mainly includes the distribution of the debug data and the display of the debug information. As shown in FIG. 4C, the fifth stage (i.e., the debug information displaying stage) of the example 4 of the present application can include the following steps S5.1.4 and S5.2.4: Figure 15
[0366] S5.1.4, the debug server 41 distributes the eighth debug data, the ninth debug data and the tenth debug data.
[0367] S5.2.4, the debug server 41, the debug client A 43 and the debug client B 44 display the debug information.
[0368] For example, in the example 4 shown in FIG. 4C, the debug server 41, the debug client A 43 and the debug client B 44 respectively display the eighth debug data, the ninth debug data and the tenth debug data to the developer through the UI interface. Figure 15 In the example 4 shown in FIG. 4C, the specific step execution process of the example 4 can refer to the introduction and description of the specific steps of the example 1 shown in FIG. 4A above, which will not be repeated here.
[0369] In the example 4 shown in FIG. 4C, the specific step execution process of the example 4 can refer to the introduction and description of the specific steps of the example 1 shown in FIG. 4A above, which will not be repeated here.
[0370] It should be noted that the above example 4 is an example of multiple debug clients and a debug server cooperating to debug the process in the host device. For other scenarios of debugging a single device by multiple devices, the software debugging method shown in the above example 4 can be referred to, and the embodiments of the present application will not be repeated here.
[0371] Through the software debugging method shown in the example 4 of the above embodiment 3, the cooperative debugging of the processes in a certain device in the distributed device cluster by multiple debug devices can be realized. Through such a debugging method, the efficiency and quality of the process debugging by the developer are greatly improved.
[0372] In some embodiments, the developer can also implement flexible debugging of software in other scenarios based on the debugging system framework provided by the embodiments of the present application, for example, debugging a single device by a single device, that is, debugging the process in the host device by the debug server. For example, in the scenario of debugging a single device by a single device, a software debugging method provided by the embodiments of the present application can include the following steps:
[0373] Step 1: In response to receiving the developer's selection of debuggable processes, the debug server 41 determines the process to be debugged.
[0374] Step 2: Debug server 41 generates debug commands based on the debug events triggered by the developers.
[0375] Step 3: Debug server 41 sends debug commands to smartphones based on the detected debug events of developers.
[0376] Step 4: The smartphone executes the corresponding debugging operation and obtains debugging data based on the received debugging command.
[0377] Step 5: The smartphone sends the acquired debugging data to the debugging server 41.
[0378] Step 6: Display debugging information on server 41.
[0379] For details on the above steps, please refer to the descriptions of Examples 1, 2, 3, and 4 above; they will not be repeated here.
[0380] It should be understood that the various solutions in the embodiments of this application can be used in a reasonable combination, and the explanations or descriptions of the various terms appearing in the embodiments can be referenced or explained to each other in the various embodiments, without limitation.
[0381] It should also be understood that, in the various embodiments of this application, the order of the above-mentioned processes does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0382] It is understood that electronic devices (such as the first device, second device, third device, or fourth device) include hardware structures and / or software modules corresponding to perform the respective functions in order to implement the functions of any of the above embodiments. Those skilled in the art should readily recognize that, based on the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is implemented in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0383] This application embodiment can divide electronic devices (such as a first device, a second device, a third device, or a fourth device) into functional modules. For example, each function can be divided into its own functional modules, or two or more functions can be integrated into one processing module. The integrated modules can be implemented in hardware or as software functional modules. It should be noted that the module division in this application embodiment is illustrative and only represents one logical functional division; other division methods may be used in actual implementation.
[0384] For example, when dividing functional modules in an integrated manner, such as The diagram shown is a structural block diagram of an electronic device provided in an embodiment of this application. This electronic device can be a first device, a second device, a third device, or a fourth device. As shown, the electronic device may include a processing unit 1510 and a transceiver unit 1520.
[0385] Furthermore, in one possible structure, such as As shown, the electronic device may also include a storage unit 1530.
[0386] When the electronic device is the first device, the transceiver unit 1520 is used to receive a first debugging command corresponding to a first process in the third device from the second device, send the first debugging command to the third device; receive first debugging data from the third device; and send the first debugging data to the second device; and / or other processes used in the art described herein. The first debugging command carries an identifier of the third device and an identifier of the first process; the first debugging data is debugging data obtained by the third device executing the first debugging command on the first process; the first debugging data carries an identifier of the third device and an identifier of the first process. The processing unit 1510 is used to determine, based on the identifier of the third device and the identifier of the first process carried in the first debugging data, to send the first debugging data to the second device via the transceiver unit 1520; and / or other processes used in the art described herein.
[0387] Further, in some embodiments, the transceiver 1520 is further configured to send, to the second debugging module, a second debugging command corresponding to a second process in the fourth device triggered by the developer through the first device; send the second debugging command to the third device; and receive second debugging data from the third device; and / or for other procedures of the technologies described herein. The second process is associated with the first process, the second debugging command carries an identifier of the fourth device and an identifier of the second process; the second debugging data is debugging data obtained by the fourth device executing the second debugging command on the second process; and the second debugging data carries the identifier of the fourth device and the identifier of the second process. The processing unit 1510 is further configured to determine, according to the identifier of the fourth device and the identifier of the second process carried in the second debugging data, that the second debugging data is displayed to the developer by the first device.
[0388] When the electronic device is the third device, the transceiver 1520 is configured to receive the first debugging command from the first device; send the first debugging data to the first device; and / or for other procedures of the technologies described herein. The processing unit 1510 is configured to invoke the debugging tool in the third device to execute the first debugging command on the first process according to the identifier of the third device and the identifier of the first process carried in the first debugging command, and obtain the first debugging data; and / or for other procedures of the technologies described herein.
[0389] Further, in some embodiments, the transceiver 1520 is further configured to receive the second debugging command from the first device; send the second debugging data to the first device; receive the second debugging data from the fourth device; and / or for other procedures of the technologies described herein. The processing unit 1510 is configured to send the second debugging command to the fourth device according to the identifier of the fourth device carried in the second debugging command; and / or for other procedures of the technologies described herein.
[0390] When the electronic device is the second device, the processing unit 1510 is configured to generate the debugging command according to the debugging operation triggered by the developer, perform debugging cluster networking with the first device, and / or for other procedures of the technologies described herein. The transceiver 1520 is configured to send the first debugging command / second debugging command to the first device, receive the first debugging data / second debugging data from the first device, and / or for other procedures of the technologies described herein.
[0391] When the electronic device is the fourth device, the transceiver 1520 is configured to receive the first debugging command / second debugging command from the third device, send the first debugging data / second debugging data to the third device, send the information of the debuggable process to the third device, and / or for other procedures of the technologies described herein.
[0392] It should be noted that the transceiver 1520 described above can include radio frequency circuitry. Specifically, the electronic device can perform the reception and transmission of wireless signals through the radio frequency circuitry. Generally, the radio frequency circuitry includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, etc. In addition, the radio frequency circuitry can also communicate the wireless communication and other devices. The wireless communication can use any communication standard or protocol, including but not limited to Global System for Mobile Communication, General Packet Radio Service, Code Division Multiple Access, Wideband Code Division Multiple Access, Long Term Evolution, Email, Short Messaging Service, etc.
[0393] In an alternative way, when using software to implement data transmission, it can be implemented in the form of computer program product in whole or in part. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the processes or functions described in the embodiments of the present application are implemented in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, the computer instructions can be transmitted from one website site, computer, server or data center to another website site, computer, server or data center through wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) way. The computer readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. integrated with one or more available media. The available media can be magnetic media (such as floppy disk, hard disk, magnetic tape), optical media (such as DVD), or semiconductor media (such as solid state disk (SSD)) and the like.
[0394] The steps of the methods or algorithms described in conjunction with the embodiments of the present application can be implemented in hardware or by a processor executing software instructions. The software instructions can be composed of corresponding software modules, and the software modules can be stored in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, register, hard disk, mobile hard disk, CD-ROM or any other form of storage medium well known in the art. An exemplary storage medium is coupled to the processor, so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be an integral part of the processor. The processor and the storage medium can be located in an ASIC. In addition, the ASIC can be located in an electronic device. Of course, the processor and the storage medium can also exist as discrete components in the electronic device.
[0395] Those skilled in the art can clearly understand the above-mentioned technical solutions from the description of the above-embodiment, for the convenience and brevity of description, only the division of the above-mentioned functional modules is exemplified, in actual application, the above-mentioned functions can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
[0396] In an optional mode, the present application provides a debugging system, the debugging system comprising a first device, a second device, a third device and a fourth device, the first device, the second device, the third device and the fourth device being used to implement the method in any possible implementation manner provided by the present application.
[0397] In an optional mode, the present application provides a chip system, the chip system comprising a processor, a memory, and instructions stored in the memory; when the instructions are executed by the processor, the method in any possible implementation manner provided by the present application is implemented. The chip system can be composed of a chip, or can contain a chip and other discrete devices.
[0398] In several embodiments provided by the present application, it should be understood that the electronic device and method disclosed can be implemented in other manners. For example, the described device embodiments are merely schematic, and the division of the modules or units can be different, for example, a plurality of units or components can be combined or integrated into another device, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections can be indirect couplings or communication connections through some interfaces, devices or units, and can be electrical, mechanical or in other forms.
[0399] The units described as separate components can or can not be physically separate, and the components displayed as units can be one physical unit or multiple physical units, that is, can be located in one place, or can be distributed to multiple different places. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiment scheme.
[0400] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware, or in the form of software functional units.
[0401] The integrated unit, if implemented in the form of a software function unit and sold or used as an independent product, can be stored in a readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application essentially or say the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The software product is stored in a storage medium, including a plurality of instructions to make a device (which can be a single-chip microcomputer, a chip, etc.) or a processor execute all or part of the steps of the method described in various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a magnetic disk or an optical disk, and various media that can store program codes.
[0402] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any change or replacement within the technical scope disclosed in the present application should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A software debugging method characterized by comprising: The method is used for cooperative debugging of processes in a plurality of devices in a distributed device cluster, the distributed device cluster comprising a third device and a fourth device, the processes in the plurality of devices comprising a first process in the third device and a second process in the fourth device, the first process being associated with the second process, the method comprising: The first device receives a first debugging command from the second device, the first debugging command corresponding to the first process in the third device, the first debugging command carrying an identifier of the third device and an identifier of the first process; In response to a user-triggered debugging event, the first device obtains a second debugging command, the second debugging command corresponding to the second process in the fourth device, the second debugging command carrying an identifier of the fourth device and an identifier of the second process; The first device sends the first debugging command and the second debugging command to the third device; The first device receives first debugging data and second debugging data from the third device, the first debugging data being debugging data obtained by the third device after executing the first debugging command on the first process, the first debugging data carrying the identifier of the third device and the identifier of the first process, the second debugging data being debugging data obtained by the fourth device after executing the second debugging command on the second process, the second debugging data being sent by the fourth device to the third device after executing the second debugging command on the second process, the second debugging data carrying the identifier of the fourth device and the identifier of the second process; The first device sends the first debugging data to the second device for the second device to display the first debugging data; and the first device displays the second debugging data through a user interface (UI) interface.
2. The method of claim 1, wherein, The method further comprises: The first device receives a third debugging command from the second device, the third debugging command corresponding to a third process in the fourth device, the third debugging command carrying an identifier of the fourth device and an identifier of the third process; The first device sends the third debugging command to the third device; The first device receives third debugging data from the third device, the third debugging data being debugging data obtained by the fourth device after executing the third debugging command on the third process, the third debugging data being sent by the fourth device to the third device after executing the third debugging command on the third process, the third debugging data carrying the identifier of the fourth device and the identifier of the third process; and the first device sends the third debugging data to the second device.
3. The method of claim 1, wherein, The method further comprises: The first device receives a viewing request from the second device; In response to the viewing request, the first device sends the second debugging data to the second device.
4. The method of any one of claims 1-3, wherein The first device is in communication connection with the second device; the first device is in communication connection with the third device, and the third device is in communication connection with the fourth device.
5. The method according to any one of claims 1-3, characterized in that, The first device sends the first debugging data to the second device, including: The first device sends the first debugging data to the second device according to the identifier of the third device and the identifier of the first process carried in the first debugging data.
6. The method of claim 2, wherein, Before the first device receives the first debugging command from the second device, the method further includes: The first device sends a command for discovering a debuggable process to the third device, and the command for discovering a debuggable process is used to discover a debuggable process. The first device receives debuggable process information from the third device, and the debuggable process information includes information of a debuggable process discovered by the third device and the fourth device.
7. The method of claim 6, wherein, The information of the debuggable process includes information of the first process, information of the second process, and information of the third process.
8. The method according to any one of claims 1-3, 7, characterized in that, The first debugging command includes a breakpoint command and / or a time debugging command.
9. The method of claim 8, wherein, The breakpoint command includes one or more of a data breakpoint command, a synchronization breakpoint command, or a conditional breakpoint command.
10. A first device, comprising: The first device is used for cooperative debugging of processes in a plurality of devices in a distributed device cluster, the distributed device cluster includes a third device and a fourth device, the processes in the plurality of devices include a first process in the third device and a second process in the fourth device, the first process is associated with the second process, and the first device includes: The framework layer is configured to obtain a second debugging command in response to a debugging event triggered by a user; The second debugging module is configured to: receive a first debugging command from a second device; send the first debugging command and the second debugging command to a third device; receive first debugging data and second debugging data from the third device; send the first debugging data to the framework layer, so that the framework layer displays the first debugging data through a user interface (UI) interface to exhibit the second debugging data; and send the first debugging data to the second device for the second device to exhibit the first debugging data; The first debugging command corresponds to the first process in the third device, and the first debugging command carries an identifier of the third device and an identifier of the first process; the first debugging data is debugging data obtained by the third device after executing the first debugging command on the first process, the first debugging data carries the identifier of the third device and the identifier of the first process, the second debugging data is debugging data obtained by the fourth device after executing the second debugging command on the second process, and the second debugging data is sent by the fourth device to the third device after executing the second debugging command on the second process, the second debugging data carries an identifier of the fourth device and an identifier of the second process.
11. The first device of claim 10, wherein The second debugging module is further configured to receive a viewing request from the second device, and send the second debugging data to the second device.
12. The first device of claim 10, wherein, The second debugging module is further configured to receive a third debugging command from the second device, the third debugging command corresponding to a third process in a fourth device, the third process being associated with the first process, and the third debugging command carrying an identifier of the fourth device and an identifier of the third process; and, send the third debugging command to the third device, and receive third debugging data from the third device, the third debugging data being debugging data obtained by the fourth device after executing the third debugging command on the third process, and the third debugging data carrying the identifier of the fourth device and the identifier of the third process.
13. The first device of claim 12, wherein, The second debugging module is further configured to send the third debugging data to the framework layer, so that the framework layer displays the third debugging data through a UI interface.
14. The first device of any one of claims 10-13, wherein, The second debugging module is further configured to, establish a communication connection with the second device, and communicate with the third device through the first device.
15. The first device of any one of claims 10-13, wherein, The second debugging module is specifically configured to, send the first debugging data to the second device according to the identifier of the third device and the identifier of the first process carried in the first debugging data.
16. The first device of any one of claims 10-13, wherein, The second debugging module is further configured to, send a command for discovering a debuggable process to the third device, so as to discover a debuggable process; and, receive debuggable process information from the third device, the debuggable process information including information of debuggable processes discovered by the third device and the fourth device.
17. A commissioning system, comprising: The debugging system comprises: The first device according to any one of claims 10-16; and a distributed device cluster comprising a third device and a fourth device.
18. An electronic device, comprising: The electronic device comprises: a memory configured to store a computer program; a processor configured to execute the computer program, so that the electronic device implements the method according to any one of claims 1-9.
19. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer program code, and the computer program code is executed by the processing circuit to implement the method according to any one of claims 1-9.
20. A chip system, characterized by The chip system comprises a processing circuit and a storage medium, and the storage medium stores computer program code; the computer program code is executed by the processing circuit to implement the method according to any one of claims 1-9.
21. A computer program product, characterised in that, The computer program product is used to run on a computer to implement the method according to any one of claims 1-9.
Citation Information
Patent Citations
Cross-platform debugging shell implementation method and device and computer
CN111459827A
Embedded device, embedded system and maintenance method thereof
CN111526043A