CN106201745A - The remote debugging method of application program, remote debugging system and terminal - Google Patents

The remote debugging method of application program, remote debugging system and terminal Download PDF

Info

Publication number
CN106201745A
CN106201745A CN201610536721.3A CN201610536721A CN106201745A CN 106201745 A CN106201745 A CN 106201745A CN 201610536721 A CN201610536721 A CN 201610536721A CN 106201745 A CN106201745 A CN 106201745A
Authority
CN
China
Prior art keywords
debugging
application program
socket
client computer
remote
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201610536721.3A
Other languages
Chinese (zh)
Inventor
庄少炖
江青华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZTE ICT Technologies Co Ltd
Original Assignee
ZTE ICT Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by ZTE ICT Technologies Co Ltd filed Critical ZTE ICT Technologies Co Ltd
Priority to CN201610536721.3A priority Critical patent/CN106201745A/en
Publication of CN106201745A publication Critical patent/CN106201745A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services
    • G06F9/548Object oriented; Remote method invocation [RMI]

Landscapes

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

Abstract

The present invention proposes the remote debugging method of a kind of application program, remote debugging system and terminal, wherein, the remote debugging method of application program includes: the debugging instruction sent in user interface according to user, determines application program corresponding with described debugging instruction in remote terminal;Generate the Java archive file that described application program is corresponding, and described Java archive file is loaded onto in a client computer of debugging server, described client computer is provided with debugging and monitors interface;Create and the communication connection of described debugging monitoring interface;By described communication connection, the application program being loaded onto in described client computer is debugged.Pass through technical scheme, it is achieved that the application program in remote terminal monitored debugging in real time, improve the remote debugging efficiency of application program.

Description

The remote debugging method of application program, remote debugging system and terminal
Technical field
The present invention relates to application program debugging technique field, in particular to the remote debugging side of a kind of application program Method, the remote debugging system of a kind of application program and a kind of terminal.
Background technology
There is many difference with exploitation scene in the actual application scenarios running on the application program in remote terminal, thus produces Raw bug is likely to result in the application program interruption of service, or causes the security breaches of remote terminal, and therefore cause should By economic loss and the property loss of the user of program.
In correlation technique, during remote debugging application program, after application program can only be stopped operation, to debugging Machine sends the journal file of application program, debugs for debugging machine.But, application program stops fortune in remote environment OK, it is likely to result in user job efficiency and reduces or economic interests loss, it addition, in the case of journal file is invalid, debug machine The instant journal file that obtains can not accurately be debugged.
Therefore, how to provide the technical scheme of a kind of new remote debugging application program, to realize transporting in remote terminal The debugging in real time of the application program of row becomes technical problem urgently to be resolved hurrily.
Summary of the invention
The present invention is based on the problems referred to above, it is proposed that the technical scheme of a kind of new remote debugging application program, passes through Technical solution of the present invention, it is achieved that the real-time debugging to the application program run in remote terminal, on the one hand, by socket side Formula monitoring debugging interface, it is not necessary to stop the operation of application program, on the other hand, solve asking of daily record invalid reduction debugging efficiency Topic.
In view of this, embodiment according to the first aspect of the invention, it is proposed that the remote debugging side of a kind of application program Method, including: the debugging instruction sent in user interface according to user, determine in remote terminal and instruct corresponding answering with described debugging Use program;Generate the Java archive file that described application program is corresponding, and described Java archive file is loaded onto debugging services In one client computer of device, described client computer is provided with debugging and monitors interface;Create and the communication of described debugging monitoring interface Connect;By described communication connection, the application program being loaded onto in described client computer is debugged.
In this technical scheme, treated the Java archive file of the application program of remote debugging by generation, and be loaded onto tune In the client computer of examination server, monitor interface by debugging and achieve the remote debugging to application program, on the one hand, by socket Word mode monitors debugging interface, it is not necessary to stops the operation of application program, on the other hand, solves daily record invalid reduction debugging efficiency Problem.
Wherein, Java archive file (Java Archive) is called for short jar file, including Java source code etc., with ZIP file Based on form, be applied not only to compression and issue, being additionally operable to dispose and encapsulation storehouse, assembly and plug-in card program, can be compiled device and The tool time such as Java Virtual Machine uses, in an executable jar file, and can be by supporting Java Virtual Machine directly perform Without extraction document in advance or arrange extraction path.Java archive file is loaded onto client computer, jar file will be performed and add Enter in the class.path of client computer, Java source code can be run, and then realize the client computer debugging to java applet.
In technique scheme, it is preferable that create and the communication connection of described debugging monitoring interface, with by described logical Letter connects to be debugged the application program being loaded onto in described client computer, specifically includes following steps: starting described client Before application program in machine is debugged, obtain the tuning parameter that user is arranged, described tuning parameter for described application program Including socket and the sub-option of debugging;Create and the communication connection of described debugging monitoring interface according to described socket;Judge institute State socket for monitoring socket or connecting socket;When judging described socket as described monitoring socket, determine with institute State client computer to carry out monitoring debugging as virtual machine;When judging described socket as described connection socket, determine described visitor Family machine is debugger object.
In this technical scheme, application program is debugged by the tuning parameter set by user, enriches remotely tune Examination mode, meanwhile, improves debugging efficiency, and wherein, socket includes monitoring socket (i.e. Listen Socket) and adapter sleeve Connecing word (i.e. Attach Socket), the embodiment debugging sub-option is as shown in table 1 below:
Table 1
In above-mentioned table 1, VM is virtual machine, such as, when determining that socket is to monitor socket, using client computer as tune Examination target machine, when determining that socket is to connect socket, using the virtual machine of application program as debugging target machine.
In technique scheme, it is preferable that before the debugging instruction sent in user interface according to user, also include: During the application program that local runtime is to be debugged, detect whether described application program to be debugged stops at debugging breakpoints Only run;Detect described application program to be debugged at described debugging breakpoints out of service time, determine described debugging ginseng Number can be shown in described user interface, and wherein, described tuning parameter also includes debugging in storehouse, debugging breakpoints and debugging variable At least one.
In this technical scheme, by going out to test whether application program runs at debugging breakpoints, remote debugging can be promoted Reliability and accuracy rate, wherein, described tuning parameter also includes debugging at least in storehouse, debugging breakpoints and debugging variable Kind.
In technique scheme, it is preferable that before the debugging instruction sent in user interface according to user, also include: The operational factor of described debugging server is configured;After completing the configuration of described operational factor, create and described debugging clothes The data communication of business device connects.
In this technical scheme, after the operational factor of debugging server is configured, create data communication and connect, Improve reliability and the accuracy rate of remote debugging further.
In technique scheme, it is preferable that also include: the application program being loaded onto in described client computer is being adjusted During examination, during by described communication connection by debugging fructufy, feed back to described user interface.
In this technical scheme, by feeding back to user interface during by debugging fructufy, improve the directly perceived of debugging process Property and promptness.
Embodiment according to the second aspect of the invention, it is proposed that the remote debugging system of a kind of application program, including: really Cell, for the debugging instruction sent in user interface according to user, determines in remote terminal corresponding with described debugging instruction Application program;Loading unit, for generating the Java archive file that described application program is corresponding, and by described Java archive literary composition Part is loaded onto in a client computer of debugging server, is provided with debugging and monitors interface in described client computer;Communication unit, is used for Create and the communication connection of described debugging monitoring interface;Debugging unit, is used for by described communication connection being loaded onto described visitor Application program in the machine of family is debugged.
In this technical scheme, treated the Java archive file of the application program of remote debugging by generation, and be loaded onto tune In the client computer of examination server, monitor interface by debugging and achieve the remote debugging to application program, on the one hand, by socket Word mode monitors debugging interface, it is not necessary to stops the operation of application program, on the other hand, solves daily record invalid reduction debugging efficiency Problem.
Wherein, Java archive file (Java Archive) is called for short jar file, including Java source code etc., with ZIP file Based on form, be applied not only to compression and issue, being additionally operable to dispose and encapsulation storehouse, assembly and plug-in card program, can be compiled device and The tool time such as Java Virtual Machine uses, in an executable jar file, and can be by supporting Java Virtual Machine directly perform Without extraction document in advance or arrange extraction path.Java archive file is loaded onto client computer, jar file will be performed and add Enter in the class.path of client computer, Java source code can be run, and then realize the client computer debugging to java applet.
In technique scheme, it is preferable that also include: acquiring unit, for the application in starting described client computer Before program is debugged, obtaining the tuning parameter that user is arranged for described application program, described tuning parameter includes socket With the sub-option of debugging;Described communication unit is additionally operable to: create and the communication link of described debugging monitoring interface according to described socket Connect;The remote debugging system of described application program also includes: judging unit, be used for judging described socket as monitor socket or Connect socket;Described determine that unit is additionally operable to: when judging described socket as described monitoring socket, determine with described visitor Family machine carries out monitoring debugging as virtual machine;Described determine that unit is additionally operable to: judging that described socket connects socket as described During word, determine that described client computer is debugger object.
In this technical scheme, application program is debugged by the tuning parameter set by user, enriches remotely tune Examination mode, meanwhile, improves debugging efficiency, and wherein, socket includes monitoring socket (i.e. Listen Socket) and adapter sleeve Connecing word (i.e. Attach Socket), the embodiment of the embodiment option of debugging debugging sub-option is as shown in table 1.
In technique scheme, it is preferable that also include: detector unit, for the application journey to be debugged at local runtime During sequence, detect described application program to be debugged the most out of service at debugging breakpoints;Described determine that unit is also used In: detect described application program to be debugged at described debugging breakpoints out of service time, determine that described tuning parameter can Being shown in described user interface, wherein, described tuning parameter also includes debugging in storehouse, debugging breakpoints and debugging variable at least A kind of.
In this technical scheme, by going out to test whether application program runs at debugging breakpoints, remote debugging can be promoted Reliability and accuracy rate, wherein, described tuning parameter also includes debugging at least in storehouse, debugging breakpoints and debugging variable Kind.
In technique scheme, it is preferable that also include: dispensing unit, for the operation of described debugging server is joined Number configures;Described communication unit is additionally operable to: after completing the configuration of described operational factor, creates and described debugging server Data communication connects.
In this technical scheme, after the operational factor of debugging server is configured, create data communication and connect, Improve reliability and the accuracy rate of remote debugging further.
In technique scheme, it is preferable that also include: feedback unit, for being loaded onto in described client computer When application program is debugged, during by described communication connection by debugging fructufy, feed back to described user interface.
In this technical scheme, by feeding back to user interface during by debugging fructufy, improve the directly perceived of debugging process Property and promptness.
Propose a kind of terminal according to the third aspect of the invention we, long-range including the application program described in any of the above-described item Debugging system, therefore, this terminal has the technology effect identical with the remote debugging system of the application program described in any of the above-described item Really, do not repeat them here.
By above technical scheme, treated the Java archive file of the application program of remote debugging by generation, and be loaded onto In the client computer of debugging server, monitor interface by debugging and achieve the remote debugging to application program, on the one hand, by set Connect word mode and monitor debugging interface, it is not necessary to stop the operation of application program, on the other hand, solve invalid reduction of daily record and debug effect The problem of rate.
Accompanying drawing explanation
Fig. 1 shows the schematic flow diagram of the remote debugging method of application program according to an embodiment of the invention;
Fig. 2 shows the schematic block diagram of the remote debugging system of application program according to an embodiment of the invention;
Fig. 3 shows the schematic block diagram of terminal according to an embodiment of the invention;
Fig. 4 shows the schematic diagram of the remote debugging framework of application program according to an embodiment of the invention;
Fig. 5 shows the data interaction signal of the remote debugging scheme of application program according to an embodiment of the invention Figure;
Fig. 6 shows that the data interaction of the remote debugging scheme of application program according to another embodiment of the invention is shown It is intended to.
Detailed description of the invention
In order to be more clearly understood that the above-mentioned purpose of the present invention, feature and advantage, real with concrete below in conjunction with the accompanying drawings The present invention is further described in detail by mode of executing.It should be noted that in the case of not conflicting, the enforcement of the application Feature in example and embodiment can be mutually combined.
Elaborate a lot of detail in the following description so that fully understanding the present invention, but, the present invention also may be used Implementing to use other to be different from other modes described here, therefore, protection scope of the present invention is not by described below The restriction of specific embodiment.
Fig. 1 shows the schematic flow diagram of the remote debugging method of application program according to an embodiment of the invention.
As it is shown in figure 1, the remote debugging method of application program according to an embodiment of the invention, including: step 102, root The debugging instruction sent in user interface according to user, determines application program corresponding with described debugging instruction in remote terminal;Step Rapid 104, generate the Java archive file that described application program is corresponding, and described Java archive file is loaded onto debugging server A client computer in, described client computer is provided with debugging monitor interface;Step 106, creates and monitors interface with described debugging Communication connection;Step 108, is debugged the application program being loaded onto in described client computer by described communication connection.
In this technical scheme, treated the Java archive file of the application program of remote debugging by generation, and be loaded onto tune In the client computer of examination server, monitor interface by debugging and achieve the remote debugging to application program, on the one hand, by socket Word mode monitors debugging interface, it is not necessary to stops the operation of application program, on the other hand, solves daily record invalid reduction debugging efficiency Problem.
Wherein, Java archive file (Java Archive) is called for short jar file, including Java source code etc., with ZIP file Based on form, be applied not only to compression and issue, being additionally operable to dispose and encapsulation storehouse, assembly and plug-in card program, can be compiled device and The tool time such as Java Virtual Machine uses, in an executable jar file, and can be by supporting Java Virtual Machine directly perform Without extraction document in advance or arrange extraction path.Java archive file is loaded onto client computer, jar file will be performed and add Enter in the class.path of client computer, Java source code can be run, and then realize the client computer debugging to java applet.
In technique scheme, it is preferable that create and the communication connection of described debugging monitoring interface, with by described logical Letter connects to be debugged the application program being loaded onto in described client computer, specifically includes following steps: starting described client Before application program in machine is debugged, obtain the tuning parameter that user is arranged, described tuning parameter for described application program Including socket and the sub-option of debugging;Create and the communication connection of described debugging monitoring interface according to described socket;Judge institute State socket for monitoring socket or connecting socket;When judging described socket as described monitoring socket, determine with institute State client computer to carry out monitoring debugging as virtual machine;When judging described socket as described connection socket, determine described visitor Family machine is debugger object.
In this technical scheme, application program is debugged by the tuning parameter set by user, enriches remotely tune Examination mode, meanwhile, improves debugging efficiency, and wherein, socket includes monitoring socket (i.e. Listen Socket) and adapter sleeve Connecing word (i.e. Attach Socket), the embodiment debugging sub-option is as shown in table 1.
In technique scheme, it is preferable that before the debugging instruction sent in user interface according to user, also include: During the application program that local runtime is to be debugged, detect whether described application program to be debugged stops at debugging breakpoints Only run;Detect described application program to be debugged at described debugging breakpoints out of service time, determine described debugging ginseng Number can be shown in described user interface, and wherein, described tuning parameter also includes debugging in storehouse, debugging breakpoints and debugging variable At least one.
In this technical scheme, by going out to test whether application program runs at debugging breakpoints, remote debugging can be promoted Reliability and accuracy rate, wherein, described tuning parameter also includes debugging at least in storehouse, debugging breakpoints and debugging variable Kind.
In technique scheme, it is preferable that before the debugging instruction sent in user interface according to user, also include: The operational factor of described debugging server is configured;After completing the configuration of described operational factor, create and described debugging clothes The data communication of business device connects.
In this technical scheme, after the operational factor of debugging server is configured, create data communication and connect, Improve reliability and the accuracy rate of remote debugging further.
In technique scheme, it is preferable that also include: the application program being loaded onto in described client computer is being adjusted During examination, during by described communication connection by debugging fructufy, feed back to described user interface.
In this technical scheme, by feeding back to user interface during by debugging fructufy, improve the directly perceived of debugging process Property and promptness.
Fig. 2 shows the schematic block diagram of the remote debugging system of application program according to an embodiment of the invention.
As in figure 2 it is shown, the remote debugging system 200 of application program according to an embodiment of the invention, comprise determining that unit 202, for the debugging instruction sent in user interface according to user, determine in remote terminal and instruct corresponding answering with described debugging Use program;Loading unit 204, for generating the Java archive file that described application program is corresponding, and by described Java archive literary composition Part is loaded onto in a client computer of debugging server, is provided with debugging and monitors interface in described client computer;Communication unit 206, For creating and the communication connection of described debugging monitoring interface;Debugging unit 208, is used for by described communication connection being loaded onto Application program in described client computer is debugged.
In this technical scheme, treated the Java archive file of the application program of remote debugging by generation, and be loaded onto tune In the client computer of examination server, monitor interface by debugging and achieve the remote debugging to application program, on the one hand, by socket Word mode monitors debugging interface, it is not necessary to stops the operation of application program, on the other hand, solves daily record invalid reduction debugging efficiency Problem.
Wherein, Java archive file (Java Archive) is called for short jar file, including Java source code etc., with ZIP file Based on form, be applied not only to compression and issue, being additionally operable to dispose and encapsulation storehouse, assembly and plug-in card program, can be compiled device and The tool time such as Java Virtual Machine uses, in an executable jar file, and can be by supporting Java Virtual Machine directly perform Without extraction document in advance or arrange extraction path.Java archive file is loaded onto client computer, jar file will be performed and add Enter in the class.path of client computer, Java source code can be run, and then realize the client computer debugging to java applet.
In technique scheme, it is preferable that also include: acquiring unit 210, for answering in starting described client computer Before debugging by program, obtaining the tuning parameter that user is arranged for described application program, described tuning parameter includes socket Word and the sub-option of debugging;Described communication unit 206 is additionally operable to: creates according to described socket and monitors the logical of interface with described debugging Letter connects;The remote debugging system 200 of described application program also includes: judging unit 212, is used for judging that described socket is as prison Listen socket or connect socket;Described determine that unit 202 is additionally operable to: judging that described socket is as described monitoring socket Time, determine and carry out monitoring debugging as virtual machine using described client computer;Described determine that unit 202 is additionally operable to: judging described set Connect word when being described connection socket, determine that described client computer is debugger object.
In this technical scheme, application program is debugged by the tuning parameter set by user, enriches remotely tune Examination mode, meanwhile, improves debugging efficiency, and wherein, socket includes monitoring socket (i.e. Listen Socket) and adapter sleeve Connecing word (i.e. Attach Socket), the embodiment debugging sub-option is as shown in table 1.
In technique scheme, it is preferable that also include: detector unit 214, for the application to be debugged at local runtime During program, detect described application program to be debugged the most out of service at debugging breakpoints;Described determine unit 202 Be additionally operable to: detect described application program to be debugged at described debugging breakpoints out of service time, determine described debugging ginseng Number can be shown in described user interface, and wherein, described tuning parameter also includes debugging in storehouse, debugging breakpoints and debugging variable At least one.
In this technical scheme, by going out to test whether application program runs at debugging breakpoints, remote debugging can be promoted Reliability and accuracy rate, wherein, described tuning parameter also includes debugging at least in storehouse, debugging breakpoints and debugging variable Kind.
In technique scheme, it is preferable that also include: dispensing unit 216, for the operation to described debugging server Parameter configures;Described communication unit 206 is additionally operable to: after completing the configuration of described operational factor, creates and described debugging clothes The data communication of business device connects.
In this technical scheme, after the operational factor of debugging server is configured, create data communication and connect, Improve reliability and the accuracy rate of remote debugging further.
In technique scheme, it is preferable that also include: feedback unit 218, for being loaded onto in described client computer Application program when debugging, feed back to described user interface during by described communication connection by debugging fructufy.
In this technical scheme, by feeding back to user interface during by debugging fructufy, improve the directly perceived of debugging process Property and promptness.
Fig. 3 shows the schematic block diagram of terminal according to an embodiment of the invention.
As it is shown on figure 3, terminal 300 according to an embodiment of the invention, including the application program described in any of the above-described item Remote debugging system 200, therefore, this terminal 300 has and the remote debugging system 200 of the application program described in any of the above-described item Identical technique effect, does not repeats them here.
Fig. 4 shows the schematic diagram of the remote debugging framework of application program according to an embodiment of the invention.
As shown in Figure 4, according to an embodiment of the invention in the remote debugging framework of application program, JPDA (Java Platform Debugger Architecture) assembly includes: virtual machine (Visual Machine), background debug module (Back-end), foreground debugging module (Front-end) and user interface (User Interface) etc., wherein, virtual machine and Background debug module belongs to purpose machine (Debug gee), and foreground debugging module and user interface belong to debugging machine (Debugger), And have communication channel to carry out data interaction in the middle of purpose machine and debugging machine.
It addition, include for the Debugging interface that said modules is corresponding: Java Virtual Machine tool interface (JVMIT, Java VM Tool Interface), Java debugging wire protocol (JDWP, Java Debug Wire Protocol) and Java debugging interface (JDI, Java Debug Interface), wherein, JVMIT definition virtual machine (VM, Visual Machine) must when debugging The service that must provide, JDI definition personal code work level information and request, during JDWP is defined on debugging, purpose machine and debugging machine Between transmission information and the form of request, wherein, purpose machine and debugging machine may be located in same system, it is also possible to be positioned at In different system, the tuning parameter (as shown in table 1) of JPDA must be submitted to as independent variable when starting application program.
Fig. 5 and Fig. 6 shows that the data interaction of the remote debugging scheme of application program according to an embodiment of the invention is shown It is intended to.
As shown in Figure 5 and Figure 6, the remote debugging scheme of application program, communication port one according to an embodiment of the invention As be made up of adapter and conveyer, wherein, adapter includes three types:
1) listening to type, a connection entered is listened in front end from rear end;
2) accole, front end attaches on a rear end run;
3) issue type, the Java code execution process running debugged person's code and rear end is issued in front end.
Conveyer includes socket, serial route and shared drive, and is determined the serialization position of communication port by JDWP The form of stream and semanteme.
The remote debugging scheme of application program specifically includes according to an embodiment of the invention:
1, configuration service device step includes:
1) operational factor of configuration web Logic:
Web Logic is the application server that Oracle company of the U.S. produces, and is specifically one Middleware based on JAVAEE framework, Web Logic be for developing, integrated, dispose and manage large-scale distributed Web application, The Java application server of network application and database application.
Web Logic Server has performance, extensibility and the Gao Ke processed needed for crucial Web application system problem The property used.
With BEA Web Logic Commerce Server TM with the use of, Web Logic Server can be dispose suitable Answering property individual electronic business application system provides perfect solution, including:
I) Web logic provides multiple startup scripts (* .sh and * .cmd), and script position is at BEA_HOME/ Under weblogic81/server/bin catalogue;
II) find startWSL.cmd and increase following variables: DEBUG_OPTS:set DEBUG_OPTS=- Xdebug-Xrunjdwp:transport=t_socket, address=1044, server=y, suspend=n;
III) insert new variables in We blogic starts order, after being placed on " %JAVA_HOME% bin java " and its Before his configuration parameter.
IV) java script is started.
2) configuration parameter of debugging IBM Web Sphere:
I) Web Sphere 5.X/6.X control station is opened;
II) | Application Servers | [SERVERNAME] | the Process Definition | that opens Servers Java Virtual Machine;
III) registration Debug Mode;
IV) editing parameter in Debug arguments territory.
3) configuration parameter of debugging JBoss:
In addition to needing to revise the run.bat/run.sh under JBOSS_HOME/bin, other are identical with Web Logic.
4) debugging Tomcat configuration parameter:
Debugging Tomcat is very similar to Web logic and JBoss, however, it is desirable under amendment TOMCAT_HOME/bin Catalina.bat/catalina.sh file.
For the operating system under non-windows platform, need %TOMCAT_HOME%/bin/ Start in last column exec " $ PRGDIR " in startup.sh/" $ EXECUTABLE " start " $@" makes jpda into start。
I) Tomcat of decompression version is installed, because not having under version catalogue as the Windows of Tomcat installs now Catalina.sh (.bat) file;
II) about the place of JPDA_ADDRESS port, such as default situations in amendment bin/catalina.sh (.bat) Under, this configuration is JPDA_ADDRESS=" 8000 ", is revised as now the port that we want to use, gives tacit consent to use here 8000 ports;
III) start Tomcat, under command mode, enter $ { CATALINA_HOME}/bin catalogue, input catalina.sh(bat)jpda start;
IV) JPDA_TRANSPORT of catalina.bat file default is dt_shmem, but Eclipse only supports Dt_socket, so needing to add a line set JPDA_TRANSPORT=in catalina.bat " dt_socket ";
VI) port of catalina.bat file default is jdbconn, if it is not known that this port is how many, adds One set JPDA_ADDRESS=" 8000 ".
If 8000 ports have other use, then also need to revise catalina.sh file, see theory therein Bright, add a line JPDA_ADDRESS=" 1044 " or port that you specify other.Thus can pass through startup.sh Or catalina.sh jpda start wherein supports the tomcat of remote debugging.
2, debugging machine verification step:
Your application program is started, it is only necessary to guaranteeing that server is monitoring 1044 ports, you are permissible under debugging mode Running netstat/a, you will see 1044 ports in the port list opened.
1) Eclipse remote debugging featured configuration:
Eclipse is a graphical Java debugger front end.JDI realizes in org.eclipse.jdt.debug bag;
2) first we will be appreciated that to use which Eclipse adapter, it will be appreciated that the long-range connection that Eclipse provides Type, you can forward Eclipse menu to and select Run > Debug Configurations, at Remote Java Application adds one and starts configuration, from drop-down list, then select adapter, Ganymede has two Adapter:
Ⅰ)Socket Attach;
Ⅱ)Socket Listen。
3, remote debugging application program:
1) simple class is used to create a Java project;
2) breakpoint is set;
3) before debugging utility, it is ensured that enable debugging option for project.From local debugging utility it is There is no need, but this may insure that the most all Debugging message all can be used.Right button clicks Java project, and selects Debug As, then selects Java Application.If application program stops performing at breakpoint, then show that Debugging message correctly shows Show.At this moment, these debugging characteristics can be continuing with, such as show debugging storehouse, variable or breakpoint management etc..
4, from local debugging utility.
5, Java project is derived:
We will use this application program as debugging target.Right button clicks Java project, selects Export, then selects Select Java, finally select JAR file or Runnable JAR file to derive project.Jar file will be generated in the position specified (i.e. archive file).Noting, if Java source code is not mated with destination application, debugging characteristic is by cisco unity malfunction.
6, java application is manually run:
1) open control station and manually boot application program, it is ensured that be correctly configured with java runtime environment;
2) for monitoring the adapter of socket, Eclipse VM will be the main frame being connected with long-range java application. For connecting the adapter of socket, target VM will be as main frame.Application program debugging is not affected by both adapters, uses Family can arbitrarily select.But rule of thumb, need operating speed faster, more powerful computer debug main frame as VM because Calculative resource is a lot.
7, remote debugging application program:
Jar file is copied to the appropriate location on remote computer or same computer, calls debugging server, so A client computer is added afterwards for it.Simple java application just can serve as debugging server or client computer.You can be Selecting Socket Attach or Socket Listen connection type in Eclipse, this depends on the configuration of user.
1) as target VM of debugging server:
As it is shown in figure 5, this example far call java application is as debugging server below, and at port 8000 Monitoring socket connects.Target VM will be suspended, until debugger connects.
Eclipse connects the VM under socket model and calls example:
Java-Xdebug-Xrunjdwp:transport=dt_socket, server=y, address=" 8000 "- jar test.jar。
Remote activation configuration is used to start Eclipse, and the target VM address of assigning remote application program.To this end, click Run > Debug Configurations, then double-clicks Remote Java Application in Eclipse menu.From Newly created startup configuration specifies IP and port for destination application.In order to run remote application journey on same machine Sequence, it is only necessary to host ip is appointed as localhost or 127.0.0.1, specifically includes following steps:
I) in Eclipse development environment, debugging machine is run;
II) socket listening mode Start-up and Adjustment in Eclipse, monitors interface 8000 port;
III) 8000 ports are monitored;
IV) configuration communication connection, and start application program and debug, so that the application program in client computer is adjusted Examination.
2) as target VM of debugging client computer:
As shown in Figure 6, second example one simple java application of use is as debugging client computer, and debugs Device front end is as debugging server.Eclipse uses socket connection type to monitor, it is necessary to first Start-up and Adjustment front end is supervised Listen specific port, specifically include following steps:
I) in Eclipse development environment, debugging machine is run;
II) socket connected mode Start-up and Adjustment in Eclipse, monitors interface 1044 port;
III) 1044 ports are monitored;
IV) configuration communication connection, and start application program and debug, so that the application program in client computer is adjusted Examination.
Be worth it is emphasized that debugging java application before, therefore, to assure that open for remote application Use all debugging options.If option information is unavailable, you will receive an error message, such as " Debug information Is not available " or " Unable to install breakpoint due to missing line number ". Setting can also be revised by the Window > references > Java > Compiler on change Eclipse menu.
In the description of this specification, the description of term " embodiment ", " another embodiment " etc. means to combine is somebody's turn to do Specific features, structure, material or the feature that embodiment or example describe is contained at least one embodiment or the example of the present invention In.In this manual, the schematic representation to above-mentioned term is not necessarily referring to identical embodiment or example.And, retouch Specific features, structure, material or the feature stated can in any one or more embodiments or example in an appropriate manner In conjunction with.
Technical scheme is described in detail above in association with accompanying drawing, by technical scheme, how to provide The technical scheme of a kind of new remote debugging application program, to realize the real-time debugging to the application program run in remote terminal Technical problem.Propose the technical scheme of a kind of new remote debugging application program, pass through technical solution of the present invention, it is achieved that Real-time debugging to the application program run in remote terminal, on the one hand, monitor debugging interface by socket mode, it is not necessary to stop The only operation of application program, on the other hand, the problem solving daily record invalid reduction debugging efficiency.
The foregoing is only the preferred embodiments of the present invention, be not limited to the present invention, for the skill of this area For art personnel, the present invention can have various modifications and variations.All within the spirit and principles in the present invention, that is made any repaiies Change, equivalent, improvement etc., should be included within the scope of the present invention.

Claims (11)

1. the remote debugging method of an application program, it is characterised in that including:
The debugging instruction sent in user interface according to user, determines application journey corresponding with described debugging instruction in remote terminal Sequence;
Generate the Java archive file that described application program is corresponding, and described Java archive file is loaded onto debugging server In one client computer, described client computer is provided with debugging and monitors interface;
Create and the communication connection of described debugging monitoring interface;
By described communication connection, the application program being loaded onto in described client computer is debugged.
The remote debugging method of application program the most according to claim 1, it is characterised in that create and monitor with described debugging The communication connection of interface, to debug the application program being loaded onto in described client computer by described communication connection, specifically Comprise the following steps:
Before application program in starting described client computer is debugged, obtain the debugging that user is arranged for described application program Parameter, described tuning parameter includes socket and debugs sub-option;
Create and the communication connection of described debugging monitoring interface according to described socket;
Judge that described socket is as monitoring socket or connecting socket;
When judging described socket as described monitoring socket, determine to carry out monitoring using described client computer as virtual machine and adjust Examination;
When judging described socket as described connection socket, determine that described client computer is debugger object.
The remote debugging method of application program the most according to claim 2, it is characterised in that according to user user circle Before the debugging instruction that face sends, also include:
During the application program that local runtime is to be debugged, whether detect described application program to be debugged at debugging breakpoints Locate out of service;
Detect described application program to be debugged at described debugging breakpoints out of service time, determine that described tuning parameter can It is shown in described user interface,
Wherein, described tuning parameter also includes debugging at least one in storehouse, debugging breakpoints and debugging variable.
The remote debugging method of application program the most according to claim 3, it is characterised in that according to user user circle Before the debugging instruction that face sends, also include:
The operational factor of described debugging server is configured;
After completing the configuration of described operational factor, create and be connected with the data communication of described debugging server.
The remote debugging method of application program the most according to any one of claim 1 to 4, it is characterised in that also include:
When the application program being loaded onto in described client computer is debugged, when will debug fructufy by described communication connection Feed back to described user interface.
6. the remote debugging system of an application program, it is characterised in that including:
Determine unit, for the debugging instruction sent in user interface according to user, determine in remote terminal and refer to described debugging The application program that order is corresponding;
Loading unit, for generating the Java archive file that described application program is corresponding, and loads described Java archive file To a client computer of debugging server, described client computer is provided with debugging and monitors interface;
Communication unit, for creating and the communication connection of described debugging monitoring interface;
Debugging unit, for debugging the application program being loaded onto in described client computer by described communication connection.
The remote debugging system of application program the most according to claim 6, it is characterised in that also include:
Acquiring unit, before the application program in starting described client computer is debugged, obtains user for described application The tuning parameter that program is arranged, described tuning parameter includes socket and debugs sub-option;
Described communication unit is additionally operable to: create and the communication connection of described debugging monitoring interface according to described socket;
The remote debugging system of described application program also includes:
Judging unit, is used for judging that described socket is as monitoring socket or connecting socket;
Described determine that unit is additionally operable to: when judging described socket as described monitoring socket, determine and make with described client computer Carry out monitoring debugging for virtual machine;
Described determine that unit is additionally operable to: when judging described socket as described connection socket, determine that described client computer is for adjusting Examination object.
The remote debugging system of application program the most according to claim 7, it is characterised in that also include:
Detector unit, for during the application program that local runtime is to be debugged, detects described application program to be debugged The most out of service at debugging breakpoints;
Described determine that unit is additionally operable to: detect described application program to be debugged at described debugging breakpoints out of service Time, determine that described tuning parameter can be shown in described user interface,
Wherein, described tuning parameter also includes debugging at least one in storehouse, debugging breakpoints and debugging variable.
The remote debugging system of application program the most according to claim 8, it is characterised in that also include:
Dispensing unit, for configuring the operational factor of described debugging server;
Described communication unit is additionally operable to: after completing the configuration of described operational factor, creates the data with described debugging server and leads to Letter connects.
10. according to the remote debugging system of the application program according to any one of claim 6 to 9, it is characterised in that also wrap Include:
Feedback unit, for when debugging the application program being loaded onto in described client computer, by described communication connection Described user interface is fed back to during by debugging fructufy.
11. 1 kinds of terminals, it is characterised in that including: the long-range tune of the application program as according to any one of claim 6 to 10 Test system.
CN201610536721.3A 2016-07-08 2016-07-08 The remote debugging method of application program, remote debugging system and terminal Pending CN106201745A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610536721.3A CN106201745A (en) 2016-07-08 2016-07-08 The remote debugging method of application program, remote debugging system and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610536721.3A CN106201745A (en) 2016-07-08 2016-07-08 The remote debugging method of application program, remote debugging system and terminal

Publications (1)

Publication Number Publication Date
CN106201745A true CN106201745A (en) 2016-12-07

Family

ID=57472829

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610536721.3A Pending CN106201745A (en) 2016-07-08 2016-07-08 The remote debugging method of application program, remote debugging system and terminal

Country Status (1)

Country Link
CN (1) CN106201745A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106815149A (en) * 2017-01-13 2017-06-09 上海市共进通信技术有限公司 The debugging system and method for software development are carried out based on intelligent gateway platform
CN107248922A (en) * 2016-12-21 2017-10-13 常熟市顺网网络技术服务有限公司 A kind of design method of remote desktop compression transmission
CN108628683A (en) * 2017-03-20 2018-10-09 腾讯科技(深圳)有限公司 Data transmission method and device
CN109344065A (en) * 2018-09-27 2019-02-15 迈普通信技术股份有限公司 Remote debugging method, debugging server and target machine
CN109885486A (en) * 2019-01-23 2019-06-14 鑫涌算力信息科技(上海)有限公司 System debug device and method
CN111209078A (en) * 2019-12-27 2020-05-29 广东睿江云计算股份有限公司 Method and system for automatically deploying and detecting Web application of virtual machine
CN111970364A (en) * 2020-08-17 2020-11-20 创新奇智(重庆)科技有限公司 Hardware debugging execution method and device, electronic equipment and storage medium
CN112363917A (en) * 2020-10-30 2021-02-12 北京五八信息技术有限公司 Application program debugging exception processing method and device, electronic equipment and medium
CN114860326A (en) * 2022-07-05 2022-08-05 麒麟软件有限公司 Operating system application service management system and application service management method thereof

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6282701B1 (en) * 1997-07-31 2001-08-28 Mutek Solutions, Ltd. System and method for monitoring and analyzing the execution of computer programs
CN1781077A (en) * 2003-04-29 2006-05-31 索尼爱立信移动通讯股份有限公司 Selective loading of remote classes or resources for debugging a Java application in a Java micro device
US20070143301A1 (en) * 2005-12-20 2007-06-21 Dung-Han Tran Remote user interface for external connections
CN103577209A (en) * 2012-08-06 2014-02-12 浙江大华技术股份有限公司 Embedded equipment-based application program remote on-line debugging method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6282701B1 (en) * 1997-07-31 2001-08-28 Mutek Solutions, Ltd. System and method for monitoring and analyzing the execution of computer programs
CN1781077A (en) * 2003-04-29 2006-05-31 索尼爱立信移动通讯股份有限公司 Selective loading of remote classes or resources for debugging a Java application in a Java micro device
US20070143301A1 (en) * 2005-12-20 2007-06-21 Dung-Han Tran Remote user interface for external connections
CN103577209A (en) * 2012-08-06 2014-02-12 浙江大华技术股份有限公司 Embedded equipment-based application program remote on-line debugging method and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
CHARLES LU: "使用 Eclipse 远程调试 Java 应用程序", 《HTTPS://WWW.IBM.COM/DEVELOPERWORKS/CN/OPENSOURCE/OS-ECLIPSE-JAVADEBUG/》 *
HEAVYBLOG: "WebLogic、WebSphere、JBOSS、Tomcat之间的区别", 《HTTP://WWW.CNBLOGS.COM/HEAVYHE/ARCHIVE/2011/09/05/4547355.HTML》 *

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107248922A (en) * 2016-12-21 2017-10-13 常熟市顺网网络技术服务有限公司 A kind of design method of remote desktop compression transmission
CN106815149A (en) * 2017-01-13 2017-06-09 上海市共进通信技术有限公司 The debugging system and method for software development are carried out based on intelligent gateway platform
CN106815149B (en) * 2017-01-13 2020-05-22 上海市共进通信技术有限公司 Debugging system and method for software development based on intelligent gateway platform
CN108628683A (en) * 2017-03-20 2018-10-09 腾讯科技(深圳)有限公司 Data transmission method and device
CN108628683B (en) * 2017-03-20 2021-04-09 腾讯科技(深圳)有限公司 Data transmission method and device
CN109344065A (en) * 2018-09-27 2019-02-15 迈普通信技术股份有限公司 Remote debugging method, debugging server and target machine
CN109885486A (en) * 2019-01-23 2019-06-14 鑫涌算力信息科技(上海)有限公司 System debug device and method
CN111209078A (en) * 2019-12-27 2020-05-29 广东睿江云计算股份有限公司 Method and system for automatically deploying and detecting Web application of virtual machine
CN111209078B (en) * 2019-12-27 2023-09-19 广东睿江云计算股份有限公司 Method and system for automatically deploying and detecting Web application of virtual machine
CN111970364A (en) * 2020-08-17 2020-11-20 创新奇智(重庆)科技有限公司 Hardware debugging execution method and device, electronic equipment and storage medium
CN112363917A (en) * 2020-10-30 2021-02-12 北京五八信息技术有限公司 Application program debugging exception processing method and device, electronic equipment and medium
CN114860326A (en) * 2022-07-05 2022-08-05 麒麟软件有限公司 Operating system application service management system and application service management method thereof

Similar Documents

Publication Publication Date Title
CN106201745A (en) The remote debugging method of application program, remote debugging system and terminal
US8990775B2 (en) Collaborative software debugging in a distributed system with dynamically displayed chat sessions
US8671393B2 (en) Collaborative software debugging in a distributed system with client-specific dynamic breakpoints
US8756577B2 (en) Collaborative software debugging in a distributed system with private debug sessions
US20060174225A1 (en) Debugging a High Level Language Program Operating Through a Runtime Engine
US6983400B2 (en) Distributed test harness model
US9201759B2 (en) Debugging applications in the cloud
US8972945B2 (en) Collaborative software debugging in a distributed system with client-specific access control
US7512934B2 (en) Parallel debugger
US8572568B2 (en) Test tool for concurrent web services and user interface testing
US9009673B2 (en) Collaborative software debugging in a distributed system with collaborative step over operation
US8904356B2 (en) Collaborative software debugging in a distributed system with multi-member variable expansion
CN102981957B (en) Virtual breakpoint script debugging method
US20080082967A1 (en) Method and system for parameter profile compiling
CN103019941B (en) program debugging method and device
CN104536890A (en) Testing system, method and device
US20120272216A1 (en) Collaborative Software Debugging In A Distributed System With Variable-Specific Messages
US8850397B2 (en) Collaborative software debugging in a distributed system with client-specific display of local variables
CN104375938A (en) Dynamic behavior monitoring method and system for Android application program
CN110012082A (en) Embedded device and its upgrade method, controlling terminal
US8739127B2 (en) Collaborative software debugging in a distributed system with symbol locking
WO2014138980A1 (en) Computer system using in-service software upgrade
CN105740139A (en) Virtual environment based embedded software debugging method
US8572156B2 (en) Enhanced connectivity in distributed computing systems
US20120102467A1 (en) Collaborative Software Debugging In A Distributed System With Client-Specific Display Location Upon Event Notification

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20161207

RJ01 Rejection of invention patent application after publication