Application debugging method and electronic device
AssigneeHuawei Technologies Co., Ltd.
InventorJian Xiao
Life of this patent
Estimating the term…
Abstract
An application debugging method is provided. In the method, in response to a user operation, an intergrated development environment (IDE) device sends, to a directly connected device, a first debug packet used to debug a to-be-debugged application in the directly connected device and a third debug packet used to debug a to-be-debugged application in an indirectly connected device. The directly connected device receives the first debug packet and the third debug packet. The directly connected device sends the third debug packet to the indirectly connected device. According to a technical solution provided in this disclosure, the IDE device may not need to establish a communication connection to the indirectly connected device.
Claims17
An application debugging method, the method comprising:
- receiving, by a first electronic device, a first operation for establishing debug sessions between the first electronic device and two or more second electronic devices of a distributed application, wherein the two or more second electronic devices comprise a directly connected device and an indirectly connected device;
- sending, by the first electronic device in response to the first operation, a session establishment request to establish the debug sessions, wherein the session establishment request comprises first device information of the directly connected device and second device information of the indirectly directed device;
- receiving, by the first electronic device, a second operation indicating the first electronic device to control a debugging process of the distributed application;
- in response to the second operation, obtaining, by the first electronic device, the first device information of the directly connected device and the second device information of the indirectly connected device, a first debug package for a first application on the directly connected device and a second debug package for a second application on the indirectly connected device, wherein the first application and the second application belong to the distributed application;
- generating, by the first electronic device, a first debug packet for debugging the first application and a second debug packet for debugging the second application, wherein the first debug packet comprises the first device information of the directly connected device, and the second debug packet comprises the second device information of the indirectly connected device and the second debug package for the second application, wherein each of the first debug packet and the second debug packet comprises a source (src) field for end device address information, a destination (dst) field for sink device address information, a type field for payload type, a session field for session information and a packet payload content field, wherein the type field for payload type indicates a language type of content in the packet payload content field, the session field for session information indicates a corresponding debug session, and the packet payload content field includes a corresponding debug package;
- and
- sending, by the first electronic device, the first debug packet and the second debug packet to the directly connected device through the debug sessions, wherein the second debug packet for debugging the second application on the indirectly connected device is sent to the indirectly connected device through the directly connected device.
A first electronic device, comprising:
- a memory configured to store program instructions;
- a processor configured to execute the program instructions, causing the first electronic device to perform:
- receiving a first operation for establishing debug sessions between the first electronic device and two or more second electronic devices of a distributed application, wherein the two or more second electronic devices comprise a directly connected device and an indirectly connected device;
- sending, in response to the first operation, a session establishment request to establish the debug sessions, wherein the session establishment request comprises first device information of the directly connected device and second device information of the indirectly directed device;
- receiving a second operation indicating the first electronic device to control a debugging process of the distributed application;
- in response to the second operation, obtaining the first device information of the directly connected device and the second device information of the indirectly connected device, a first debug package for a first application on the directly connected device and a second debug package for a second application on the indirectly connected device, wherein the first application and the second application belong to the distributed application generating a first debug packet for debugging the first application and a second debug packet for debugging the second application, wherein the first debug packet comprises the first device information of the directly connected device, and the second debug packet comprises the second device information of the indirectly connected device and the second debug package for the second application, wherein each of the first debug packet and the second debug packet comprises a source (src) field for end device address information, a destination (dst) field for sink device address information, a type field for payload type, a session field for session information and a packet payload content field, wherein the type field for payload type indicates a language type of content in the packet payload content field, the session field for session information indicates a corresponding debug session, and the packet payload content field includes a corresponding debug package;
- and
- sending the first debug packet and the second debug packet to the directly connected device through the debug sessions, wherein the second debug packet for debugging the second application on the indirectly connected device is sent to the indirectly connected device through the directly connected device.
A non-transitory readable medium comprising program instruction, when executed by a processor in a first electronic device, causing the first electronic device to perform:
- receiving a first operation for establishing debug sessions between the first electronic device and two or more second electronic devices of a distributed application, wherein the two or more second electronic devices comprise a directly connected device and an indirectly connected device;
- sending, in response to the first operation, a session establishment request to establish the debug sessions, wherein the session establishment request comprises first device information of the directly connected device and second device information of the indirectly directed device;
- receiving a second operation indicating the first electronic device to control a debugging process of the distributed application;
- in response to the second operation, obtaining the first device information of the directly connected device and the second device information of the indirectly connected device, a first debug package for a first application on the directly connected device and a second debug package for a second application on the indirectly connected device, wherein the first application and the second application belong to the distributed application;
- generating a first debug packet for debugging the first application and a second debug packet for debugging the second application, wherein the first debug packet comprises the first device information of the directly connected device, and the second debug packet comprises the second device information of the indirectly connected device and the second debug package for the second application, wherein each of the first debug packet and the second debug packet comprises a source (src) field for end device address information, a destination (dst) field for sink device address information, a type field for payload type, a session field for session information and a packet payload content field, wherein the type field for payload type indicates a language type of content in the packet payload content field, the session field for session information indicates a corresponding debug session, and the packet payload content field includes a corresponding debug package;
- and
- sending the first debug packet and the second debug packet to the directly connected device through the debug sessions, wherein the second debug packet for debugging the second application on the indirectly connected device is sent to the indirectly connected device through the directly connected device.
Dependencies are inferred from the claim text.