CN110502418B - Method for realizing remote debugging - Google Patents

Method for realizing remote debugging Download PDF

Info

Publication number
CN110502418B
CN110502418B CN201810470483.XA CN201810470483A CN110502418B CN 110502418 B CN110502418 B CN 110502418B CN 201810470483 A CN201810470483 A CN 201810470483A CN 110502418 B CN110502418 B CN 110502418B
Authority
CN
China
Prior art keywords
interface
debugger
data
party
debuggee
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810470483.XA
Other languages
Chinese (zh)
Other versions
CN110502418A (en
Inventor
梁威
蒋文奇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Changsha Biovision Software Technology Co ltd
Original Assignee
Changsha Biovision Software Technology 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 Changsha Biovision Software Technology Co ltd filed Critical Changsha Biovision Software Technology Co ltd
Priority to CN201810470483.XA priority Critical patent/CN110502418B/en
Publication of CN110502418A publication Critical patent/CN110502418A/en
Application granted granted Critical
Publication of CN110502418B publication Critical patent/CN110502418B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3664Environments for testing or debugging software
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention relates to a method for realizing remote debugging, which relates to the technical field of Windows application development and a mirror image operation mode.

Description

Method for realizing remote debugging
Technical Field
The invention relates to the technical field of Windows application development, in particular to a method for realizing remote debugging.
Background
With the rapid development of computer network technology, the application of Remote Debugging (Remote Debugging) for facilitating the operation of Remote computers is becoming more and more popular, which refers to a Debugging strategy for Debugging a program (program) on one computer.
In the prior art, remote debugging is generally realized by adopting the following modes:
first, define the data protocol, send the data request at the customer end, the server end responds to the request and returns the data to the customer end, and then mirror the data to the interface of the customer end.
Secondly, the user operates the mirrored graphical interface at the client, and the operation request of the user is sent to the server again, and the server responds to the operation of the client.
In carrying out the present invention, the prior art has at least the following problems:
first, how to package and unpack the data of the service data protocol increases not only a lot of data protocols but also a lot of message branch processing along with the increase of services, so that both the client and the server need to maintain such codes, resulting in huge workload.
Secondly, the most popular cross-platform communication technology is TCP/IP communication technology, and TPC/IP protocol is flexible but is a transmission layer protocol after all, so that the remote debugging is complicated in operation and narrow in practicability.
The invention is used for solving the remote operation debugging process of mirror image data, in the remote debugging process, by utilizing a communication mode among processes based on windows, all data and functions needed to be debugged by a debugged equation are serialized into a binary data buffer stream, the binary data buffer stream is sent to a debugger program in the form of message sending among processes, the obtained data stream is deserialized into the data and function set, a corresponding graphical interface is mirrored, and an operator can debug the debugged program to a remote debugged program according to the debugger program.
Disclosure of Invention
The invention aims to overcome the defects of the prior art and provides a method for remote debugging by a cross-process communication technology and a mirror image operation mode.
In order to achieve the above purpose, the embodiment of the present invention adopts the following technical scheme:
a method for realizing remote debugging is applied to a remote debugging system, and the debugging system comprises a column set for acquiring process data and interfaces of a debugged party by adopting a Windows bottom layer cross-process communication technology; the process data and the interface of the debugged party are scattered by utilizing the data packet acquired by the Windows bottom layer cross-process communication technology; finally mirroring the data to a debugger according to the logic of the interface; and then remote debugging is carried out through an interface of a debugging party:
s1, a debuggee party provides functions and data to be debugged, packages the functions and the data in an object-oriented mode through an API (application program interface), and finally packages the functions and the data into a data stream to be sent to the debuggee party;
s2, the debugger adopts a Windows bottom layer cross-process communication technology to acquire data of the debugger and a column set of an interface;
s3, collecting data of the debugged party and a column current of the interface into corresponding interfaces and data based on a data packet acquired by a Windows bottom layer cross-process communication technology, and registering a callback interface to the debugged party;
s4, the debugger deserializes the acquired data stream into a set of data and functions, mirrors the data to the debugger according to the logic of the interface, and then remotely debugs the data through the interface of the debugger.
Compared with the prior art, the invention has the following main beneficial effects: the invention adopts the cross-process communication technology and the mirror image operation mode to carry out remote debugging, thereby being capable of conveniently and rapidly carrying out remote debugging operation.
Drawings
The accompanying drawings, which are included to provide a further understanding of the present invention, illustrate and explain the present invention and are not to be construed as limiting the invention.
Fig. 1 is a schematic flow chart of a method according to an embodiment of the invention.
Detailed Description
The following detailed description of the invention is merely exemplary and explanatory and should not be taken in any way as limiting the scope of the invention as claimed. Furthermore, the features of the embodiments and of the different embodiments of the present document can be combined accordingly by a person skilled in the art from the description of the present document.
The embodiment of the invention provides a method for realizing remote debugging, which comprises the steps of acquiring data and an interface: the debuggee packs the interface or function into the Dispatch interface, then the serial flow of the packed Dispatch interface, send the packed data stream to the debuggee through Windows bottom and cross the communication technology of the procedure, the debuggee is according to the interface or function that the debuggee provides, the data stream received through Windows bottom and cross the communication technology of the procedure is turned into the Dispatch interface, reflect the interface into the interface or function that the corresponding debuggee provides, based on the above-mentioned remote debugging mode, a method for realizing remote debugging that the embodiment of the invention provides, as shown in figure 1, the implementation procedure includes:
(1) The debugged party combines more sub-interfaces according to the defined root interfaces of the data and can also classify and pack related requirements through the sub-interfaces, so that related requirement logics are clearer and easier to expand. And the data needed by the debugged party is prepared by the way of cloning copy through the object-oriented mode encapsulation of the API application program interface.
(2) The debuggee party packages the packaged interface, sub-interface and data in the sub-interface into a data stream, and sends the data stream to the debuggee party through a Windows bottom layer cross-process communication technology, wherein the machines with the same model produced by the same manufacturer can be sent to another user in a COPY mode, and the machines with different models can be sent to one user in combination with network communication.
(3) The debugger deserializes the received data stream into the stub interface of the corresponding proxy in a corresponding mode, wherein the combination mode of the interfaces is consistent with the process of the debugger, the debugger obtains the deserialized interface, obtains Copy data according to the requirement of the debugger and displays the data through the same component or control, and simultaneously, in order to synchronously debug with the debugger, the debugger sets a callback interface corresponding to the debugger, registers the callback interface of the debugger to the debugger, and uses the callback interface of the debugger as the proxy stub interface of the debugger.
(4) The debugger obtains the control mode of the debugged party through fuzzy matching, so that a root interface of data of the debugged party, a packaged sub-interface and business logic of the data are obtained, and the data are displayed on the same interface of the mirror image of the debugger in a circulating traversing mode. The debugger can perform remote synchronous operation at any time according to the obtained proxy stub interface.
(5) When the interface of the debugger is operated, the displayed interface state is transmitted to the real business logic interface of the debugger by calling the proxy stub interface, and the same interface state is displayed on the debugger.
(6) When the interface of the debuggee is operated, the displayed interface state is transmitted to the real callback interface of the debugger by calling the proxy stub interface, and the same interface state is displayed on the debugger.

Claims (6)

1. The method for realizing remote debugging based on a cross-process communication technology and a mirror image operation mode is characterized in that the debugging direction sends debugging information to a debuggee party, and the method comprises the following steps:
s1, a debuggee party provides functions and data to be debugged, packages the functions and the data in an object-oriented mode through an API (application program interface), packages the functions and the data into a data stream, and sends the data stream to the debugger party;
s2, defining a callback interface by a debugger, and acquiring data of the debugger and a column set of a serialization interface by adopting a Windows bottom layer cross-process communication technology;
s3, collecting data of the debugged party and a column current of the interface into corresponding interfaces and data by a data packet acquired based on a Window bottom layer cross-process communication technology, and registering a callback interface to the debugged party;
s4, displaying the data on the same interface of the mirror image of the debugger in a cross-process cyclic traversal mode, so that a root interface, a packaged sub-interface and business logic of the data of the debugger are obtained, the debugger can perform remote synchronous operation at any time according to the obtained proxy stub interface, when the interface of the debugger is operated, the displayed interface state is transmitted to a real business logic interface of the debugger through calling the proxy stub interface, the same interface state is displayed on the interface of the debugger, when the interface of the debugger is operated, the displayed interface state is transmitted to a real callback interface of the debugger through calling the proxy stub interface, and the same interface state is displayed on the debugger.
2. The method according to claim 1, wherein in step S1, the debuggee provides the function and data to be debugged, and encapsulates the function and data in an object-oriented manner through an API application program interface, and prepares the data required by the debugger in a clone copy manner.
3. The method as set forth in claim 1, wherein in the step S2 and the step S3, the cross-process is based on a communication technology of a Windows bottom layer to exchange data.
4. The method of claim 1, wherein in step S2, the data stream received by the debugger is deserialized into the stub interface of the corresponding proxy in a corresponding manner, wherein the combination manner of the interfaces is consistent with the process of the debugger, the debugger obtains the deserialized interface, and the Windows bottom layer cross-process communication technology is adopted to obtain the data and the serialized interface stream of the debugger.
5. The method for implementing remote debugging according to claim 1, wherein in step S3, the data is displayed on the same interface of the mirror image of the debugger in a cyclic traversal manner, and the debugger can perform remote synchronization operation at any time according to the obtained proxy stub interface.
6. The method of claim 5, wherein the callback interface is registered to the debuggee after integrating the data of the debuggee and the column flow of the interface into the corresponding interface and data.
CN201810470483.XA 2018-05-17 2018-05-17 Method for realizing remote debugging Active CN110502418B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810470483.XA CN110502418B (en) 2018-05-17 2018-05-17 Method for realizing remote debugging

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810470483.XA CN110502418B (en) 2018-05-17 2018-05-17 Method for realizing remote debugging

Publications (2)

Publication Number Publication Date
CN110502418A CN110502418A (en) 2019-11-26
CN110502418B true CN110502418B (en) 2023-05-23

Family

ID=68585042

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810470483.XA Active CN110502418B (en) 2018-05-17 2018-05-17 Method for realizing remote debugging

Country Status (1)

Country Link
CN (1) CN110502418B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112882950B (en) * 2021-03-18 2023-07-25 抖音视界有限公司 Application debugging method and device, electronic equipment and computer readable storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101401333A (en) * 2006-04-24 2009-04-01 华为技术有限公司 A debugging method and apparatus for performing telecom class service development based on model driven
CN101630272A (en) * 2009-08-19 2010-01-20 用友软件股份有限公司 Process scheduling method and system
CN102289403A (en) * 2010-06-15 2011-12-21 微软公司 Script debugging

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100338628B1 (en) * 1999-09-01 2002-05-30 윤종용 Debuger for remote processor in exchanging system
CN100392599C (en) * 2006-01-10 2008-06-04 杭州东信灵通电子实业公司 Universal interprocess communication achieving method
CN1901569B (en) * 2006-07-05 2010-08-04 华为技术有限公司 Remote regulating method and system
CN102411535B (en) * 2011-08-02 2014-04-16 上海交通大学 Navigating-SoC (System On Chip) simulating, verifying and debugging platform
CN103856361B (en) * 2012-11-29 2017-10-10 腾讯科技(深圳)有限公司 Realize the method and system of remote debugging
JP5943861B2 (en) * 2013-02-28 2016-07-05 京セラドキュメントソリューションズ株式会社 Remote debugging system
CN103678135A (en) * 2013-12-25 2014-03-26 普元信息技术股份有限公司 System and method for achieving cross-process and cross-thread debugging in large-data environment
CN104750603B (en) * 2013-12-30 2018-12-11 辰芯科技有限公司 A kind of multi-core DSP software simulator and its physical layer software test method
CN104298602A (en) * 2014-10-27 2015-01-21 北京神州绿盟信息安全科技股份有限公司 Method and device for debugging application program
CN107040777A (en) * 2017-06-08 2017-08-11 深圳市创维软件有限公司 A kind of remote debugging method, set top box and server

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101401333A (en) * 2006-04-24 2009-04-01 华为技术有限公司 A debugging method and apparatus for performing telecom class service development based on model driven
CN101630272A (en) * 2009-08-19 2010-01-20 用友软件股份有限公司 Process scheduling method and system
CN102289403A (en) * 2010-06-15 2011-12-21 微软公司 Script debugging

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于网络的虚拟调试环境的研究;王位杰;王铮;;计算机技术与发展(第07期);第46-49页 *

Also Published As

Publication number Publication date
CN110502418A (en) 2019-11-26

Similar Documents

Publication Publication Date Title
WO2019085079A1 (en) Interface test method and apparatus, computer device and storage medium
US11340859B2 (en) Synchronous display method, storage medium and electronic device
US10635436B2 (en) Compatibility method based on hybrid, adapter, operation device, system and computer-readable storage medium
WO2019114185A1 (en) App remote control method and related devices
CN107092489B (en) Processing method and system based on application version release
CN104253842B (en) Method, apparatus, terminal and the server of synchronous terminal mirror image
CN109634751B (en) Method for realizing communication between application layer and bottom layer by utilizing electron framework
US11709722B2 (en) Extensible communication framework and communication method supporting multiple communication protocols
CN115794313B (en) Virtual machine debugging method, system, electronic device and storage medium
CN108038241A (en) Integrated WEB visual workflows method, apparatus, readable storage medium storing program for executing and system
CN113032080A (en) Page implementation method, application program, electronic device and storage medium
CN115170711A (en) High-simulation digital factory display method based on cloud rendering
CN110502418B (en) Method for realizing remote debugging
WO2022156316A1 (en) Configuration method and system supporting heterogeneous environment
CN111444095A (en) Test platform system and test method of mobile equipment
CN105141484A (en) Android equipment remote debugging method based on cloud server
CN109634856B (en) IOS intelligent terminal remote real machine debugging system and method based on cloud service
CN112671814B (en) Cross-platform equipment development method, device and system
CN113835816A (en) Virtual machine desktop display method, device, equipment and readable storage medium
CN107070872A (en) A kind of data processing method and device for client
Chouiten et al. Distributed Augmented Reality systems: how much performance is enough?
JP2002073585A (en) Debugging support device, debugging support method, and recording medium
CN111240773A (en) Method for connecting front end and back end of software
CN112214392B (en) JS code debugging method, device, terminal and storage medium
CN116954809B (en) Remote control method, device and system based on android device and electronic device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant