Summary of the invention
Embodiments provide method and the device of the debugging of a kind of mobile device application development, the trace debug of source code level can be carried out mobile device application program, improve the efficiency of application development commissioning.
One aspect of the present invention has supplied a kind of method of mobile device application development debugging, comprising: the commissioning device attribute configured according to developing engine, provides the mobile device list meeting this commissioning device attribute specification to described developing engine; According to the equipment connection request that developing engine is initiated, set up the connection between described developing engine and the mobile device selected by this developing engine; The application code forwarding developing engine initiation disposes request to described mobile device, the code portions of application program adjustable to be tested is deployed on described mobile device, and starts the application code of this deployment; Forward the debug command that sends in application development debug process of developing engine to described mobile device, and forward the debug command that described mobile device returns and feed back to described developing engine.
Further, according to the equipment connection request that developing engine is initiated, the connection of setting up between described developing engine and the mobile device selected by this developing engine specifically comprises: the equipment connection request initiated according to developing engine, prototype testing server and the mobile device selected by developing engine connect, and receive by the connection of setting up the connection response message that described mobile device returns; Described connection response message is transmitted to described developing engine, sets up the connection between described developing engine and described mobile device.
Further, said method also comprises: prototype testing server adds forwarding routing iinformation in Debugging message is transmitted, and set up the corresponding relation of described developing engine and described mobile device, and the resource status arranging described mobile device is debugging mode.
Further, debug command at least comprises one of issuing orders: breakpoint is set, checks breakpoint, single step perform, check variable and check internal memory.
Further, commissioning device attribute at least comprises with the next item down: device operating system version information, unit type information.
This fermentation provides the method for a kind of mobile device application development debugging on the other hand, comprise: send to prototype testing server and obtain list of devices request, carry commissioning device attribute in the request of described acquisition list of devices, and select mobile device to be debugged in meeting in the mobile device list of this commissioning device attribute specification of returning; By described prototype testing server to selected mobile device transmitting apparatus connection request, to set up the connection between described mobile device; Send application code by described prototype testing server to described mobile device and dispose request, the code portions of application program adjustable to be tested to be deployed on described mobile device, and start the application code of this deployment; The debug command sent by debugger in Integrated Development Environment IDE is transmitted to described mobile device by described prototype testing server; Receive the debug command feedback information that described prototype testing server is forwarded back to, and resolve by the debugger in described IDE, show this debug command feedback information.
Further, if described debug command is for arranging breakpoint, then describedly to be resolved by the debugger in IDE, show this debug command feedback information and specifically comprise: according to the debug command feedback information received, be associated with the breakpoint place in described application source code by the debugger in IDE, and shown this debug command feedback information.
Further, after connection between described foundation and described mobile device, also comprise: show the interface of described mobile device and the mobile device interface operated on this display window by display window, described mobile device is given in transmit operation instruction, and the described mobile device of reception display performs the interface after this operational order.
Further aspect of the present invention has supplied a kind of device of mobile device application development debugging, comprise: access scheduling unit, for the commissioning device attribute configured according to developing engine, provide the mobile device list meeting this commissioning device attribute specification to described developing engine; Connection management unit, for the equipment connection request initiated according to developing engine, sets up the connection between described developing engine and the mobile device selected by this developing engine; Application deployment unit, the application code of initiating for forwarding described developing engine disposes request to described mobile device, the code portions of application program adjustable to be tested is deployed on described mobile device, and starts the application code of this deployment; Debugging message agent unit, for forwarding debug command that described developing engine sends in application development debug process to described mobile device, and forwards the debug command that described mobile device returns and feeds back to described developing engine.
Further, Debugging message setting unit, adds forwarding routing iinformation, set up the corresponding relation of described developing engine and the mobile device selected by this developing engine, and the resource status arranging described mobile device is debugging mode in transmitting at Debugging message.
Another aspect of the invention provides the developing engine of mobile device application development debugging, comprise: commissioning device acquiring unit, list of devices request is obtained for sending to prototype testing server, carry commissioning device attribute in the request of described acquisition list of devices, and select mobile device to be debugged in meeting in the mobile device list of this commissioning device attribute specification of returning; Connection management unit, for equipment connection request being sent to selected mobile device by described prototype testing server, sets up the connection between described mobile device; Disposing application program unit, described mobile device is sent to for application code being disposed request by described prototype testing server, the code portions of application program adjustable to be tested is deployed on described mobile device, and starts the application code of this deployment; Debugging message administrative unit, is transmitted to described mobile device for the debug command sent by the debugger in Integrated Development Environment IDE by described prototype testing server, and receives the debug command feedback information that described prototype testing server is forwarded back to; Feedback information processing unit, for resolving, showing the debug command feedback information received by described Debugging message administrative unit by the debugger in described IDE.
Further, interface operation administrative unit, for being shown the interface of described mobile device by display window and the mobile device interface operated on this display window, described mobile device is given in transmit operation instruction, receive the described mobile device of display perform this operational order after interface.
As can be seen from above-mentioned provided technical scheme, first according to the commissioning device attribute that developing engine configures, provide the mobile device list meeting this commissioning device attribute specification to described developing engine; According to the equipment connection request that developing engine is initiated, set up the connection between described developing engine and the mobile device selected by this developing engine; The application code forwarding developing engine initiation disposes request to described mobile device, the code portions of application program adjustable to be tested is deployed on described mobile device, and starts the application code of this deployment; Forward the debug command that sends in application development debug process of developing engine to described mobile device, and forward the debug command that described mobile device returns and feed back to described developing engine.Just can be carried out the trace debug of source code level by said method to mobile device application program, improve the efficiency of application development commissioning.
Embodiment
Embodiments provide method and the device of the debugging of a kind of mobile device application development, the trace debug of source code level can be carried out to mobile device application program, improve the efficiency of application development commissioning, the demand of developer to various mobile platform, various terminal type exploitation commissioning can be met simultaneously.
For better describing embodiment of the present invention, existing by reference to the accompanying drawings the specific embodiment of the present invention to be described, be illustrated in figure 1 the embodiment of the present invention provide mobile device application development to debug a kind of method flow schematic diagram, described method comprises:
Step 11: the commissioning device attribute configured according to developing engine, provides the mobile device list meeting this commissioning device attribute specification to developing engine.
In this step, first can be sent according to developing engine by prototype testing server, the commissioning device attribute configured, the mobile device list meeting this commissioning device attribute specification is provided to described developing engine.The mark ID of each mobile device, connectivity port information is comprised in this mobile device list, and the whether information such as idle.In specific implementation, the commissioning device attribute that developing engine configures at least comprises with the next item down: device operating system version information, unit type information.Other device attribute information that certain this area can be expected also can meet the demands.
Step 12: the equipment connection request initiated according to developing engine, sets up the connection between described developing engine and the mobile device selected by this developing engine.
In this step, the equipment connection request can initiated according to developing engine by prototype testing server, connect with the mobile device selected by developing engine, receive the connection response message that described mobile device returns, described connection response message is transmitted to described developing engine, thus sets up the connection between described developing engine and described mobile device.In specific implementation, the interface information of mobile device can also be comprised in the connection response message that described mobile device returns, prototype testing server by described interface information by sending to described developing engine with the form of code stream after calculation code, such developing engine just can show the interface of mobile device after the decoding, so that developing engine shows the interface of described mobile device by display window, and the interface transmit operation instruction operating the mobile device of this screen message is to mobile device, after mobile device performs corresponding operating instruction, again the interface information after executable operations instruction is returned to prototype testing server, by prototype testing server by this interface information by sending to described developing engine with the form of code stream after calculation code, developing engine just can show the interface of the mobile device after executable operations instruction after the decoding.The interface of above-mentioned mobile device can be the whole mobile device interface such as mobile device screen and keyboard.
In specific implementation process, mobile device to be debugged is selected in the list of devices that user is provided at prototype testing server by developing engine, developing engine is to prototype testing server initiating equipment connection request, and this equipment connection request comprises mark ID and the connectivity port information of selected mobile device; Prototype testing server connects according to the mark ID of mobile device and connectivity port information and corresponding mobile device, and receive the screen message of mobile device, by this screen message by sending to developing engine with H264 code stream form after calculation code process, developing engine carries out decoding display to code stream information, and in Integrated Development Environment IDE, send debugging configuration successful response message further.
In addition, after described prototype testing server and the mobile device selected by developing engine connect, can also add in Debugging message is transmitted and forward routing iinformation, set up the corresponding relation of described developing engine and described mobile device, and the resource status arranging described mobile device is debugging mode, thus carry out early-stage preparations for the debugging of described mobile device, in specific implementation, the information such as the connectivity port of mobile device, mark ID in the forwarding routing iinformation added, can be comprised.
Step 13: the application code forwarding developing engine initiation disposes request to described mobile device, the code portions of application program adjustable to be tested is deployed on described mobile device, and starts the application code of this deployment.
In this step, the application code deployment request of developing engine initiation can be forwarded to described mobile device by prototype testing server, the code portions of application program adjustable to be tested is deployed on described mobile device, and starts the application code of this deployment.
In embodiments of the present invention, being deployed to, mobile device is the application program being in the development phase, and what dispose is the code of application program adjustable to be tested; And the application program completing exploitation is installed on mobile device, and debugging amendment can not be carried out to code.
In specific implementation process, user launches application is debugged, first initiate application code by IDE and dispose request message, this application code is disposed request message and is forwarded in prototype testing server by developing engine, prototype testing server is forwarded on corresponding mobile device, and dispose on the mobile apparatus at the code of application program adjustable send application code deployment success response message to developing engine afterwards.
This response message is forwarded to IDE by developing engine, IDE is after receiving this response message, by the forwarding of developing engine and prototype testing server, initiate to start application code request message to mobile device, the application code of deployment starts up after receiving and starting application code request by mobile device.
Step 14: forward the debug command that sends in application development debug process of developing engine to described mobile device, and forward the debug command that described mobile device returns and feed back to described developing engine.
In this step, debug command that developing engine sends can be forwarded to described mobile device by prototype testing server, and forward the debug command that described mobile device returns and feed back to described developing engine.
In specific implementation process, if prototype testing server is after connecting with mobile device, forwarding routing iinformation is with the addition of in Debugging message is transmitted, after the debug command that then prototype testing server can send at acquisition developing engine, search Debugging message according to the source of debug command to transmit, find the connectivity port of described mobile device, and debug command is transmitted to this mobile device by this connectivity port, and the debug command feedback information that this mobile device of wait-receiving mode returns; If search unsuccessfully, then can return failure response message to described developing engine.
And mobile device is after receiving debug command, perform this debug command, and debug command feedback information is returned to prototype testing server, after prototype testing server receives this debug command feedback information, then this debug command feedback information is transmitted to described developing engine.
Above-mentioned debug command at least comprises one of issuing orders: breakpoint is set, checks breakpoint, single step perform, check variable and check internal memory.Certainly, in specific implementation process, also can comprise other debug commands known in the art, not limit herein.
For example, if the debug command that developing engine sends is for arranging breakpoint, then mobile device is after receiving the next breakpoint setup request of prototype testing server forwarding, arranges breakpoint in the application, and breakpoint information is sent to developing engine by prototype testing server; When application program launching also performs set breakpoint place, triggering breakpoints information, breakpoint response message (i.e. debug command feedback information) is sent to developing engine by prototype testing server by mobile device, developing engine is transmitted to IDE again, IDE is after receiving breakpoint response message, be associated with the breakpoint place in application program source coded program, in the debugger of IDE, show breakpoint response message.
By said method embodiment, just can carry out the trace debug of source code level to mobile device application program, improve the efficiency of application development commissioning.
The embodiment of the present invention additionally provides the method for another kind of mobile device application development debugging, and be illustrated in figure 2 the another kind of method flow schematic diagram of mobile device application development debugging, described method comprises:
Step 21: send to prototype testing server and obtain list of devices request, obtain in list of devices request and carry commissioning device attribute, and select mobile device to be debugged in meeting in the mobile device list of this commissioning device attribute specification of returning.
In this step, first can be sent to prototype testing server by developing engine side and obtain list of devices request, in the request of described acquisition list of devices, carry commissioning device attribute, after receiving the list that prototype testing server returns, show this list of devices information; Then mobile device to be debugged is selected in meeting in the mobile device list of this commissioning device attribute specification of returning.
In specific implementation process, after starting IDE by user, first by developing engine configuration commissioning device attribute, this commissioning device attribute comprises operating system version, device type etc.; Then developing engine sends to prototype testing server and obtains list of devices request message, this acquisition list of devices request message comprises configured commissioning device attribute, and prototype testing server returns corresponding list of devices according to configured commissioning device attribute to developing engine.
Step 22: by described prototype testing server to selected mobile device transmitting apparatus connection request, sets up the connection between described mobile device.
In this step, can by developing engine after have selected mobile device to be debugged from mobile device list, to described prototype testing server transmitting apparatus connection request, forward this equipment connection request to selected mobile device by described prototype testing server, thus set up the connection between described mobile device.
Specifically, developing engine is to prototype testing server initiating equipment connection request, prototype testing server and corresponding mobile device connect, and receive the connection response message that mobile device returns, this connection response message is transmitted to developing engine, after developing engine receives this connection response message, set up the connection between developing engine and described mobile device.In specific implementation, the screen message of mobile device can also be comprised in the connection response message that mobile device returns, prototype testing server by described screen message by sending to described developing engine with the form of code stream after calculation code, such developing engine just can show the screen message of mobile device after the decoding, and in Integrated Development Environment IDE, send debugging configuration successful response message further.
In addition, after developing engine sets up the connection between described mobile device, the interface of described mobile device can also be shown by display window, and the mobile device interface operated on this display window, operational order is produced while operation, this operational order is sent to described mobile device by connectivity port, and the described mobile device of reception display performs the interface after this operational order.Such as can by the button of display window straighforward operation mobile device, browse liquid crystal display, listen to equipment sound and use loudspeaker etc., the interface of above-mentioned mobile device can be the whole mobile device interface such as mobile device screen and keyboard.
Step 23: send application code by described prototype testing server to described mobile device and dispose request, the code portions of application program adjustable to be tested is deployed on described mobile device, and starts the application code of this deployment.
In this step, application code can be sent by developing engine to prototype testing server and dispose request, forward this application code by described prototype testing server and dispose request to described mobile device, the code portions of application program adjustable to be tested is deployed on described mobile device, and starts the application code of this deployment.
Step 24: the debug command sent by the debugger in Integrated Development Environment IDE is transmitted to described mobile device by described prototype testing server.
In this step, the debugger in Integrated Development Environment IDE sends debug command, and this debug command is transmitted to described mobile device by described prototype testing server.
In specific implementation process, Integrated Development Environment IDE can be arranged in developing engine, as a functional module of developing engine.
Step 25: receive the debug command feedback information that described prototype testing server is forwarded back to, and resolve by the debugger in described IDE, show this debug command feedback information.
In this step, after debug command is transmitted to described mobile device by prototype testing server, described mobile device can carry out corresponding debugging operations according to debug command, and debug command feedback information is sent to prototype testing server; Then developing engine side just can receive the debug command feedback information that prototype testing server is forwarded back to, and is resolved by the debugger in described IDE, shown this debug command feedback information, completes whole debug process.
For example, if the debug command that the debugger in IDE sends is for arranging breakpoint, then developing engine is after receiving the debug command feedback information that prototype testing server is forwarded back to, just can be associated with the breakpoint place in application source code according to the debug command feedback information received by the debugger in IDE, and to be shown this debug command feedback information.So just achieve trace debug mobile device application program being carried out to source code level, improve the efficiency of application development commissioning.
By said method embodiment, just can carry out the trace debug of source code level to mobile device application program, improve the efficiency of application development commissioning.
The embodiment of the present invention additionally provides the prototype testing server of a kind of mobile device application development debugging, and be illustrated in figure 3 the structural representation of provided prototype testing server, described prototype testing server comprises:
Access scheduling unit 31, for the commissioning device attribute configured according to developing engine, provides the mobile device list meeting this commissioning device attribute specification to described developing engine; Specific implementation is as described in above method step 11.
Connection management unit 32, for the equipment connection request initiated according to developing engine, sets up the connection between described developing engine and the mobile device selected by this developing engine; Specific implementation is as described in above method step 12.
Application deployment unit 33, the application code of initiating for forwarding described developing engine disposes request to described mobile device, the code portions of application program adjustable to be tested is deployed on described mobile device, and starts the application code of this deployment; Specific implementation is as described in above method step 13.
Debugging message agent unit 34, for forwarding debug command that described developing engine sends in application development debug process to described mobile device, and forwards the debug command that described mobile device returns and feeds back to described developing engine.Specific implementation is as described in above method step 14.
In addition, described prototype testing server can also comprise:
Debugging message setting unit 35, adds forwarding routing iinformation, set up the corresponding relation of described developing engine and the mobile device selected by this developing engine, and the resource status arranging described mobile device is debugging mode in transmitting at Debugging message.In specific implementation, the information such as the connectivity port of mobile device, mark ID in the forwarding routing iinformation added, can be comprised.
The embodiment of the present invention additionally provides the developing engine of a kind of mobile device application development debugging, the structural representation of provided developing engine as shown in Figure 4, and described developing engine comprises:
Commissioning device acquiring unit 41, list of devices request is obtained for sending to prototype testing server, carry commissioning device attribute in the request of described acquisition list of devices, and select mobile device to be debugged in meeting in the mobile device list of this commissioning device attribute specification of returning; Specific implementation is as described in above method step 21.
Connection management unit 42, for giving selected mobile device by described prototype testing server transmitting apparatus connection request, sets up the connection between described mobile device; Specific implementation is as described in above method step 22.
Disposing application program unit 43, request is disposed to described mobile device for being sent application code by described prototype testing server, the code portions of application program adjustable to be tested is deployed on described mobile device, and starts the application code of this deployment; Specific implementation is as described in above method step 23.
Debugging message administrative unit 44, is transmitted to described mobile device for the debug command sent by the debugger in Integrated Development Environment IDE by described prototype testing server, and receives the debug command feedback information that described prototype testing server is forwarded back to; Specific implementation is as described in above method step 24.
Feedback information processing unit 45, for resolving, showing the debug command feedback information received by described Debugging message administrative unit by the debugger in described IDE.Specific implementation is as described in above method step 25.
In addition, described developing engine can also comprise:
Interface operation administrative unit 46, for being shown the interface of described mobile device by display window, is operated the mobile device interface on this display window, and sends operational order to described mobile device, and the described mobile device of reception display performs the interface after this operational order.Specific implementation is as described in above method step 22.
Be described in detail with the implementation procedure of concrete example to developing engine below, be illustrated in figure 5 the structural representation of developing engine specific implementation, in this Fig. 5, developing engine comprises two parts: Integrated Development Environment IDE and prototype test client, start module by the prototype test client in IDE and start prototype test client, thus set up the connection between IDE and prototype test client.Wherein, Integrated Development Environment IDE comprises prototype test client and starts module, commissioning device and arrange module and debugger; Prototype test client comprises list of devices, equipment display/input control module and debugging management module.
The function that prototype test client in this example completes can comprise above-mentioned commissioning device acquiring unit 41, connection management unit 42, the function of Debugging message administrative unit 44 and interface operation administrative unit 46; And the function that IDE completes can comprise above-mentioned disposing application program unit 43, the function of feedback information processing unit 45.Certainly, in specific implementation process, the division of each functional module of developing engine is not limited to the example that this example is enumerated, and this area other dividing mode thinkable are also feasible.
The implementation procedure of above-mentioned developing engine is: first start module to start prototype test client by the prototype test client in IDE, such as can call increase process addProcess interface when IDE starts, this interface input parameter is prototype test client process, then prototype test client will be activated, prototype test client reads configuration file when starting simultaneously, obtain the address of prototype testing server, and connect with it.
Prototype test client and prototype testing server alternately, obtain list of devices, and select mobile device to be debugged; Such as, when can configure the attribute of mobile device to be debugged in IDE, call the setAttribute interface that sets a property, the information such as operating system version information, model of mobile device can be set by this interface, and the mobile device attribute information of setting be sent to prototype test client; After prototype test client receives mobile device attribute information, to prototype testing server transmitting apparatus list request message, obtain the list of devices meeting and set a property.
Prototype test client, according to selected mobile device, is set up and the connection of described mobile device by prototype testing server; Such as when have selected one of them mobile device in list of devices, the ID of this mobile device and connectivity port information are sent to IDE by prototype test client, commissioning device addDebugTarget interface is added by calling after IDE receives, by this interface, the ID of this mobile device is registered in IDE, completes the configuration before debugging; Prototype test client is to prototype testing server transmitting apparatus connection request simultaneously, connects, and can obtain the screen interface of this mobile device further with the mobile device to be debugged selected.
In debug process, the code of application program adjustable to be debugged is passed to prototype test client by the debugger in IDE, the code portions of this application program adjustable is deployed on described mobile device by prototype testing server by prototype test client, and starts this application program; Then debug command is passed to prototype test client by debugger, and debug command is transmitted to described mobile device by prototype testing server by prototype test client; Then prototype test client receives the debug command feedback information that returned by prototype testing server of mobile device, and returns to debugger, is resolved, shows debug command feedback information received by described Debugging message administrative unit by debugger.
It should be noted that in the embodiment of above-mentioned prototype testing server and developing engine, included unit is carry out dividing according to function logic, but is not limited to above-mentioned division, as long as can realize corresponding function; In addition, the concrete title of each functional unit, also just for the ease of mutual differentiation, is not limited to protection scope of the present invention.
In addition, the prototype testing server in above-described embodiment and developing engine can be all specifically computing machine (comprising mobile computer and PC etc.).And perform said method can for the processor in computing machine.Each functional module of above-mentioned prototype testing server and developing engine can for running on the functional module in processor.
In addition, one of ordinary skill in the art will appreciate that all or part of step realized in above-described embodiment method is that the hardware that can carry out instruction relevant by program completes, corresponding program can be stored in a kind of computer-readable recording medium, the above-mentioned storage medium mentioned can be ROM (read-only memory), disk or CD etc.
In sum, the embodiment of the present invention can carry out the trace debug of source code level to mobile device application program, improve the efficiency of application development commissioning.
The above; be only the present invention's preferably embodiment; but protection scope of the present invention is not limited thereto; anyly be familiar with those skilled in the art in the technical scope that the embodiment of the present invention discloses; the change that can expect easily or replacement, all should be encompassed within protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection domain of claim.