CN116107878A - Remote debugging method, device, equipment and storage medium - Google Patents

Remote debugging method, device, equipment and storage medium Download PDF

Info

Publication number
CN116107878A
CN116107878A CN202211672264.2A CN202211672264A CN116107878A CN 116107878 A CN116107878 A CN 116107878A CN 202211672264 A CN202211672264 A CN 202211672264A CN 116107878 A CN116107878 A CN 116107878A
Authority
CN
China
Prior art keywords
connection
request
debugging
server
target
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.)
Withdrawn
Application number
CN202211672264.2A
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.)
Apollo Intelligent Connectivity Beijing Technology Co Ltd
Apollo Zhixing Technology Guangzhou Co Ltd
Original Assignee
Apollo Intelligent Connectivity Beijing Technology Co Ltd
Apollo Zhixing Technology Guangzhou 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 Apollo Intelligent Connectivity Beijing Technology Co Ltd, Apollo Zhixing Technology Guangzhou Co Ltd filed Critical Apollo Intelligent Connectivity Beijing Technology Co Ltd
Priority to CN202211672264.2A priority Critical patent/CN116107878A/en
Publication of CN116107878A publication Critical patent/CN116107878A/en
Withdrawn legal-status Critical Current

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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/146Markers for unambiguous identification of a particular session, e.g. session cookie or URL-encoding

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The disclosure provides a remote debugging method, device, equipment and storage medium, relates to the technical field of computers, and particularly relates to the technical field of program testing. The specific implementation scheme is as follows: in response to receiving the test request, determining a request identifier in the test request according to identifier position information corresponding to a plurality of terminal devices; determining target connection corresponding to the request identifier from a plurality of connections of the established connection, wherein the plurality of connections are in one-to-one correspondence with a plurality of terminal devices, and the target connection corresponds to the target terminal device; debugging the target program corresponding to the test request to obtain debugging information; and transmitting the debugging information to the target terminal equipment through the target connection.

Description

Remote debugging method, device, equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technology, and in particular, to the field of program testing technology.
Background
In an application scenario of program development, a developer often needs to remotely debug a program running in a remote server. Remote debugging means that a program runs on a remote server, and the program running in the remote server can be tested locally, so that the internal state of the remote server can be known locally when a request to the remote server is made and processed by the program in the remote server. How to realize that multiple developers debug programs in a remote server at the same time is a problem to be solved.
Disclosure of Invention
The present disclosure provides a remote debugging method, apparatus, device, storage medium, and program product.
According to an aspect of the present disclosure, there is provided a remote debugging method applied to a server, the method including: in response to receiving a test request, determining a request identifier in the test request according to identifier position information corresponding to a plurality of terminal devices; determining target connection corresponding to the request identifier from a plurality of connections of the established connection, wherein the plurality of connections are in one-to-one correspondence with the plurality of terminal devices, and the target connection corresponds to target terminal devices; debugging the target program corresponding to the test request to obtain debugging information; and sending the debugging information to the target terminal equipment through the target connection.
According to another aspect of the present disclosure, there is provided a remote debugging method applied to a terminal device, the method including: sending a connection request to a server, wherein the connection request comprises a user identifier; establishing a connection with a predetermined port of the server; and receiving debug information from the server over the connection.
According to another aspect of the present disclosure, there is provided a remote debugging device applied to a server, the device comprising: the identification determining module is used for determining a request identification in the test request according to identification position information corresponding to a plurality of terminal devices in response to receiving the test request; a connection determining module, configured to determine a target connection corresponding to a request identifier from a plurality of connections that have been established, where the plurality of connections are in one-to-one correspondence with the plurality of terminal devices, and the target connection corresponds to a target terminal device; the debugging module is used for debugging the target program corresponding to the test request to obtain debugging information; and the first sending module is used for sending the debugging information to the target terminal equipment through the target connection.
According to another aspect of the present disclosure, there is provided a remote debugging apparatus applied to a terminal device, the apparatus including: the second sending module is used for sending a connection request to the server, wherein the connection request comprises a user identifier; the establishing module is used for establishing connection with a preset port of the server; and the receiving module is used for receiving the debugging information from the server through the connection.
Another aspect of the present disclosure provides an electronic device, comprising: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the methods shown in the embodiments of the present disclosure.
According to another aspect of the disclosed embodiments, there is provided a non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the methods shown in the disclosed embodiments.
According to another aspect of the disclosed embodiments, there is provided a computer program product comprising a computer program/instruction, characterized in that the computer program/instruction, when executed by a processor, implements the steps of the method shown in the disclosed embodiments.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the disclosure, nor is it intended to be used to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the following specification.
Drawings
The drawings are for a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
FIG. 1 schematically illustrates an exemplary system architecture that may be applied in accordance with an embodiment of the present disclosure;
FIG. 2 schematically illustrates a flow chart of a remote debugging method according to an embodiment of the present disclosure;
FIG. 3 schematically illustrates a flow chart of a remote debugging method according to another embodiment of the present disclosure;
FIG. 4 schematically illustrates a flow chart of a remote debugging method according to an embodiment of the present disclosure;
FIG. 5 schematically illustrates a schematic diagram of remote debugging in accordance with an embodiment of the present disclosure;
FIG. 6 schematically illustrates a block diagram of a remote debugging device in accordance with an embodiment of the present disclosure;
FIG. 7 schematically illustrates a block diagram of a remote debugging device according to another embodiment of the present disclosure;
FIG. 8 schematically illustrates a block diagram of an example electronic device that may be used to implement embodiments of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present disclosure to facilitate understanding, and should be considered as merely exemplary. Accordingly, one of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
An application scenario of the remote debugging method and apparatus provided in the present disclosure will be described below with reference to fig. 1.
Fig. 1 schematically illustrates an exemplary system architecture 100 that may be applied in accordance with an embodiment of the present disclosure. It should be noted that fig. 1 is only an example of a system architecture to which embodiments of the present disclosure may be applied to assist those skilled in the art in understanding the technical content of the present disclosure, but does not mean that embodiments of the present disclosure may not be used in other devices, systems, environments, or scenarios.
As shown in fig. 1, a system architecture 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used as a medium to provide communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
The user may interact with the server 105 via the network 104 using the terminal devices 101, 102, 103 to receive or send messages or the like. Various communication client applications, such as shopping class applications, web browser applications, search class applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only) may be installed on the terminal devices 101, 102, 103.
The terminal devices 101, 102, 103 may be a variety of electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablets, laptop and desktop computers, and the like.
The server 105 may be a server providing various services, such as a background management server (by way of example only) providing support for websites browsed by users using the terminal devices 101, 102, 103. The background management server may analyze and process the received data such as the user request, and feed back the processing result (e.g., the web page, information, or data obtained or generated according to the user request) to the terminal device.
The server 105 may be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so as to solve the defects of large management difficulty and weak service expansibility in the traditional physical hosts and VPS service ("Virtual Private Server" or simply "VPS"). The server 105 may also be a server of a distributed system or a server that incorporates a blockchain.
It should be understood that the number of terminal devices, networks and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
In the technical scheme of the disclosure, the related processes of collecting, storing, using, processing, transmitting, providing, disclosing, applying and the like of the personal information of the user all conform to the regulations of related laws and regulations, necessary security measures are adopted, and the public order harmony is not violated.
In the technical scheme of the disclosure, the authorization or consent of the user is obtained before the personal information of the user is obtained or acquired.
The remote debugging method provided by the present disclosure will be described below with reference to fig. 2.
Fig. 2 schematically illustrates a flow chart of a remote debugging method according to an embodiment of the present disclosure. The method may be performed, for example, by a server as shown above.
As shown in fig. 2, the method 200 includes determining a request identification in a test request according to identification location information corresponding to a plurality of terminal devices in response to receiving the test request in operation S210.
According to embodiments of the present disclosure, different identification location information may be preconfigured for different users, which may be used to indicate the location of the corresponding request identification in the request.
According to embodiments of the present disclosure, a test request may be used to test a target program in a server. The target program may be any type of program, and may include, for example, a PHP program.
According to embodiments of the present disclosure, the test request may be issued by any device.
Then, in operation S220, a target connection corresponding to the request identification is determined from among the plurality of connections of the established connection.
According to an embodiment of the present disclosure, a plurality of connections are in one-to-one correspondence with a plurality of terminal devices, and a target connection corresponds to a target terminal device.
According to the embodiment of the disclosure, the terminal device can be used as a debugging client, and the server can be used as a debugging server. The user can debug the program in the server through the terminal device.
According to embodiments of the present disclosure, a server may establish a connection with a terminal device. The server may be debugged by a plurality of terminal devices simultaneously, on the basis of which a connection may be established with each terminal device. When a test request is received, corresponding terminal equipment and corresponding target connection can be determined according to the request identification.
In operation S230, the target program corresponding to the test request is debugged to obtain debug information.
According to embodiments of the present disclosure, the debug information may include, for example, parameters, status information, alarm information, and the like when the target program is run.
In operation S240, the debug information is transmitted to the target terminal device through the target connection.
According to the embodiment of the disclosure, after the debugging information is sent to the terminal equipment through the target connection, a user can locally know the debugging information of the target program, so that remote debugging is realized.
According to the embodiment of the disclosure, the request identification is determined through the identification position information, which terminal device the test request corresponds to is determined according to the request identification, and then the debug information corresponding to the request is sent to the terminal device through the target connection with the terminal device. Thus, multi-person debugging can be achieved.
The remote debugging method provided by the present disclosure will be described below with reference to fig. 3.
Fig. 3 schematically illustrates a flow chart of a remote debugging method according to another embodiment of the present disclosure. The method may be performed, for example, by the terminal device shown above.
As shown in fig. 3, the method 300 includes transmitting a connection request to a server, wherein the connection request includes a user identification, in operation S310.
According to an embodiment of the present disclosure, the server may be a server where a program to be debugged is located. The connection request may be used to establish a connection with a predetermined port of the server. The connection may comprise, for example, a transmission control protocol (TCP, transmission Control Protocol) connection. The predetermined ports may be preset as needed.
According to embodiments of the present disclosure, user identification may be used to uniquely identify a user identity. Different users may have different user identities. Different users may use different user identities to debug programs in a server at the same time.
In operation S320, a connection with a predetermined port of the server is established.
According to the embodiment of the disclosure, in the case that the server receives the connection request, the target connection may be established with the terminal device.
In operation S330, debug information is received from the server through the connection.
According to the embodiment of the disclosure, in the process of debugging the program to be debugged, the server can send the debugging information to the terminal device through the target connection. The terminal device may present the debug information to the user.
According to another embodiment of the present disclosure, the terminal device may further generate a debug instruction, and send the debug instruction to the server through the target connection to control a debug process of the server. The debug instructions may comprise, for example, single step debug instructions. After receiving the single step debugging instruction, the server can execute the single step debugging operation on the target program according to the single step debugging instruction, for example, to obtain the current step debugging information, and feed the current step debugging information back to the terminal equipment.
The remote debugging method provided by the present disclosure will be described below with reference to fig. 4.
Fig. 4 schematically illustrates a flow chart of a remote debugging method according to an embodiment of the present disclosure. The method may be performed, for example, by a server as shown above.
As shown in fig. 4, the method 400 may include receiving a connection request from a terminal device in operation S410.
Wherein the connection request may comprise a user identification for uniquely identifying the user.
According to the embodiment of the disclosure, the terminal device may be one or a plurality of terminal devices.
In operation S420, a connection between the terminal device and a predetermined network port of the server is established.
In operation S430, a request identifier corresponding to the user identifier and identification location information of the request identifier are acquired.
According to embodiments of the present disclosure, each user identity may be configured with a corresponding request identity and identity location information of the request identity. The request identification may be used to identify a corresponding test request. The identification location information may be used to indicate the location of the request identification in the test request, where the location may include, for example, a request header (header), a request body, or url (uniform resource locator, uniform resource location system) of the test request, or a post parameter, etc.
In operation S440, a mapping relationship among the request identification, the user identification, and the connection is configured.
According to the embodiment of the disclosure, for example, a mapping relationship among a request identifier, a user identifier, and a connection corresponding to each user may be recorded.
In operation S450, a test request is received, and a field at a specified location in the test request is determined as a request identifier according to the identifier location information.
According to embodiments of the present disclosure, the specified location, i.e., the location in the test request is identified by a request identifying the location information rule.
In operation S460, a connection corresponding to the request identifier is determined as a target connection according to the mapping relationship.
According to the embodiment of the disclosure, the connection corresponding to the request identifier, namely the target connection, can be found according to the recorded mapping relation.
In operation S470, the target program corresponding to the test request is debugged, and debug information is obtained.
In operation S480, the debug information is sent to the terminal device through the target connection.
Operations S410 to S420 and S470 to S480 may refer to the methods shown above, and are not described herein.
For example, url of request 1, request 2, request 3, and request 4 are a/b/c, a/b/d, and a/c/d, and b/c/d, respectively. The identifying location information of request a may include a first bit of a. Thus, it can be determined that the first bits of a/b/c, a/b/d and a/c/d are all a, and then it can be determined that the request 1, the request 2 and the request 3 corresponding to a/b/c, a/b/d and a/c/d are all requestA. If the first bit of b/c/d is not a, it may be determined that the request 4 corresponding to b/c/d is not a request A.
For another example, url of request 1 is a/b/c, cookie field in header parameter is appid=a, url of request 1 is a/b/c, and Cookie field in header parameter is appid=b. The identification location information of the request a may include a Cookie field in the header parameter of appid=a. The identification location information of the request b may include a Cookie field in the header parameter of appid=b. Thus, request 1 may be determined to be request a and request 2 may be determined to be request b.
For another example, url of request 1 is a/b/c, and parameter in body is username: a, url of the request 2 is a/b/c, and parameters in the body are username: b. the identification location information of the request a may include a parameter in the body as username: a. the identification location information of the request b may include a parameter in the body as username: b. thus, request 1 may be determined to be request a and request 2 may be determined to be request b.
According to another embodiment of the present disclosure, a server is configured with a debug plug-in. The terminal device may be configured with an integrated development environment. Based on this, for example, the terminal device may generate a debug instruction using the integrated development environment, and send the debug instruction to the server through the target connection. The server may monitor a predetermined network port of the server through the debug plug-in to receive debug instructions. And then, executing debugging operation on the target program through the debugging plug-in according to the debugging instruction to obtain debugging information. Next, the debug information may be sent to the terminal device through the target connection by the debug plug-in. After receiving the debugging information, the terminal device can display the debugging information by using the integrated development environment. The user identification may include, for example, an identification of the integrated development environment.
According to the embodiment of the disclosure, by setting the debugging plug-in, normal running of the program in the server can not be affected, so that the program is debugged.
The remote debugging method shown above is further described with reference to fig. 5 in connection with an embodiment. Those skilled in the art will appreciate that the following example embodiments are merely for the understanding of the present disclosure, and the present disclosure is not limited thereto.
Fig. 5 schematically illustrates a schematic diagram of remote debugging according to an embodiment of the present disclosure.
In fig. 5, it is shown that for a server, a debug plug-in may be installed in a virtual machine executing a script program. The debug plug-in may be a plug-in that supports the general debug protocol. Such as debug plug-ins supported by script program php. The debug plug-in may be used as a tcp server to monitor ip addresses and ports in the remote server, for example, ip1: portA for receiving tcp connection requests from an ider (integrated development environment).
A side (or side editor) may be installed in the terminal device. Ip1 and port a of the remote server are pre-configured for the ide, and a unique user identifier, such as userA, is configured.
The user may click the test debug function button in the ide, which will point to ip1 of the remote server: the portA sends a connection request to apply for establishing a tcp link, wherein the connection request carries a userA parameter. After the connection is established successfully, the tcp connection which is established successfully is put into a connection list, and the tcp connection can be named as tcpA, for example, and a binding relation is established with userA through a mapping table. At this point the user may be reminded that debugging may begin. Under the scene that a plurality of users are debugged simultaneously, a plurality of user identifications and a plurality of tcp connections can be arranged for the plurality of users, and each user corresponds to one user identification and one tcp connection.
A browser running in any terminal device or an http request client may be used to initiate an http request to a remote server, where the request may carry a userA parameter. The HTTP request is sent to the debug plug-in via a server program, such as a nganx (an HTTP and reverse proxy web server). The request parameters are eventually obtained by the debug plug-in, which parses the userA parameters in the request. And obtaining the corresponding tcp connection tcpA through the userA parameter. The tcpA is then used to communicate with the ide. The ide can use the tcpA channel to send a single step debugging instruction to the debug and receive the contents such as global variables, local variables and the like returned by the debug plug-in, so as to debug the program.
In the case of debugging an online program, for example, an http request of an online user needs to be debugged, but the http request does not carry a userA parameter, but each http request may be differentiated by a specific parameter, for example, in the request a, although there is no userA parameter, there is a requestA parameter, which may be in a header, url, or post parameter, for example. Therefore, in the method, a mapping relationship between userA, requestA and tcpA can be established, and a mapping relationship between userA, tcpA and request StA and identification position information of the request StA in the request (e.g. request A is configured in a header) are additionally configured. Therefore, the request A parameter carried in the request can be searched according to the identification position information, the tcp A connection corresponding to the request A parameter is determined according to the mapping relation, and finally the debugging interaction is carried out between the tcpA and the ide.
The remote debugging device provided by the present disclosure will be described below with reference to fig. 6.
Fig. 6 schematically illustrates a block diagram of a remote debugging device according to an embodiment of the present disclosure. The apparatus may be applied, for example, to the server shown above.
As shown in fig. 6, the remote debugging device 600 includes an identification determination module 610, a connection determination module 620, a debugging module 630, and a first transmission module 640.
The identifier determining module 610 is configured to determine, in response to receiving the test request, a request identifier in the test request according to identifier location information corresponding to the plurality of terminal devices.
The connection determining module 620 is configured to determine a target connection corresponding to the request identifier from a plurality of connections of the established connection, where the plurality of connections are in one-to-one correspondence with a plurality of terminal devices, and the target connection corresponds to a target terminal device.
The debug module 630 is configured to debug the target program corresponding to the test request, so as to obtain debug information.
The first sending module 640 is configured to send the debug information to the target terminal device through the target connection.
According to an embodiment of the present disclosure, the apparatus 600 may further include: a connection request receiving module, configured to receive a connection request from a terminal device, where the connection request includes a user identifier; and a connection establishment module for establishing a connection between the terminal device and a predetermined network port of the server.
According to an embodiment of the present disclosure, the apparatus 600 may further include: the request identifier acquisition module is used for acquiring a request identifier corresponding to the user identifier and identifier position information of the request identifier; and the configuration module is used for configuring the mapping relation among the request identifier, the user identifier and the connection.
According to an embodiment of the present disclosure, the identification determination module may include: the identification determination submodule is used for determining a field of a designated position in a request according to the identification position information and taking the field as a request identification.
According to an embodiment of the present disclosure, the connection determination module may include: and the connection determination submodule is used for determining the connection corresponding to the request identifier according to the mapping relation and taking the connection as the target connection.
According to an embodiment of the present disclosure, a server is configured with a debug plug-in; the debugging module may include: the monitoring submodule is used for monitoring a preset network port of the server through the debugging plug-in to receive a debugging instruction; and the execution sub-module is used for executing debugging operation on the target program through the debugging plug-in according to the debugging instruction to obtain debugging information.
According to an embodiment of the present disclosure, the first transmitting module may include: and the information sending sub-module is used for sending the debugging information to the terminal equipment through the target connection through the debugging plug-in.
The remote debugging device provided by the present disclosure will be described below with reference to fig. 7.
Fig. 7 schematically illustrates a block diagram of a remote debugging device according to another embodiment of the present disclosure. The apparatus may be applied, for example, to the terminal devices shown above.
As shown in fig. 7, the remote debugging device 700 includes a second transmitting module 710, a establishing module 720, and a receiving module 730.
And a second sending module 710, configured to send a connection request to the server, where the connection request includes a user identifier.
And a setting module 720, configured to set up a connection with a predetermined port of the server.
And a receiving module 730, configured to receive debug information from the server through the connection.
According to an embodiment of the present disclosure, the terminal device is configured with an integrated development environment, and the apparatus 700 may further include: the generation module is used for generating a debugging instruction by utilizing the integrated development environment; the third sending module is used for sending a debugging instruction to the server through connection by utilizing the integrated development environment; and the display module is used for displaying the debugging information by utilizing the integrated development environment.
According to embodiments of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
Fig. 8 schematically illustrates a block diagram of an example electronic device 800 that may be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 8, the apparatus 800 includes a computing unit 801 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM) 802 or a computer program loaded from a storage unit 808 into a Random Access Memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the device 800 can also be stored. The computing unit 801, the ROM 802, and the RAM 803 are connected to each other by a bus 804. An input/output (I/O) interface 805 is also connected to the bus 804.
Various components in device 800 are connected to I/O interface 805, including: an input unit 806 such as a keyboard, mouse, etc.; an output unit 807 such as various types of displays, speakers, and the like; a storage unit 808, such as a magnetic disk, optical disk, etc.; and a communication unit 809, such as a network card, modem, wireless communication transceiver, or the like. The communication unit 809 allows the device 800 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
The computing unit 801 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 801 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 801 performs the various methods and processes described above, such as remote debugging methods. For example, in some embodiments, the remote debugging method may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as the storage unit 808. In some embodiments, part or all of the computer program may be loaded and/or installed onto device 800 via ROM 802 and/or communication unit 809. When a computer program is loaded into RAM 803 and executed by computing unit 801, one or more steps of the remote debugging method described above may be performed. Alternatively, in other embodiments, the computing unit 801 may be configured to perform the remote debugging method by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above can be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), complex Programmable Logic Devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out methods of the present disclosure may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the internet.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps recited in the present disclosure may be performed in parallel or sequentially or in a different order, provided that the desired results of the technical solutions of the present disclosure are achieved, and are not limited herein.
The above detailed description should not be taken as limiting the scope of the present disclosure. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present disclosure are intended to be included within the scope of the present disclosure.

Claims (21)

1. A remote debugging method applied to a server, the method comprising:
in response to receiving a test request, determining a request identifier in the test request according to identifier position information corresponding to a plurality of terminal devices;
determining target connection corresponding to the request identifier from a plurality of connections of the established connection, wherein the plurality of connections are in one-to-one correspondence with the plurality of terminal devices, and the target connection corresponds to target terminal devices;
debugging the target program corresponding to the test request to obtain debugging information; and
and sending the debugging information to the target terminal equipment through the target connection.
2. The method of claim 1, further comprising:
receiving a connection request from a terminal device, wherein the connection request comprises a user identification, and
and establishing a connection between the terminal equipment and a preset network port of the server.
3. The method of claim 2, further comprising:
acquiring a request identifier corresponding to the user identifier and identifier position information of the request identifier, and
and configuring a mapping relation among the request identifier, the user identifier and the connection.
4. A method according to claim 3, wherein said determining a request identity in the test request according to identity location information corresponding to a plurality of terminal devices comprises:
and determining a field at a designated position in the test request according to the identification position information as the request identification.
5. The method of claim 3, wherein the determining a target connection corresponding to the request identification from a plurality of connections of the established connection comprises
And determining the connection corresponding to the request identifier according to the mapping relation, and taking the connection as the target connection.
6. The method of claim 1, wherein the server is configured with a debug plug-in; the step of debugging the target program according to the test request to obtain debugging information comprises the following steps:
monitoring a preset network port of the server through the debugging plug-in to receive the debugging instruction; and
and executing debugging operation on the target program by the debugging plug-in according to the debugging instruction to obtain the debugging information.
7. The method of claim 6, wherein the sending the debug information to the terminal device via the target connection comprises:
and sending the debugging information to the terminal equipment through the target connection through the debugging plug-in.
8. A remote debugging method applied to a terminal device, the method comprising:
sending a connection request to a server, wherein the connection request comprises a user identifier;
establishing a connection with a predetermined port of the server; and
and receiving debugging information from the server through the connection.
9. The method of claim 1, the terminal device configured with an integrated development environment, the method further comprising:
the following operations are performed with the integrated development environment:
generating a debugging instruction;
sending the debugging instruction to the server through the connection; and
and displaying the debugging information.
10. A remote debugging device for use with a server, the device comprising:
the identification determining module is used for determining a request identification in the test request according to identification position information corresponding to a plurality of terminal devices in response to receiving the test request;
a connection determining module, configured to determine a target connection corresponding to a request identifier from a plurality of connections that have been established, where the plurality of connections are in one-to-one correspondence with the plurality of terminal devices, and the target connection corresponds to a target terminal device;
the debugging module is used for debugging the target program corresponding to the test request to obtain debugging information; and
and the first sending module is used for sending the debugging information to the target terminal equipment through the target connection.
11. The apparatus of claim 10, further comprising:
a connection request receiving module, configured to receive a connection request from a terminal device, where the connection request includes a user identifier; and
and the connection establishment module is used for establishing connection between the terminal equipment and a preset network port of the server.
12. The apparatus of claim 11, further comprising:
the request identifier acquisition module is used for acquiring a request identifier corresponding to the user identifier and identifier position information of the request identifier; and
and the configuration module is used for configuring the mapping relation among the request identifier, the user identifier and the connection.
13. The apparatus of claim 12, wherein the identity determination module comprises:
and the identification determination submodule is used for determining a field at a specified position in the test request as the request identification according to the identification position information.
14. The apparatus of claim 12, wherein the connection determination module comprises:
and the connection determination submodule is used for determining the connection corresponding to the request identifier according to the mapping relation and taking the connection as the target connection.
15. The apparatus of claim 10, wherein the server is configured with a debug plug-in; the debugging module comprises:
a monitoring sub-module, configured to monitor, through the debug plug-in, a predetermined network port of the server, so as to receive the debug instruction; and
and the execution sub-module is used for executing debugging operation on the target program through the debugging plug-in according to the debugging instruction to obtain the debugging information.
16. The apparatus of claim 11, wherein the first transmitting module comprises:
and the information sending sub-module is used for sending the debugging information to the terminal equipment through the target connection through the debugging plug-in.
17. A remote debugging device for use in a terminal device, the device comprising:
the second sending module is used for sending a connection request to the server, wherein the connection request comprises a user identifier;
the establishing module is used for establishing connection with a preset port of the server; and
and the receiving module is used for receiving the debugging information from the server through the connection.
18. The apparatus of claim 17, the terminal device configured with an integrated development environment, the apparatus further comprising:
the generation module is used for generating a debugging instruction by utilizing the integrated development environment;
the third sending module is used for sending the debugging instruction to the server through the connection by utilizing the integrated development environment; and
and the display module is used for displaying the debugging information by utilizing the integrated development environment.
19. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-9.
20. A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of any one of claims 1-9.
21. A computer program product comprising computer programs/instructions which, when executed by a processor, implement the steps of the method of any of claims 1-9.
CN202211672264.2A 2022-12-23 2022-12-23 Remote debugging method, device, equipment and storage medium Withdrawn CN116107878A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211672264.2A CN116107878A (en) 2022-12-23 2022-12-23 Remote debugging method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211672264.2A CN116107878A (en) 2022-12-23 2022-12-23 Remote debugging method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116107878A true CN116107878A (en) 2023-05-12

Family

ID=86258994

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211672264.2A Withdrawn CN116107878A (en) 2022-12-23 2022-12-23 Remote debugging method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116107878A (en)

Similar Documents

Publication Publication Date Title
WO2020207454A1 (en) Information pushing method and device
CN110765024A (en) Simulation test method, simulation test device, electronic equipment and computer-readable storage medium
KR101520056B1 (en) Cloud-based mobile/online game server load test automation service method
CN108228444B (en) Test method and device
CN113726607B (en) Network detection method and device, electronic equipment and storage medium
CN111752843A (en) Method, device, electronic equipment and readable storage medium for determining influence surface
CN115604144B (en) Test method and device, electronic equipment and storage medium
CN112925652A (en) Application resource deployment method, device, electronic equipment and medium
CN114389969B (en) Method and device for testing client, electronic equipment and storage medium
CN114900379B (en) Message notification method and device, electronic equipment and storage medium
CN113691602A (en) Service processing method, system, device, equipment and medium based on cloud mobile phone
CN109587197B (en) Method, device and system for associating reported data
CN112565225B (en) Method and device for data transmission, electronic equipment and readable storage medium
CN112152879A (en) Network quality determination method and device, electronic equipment and readable storage medium
CN116107878A (en) Remote debugging method, device, equipment and storage medium
CN112131095B (en) Pressure testing method and device
CN109271310B (en) Development testing method and device for network function of mobile application program
CN110768855B (en) Method and device for testing linkmzation performance
CN113760727A (en) Interface regression testing method and device
CN111984893B (en) System log configuration conflict reminding method, device and system
CN116260855B (en) Communication method, communication device, electronic equipment and storage medium
CN115577200B (en) Page loading method, device, equipment and storage medium
CN113032040B (en) Method, apparatus, device, medium, and article for processing tasks
CN117998038A (en) Method and device for managing network video recorder, electronic equipment and storage medium
CN116701158A (en) Test method and 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
WW01 Invention patent application withdrawn after publication

Application publication date: 20230512

WW01 Invention patent application withdrawn after publication