Debugging method and device, electronic device and computer readable storage medium
By running pre-defined project services in an online development environment and connecting them to the local development environment network, application services can be identified and debugged, thus solving the problem of low application debugging efficiency in microservice architecture and achieving resource savings and improved debugging efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- PING AN HEALTH INSURANCE CO LTD
- Filing Date
- 2023-04-13
- Publication Date
- 2026-07-03
AI Technical Summary
In a microservices architecture, application debugging is inefficient, especially in the local development environment where memory space and processor core resources cannot be effectively allocated, leading to development machine crashes and extended debugging time.
Run a preset project service in the online development environment, identify the application service to be debugged, and increase its network connectivity in the local development environment so that it can be connected to the online development environment as a load. Then, determine the application service to be debugged by matching parameter information.
It saves resources in the local development environment, improves application debugging efficiency, frees up the performance of local development machines, supports multi-person team collaborative debugging and joint debugging of different machines, and improves R&D efficiency.
Smart Images

Figure CN116303087B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of microservice application technology, and in particular to an application debugging method, apparatus, electronic device, and computer-readable storage medium. Background Technology
[0002] Microservices, as a mainstream enterprise-level architecture, decomposes applications into smaller services, making application development and maintenance faster, easier to understand, and more flexible. However, in the accumulation and growth of actual business, the more granular the services become, the longer the request chain becomes. Taking an insurance application scenario as an example, when an insurance application request enters the transaction system, it will pass through multiple application services, including the service gateway application. In an extreme case, if all these application services are in a single project system, the corresponding request chain involves multiple layers, requiring multiple supporting services to complete the processing of the request.
[0003] To independently complete long-chain debugging on a local machine, the local development machine needs to start multiple application services, and each application service requires the local development machine to allocate corresponding memory space and processor core performance. Under limited development conditions, if the allocation of memory space and processor core performance cannot be completed, it may cause the local development machine to crash and prolong the time to complete local debugging conditions, thereby reducing the efficiency of application debugging. Summary of the Invention
[0004] The purpose of this invention is to provide an application debugging method, apparatus, electronic device, and computer-readable storage medium to solve the technical problem of low efficiency in application debugging in the prior art.
[0005] The technical solution of the present invention is as follows: an application debugging method is provided, comprising:
[0006] Run a preset project service in an online development environment, the preset project service including multiple application services;
[0007] Determine at least one application service from the preset project services, and use the at least one application service as an application service to be debugged, and add the application service to be debugged in the local development environment;
[0008] Connect the network of the online development environment to the network of the local development environment where the application service to be debugged is located, and connect the local development environment where the application service to be debugged is located as a load to the online development environment;
[0009] Based on the first parameter information corresponding to the application service currently requiring debugging and the second parameter information corresponding to the application service to be debugged, the application service currently requiring debugging is determined, and the application service currently requiring debugging is debugged, wherein the application service to be debugged includes the application service currently requiring debugging.
[0010] Furthermore, enabling the local development environment where the application service to be debugged resides to be connected as a load balancer to the online development environment includes:
[0011] The machine information of the online development environment and the machine information of the local development environment are registered to a preset registration center, so that the local development environment where the application service to be debugged is located is connected to the online development environment as a load.
[0012] Further, determining the application service to be debugged based on the first parameter information corresponding to the application service to be debugged and the second parameter information corresponding to the application service to be debugged includes:
[0013] Obtain the first parameter information corresponding to the application service that needs to be debugged, generate a debugging request based on the first parameter information corresponding to the application service that needs to be debugged, and determine the application service that needs to be debugged based on the debugging request and the second parameter information corresponding to the application service to be debugged.
[0014] Furthermore, the first parameter information corresponding to the application service currently requiring debugging includes the IP address and port number of the local development environment corresponding to the application service currently requiring debugging; correspondingly, generating a debugging request based on the first parameter information corresponding to the application service currently requiring debugging includes adding the IP address and port number of the local development environment corresponding to the application service currently requiring debugging to a preset hypertext transfer protocol, and generating a debugging request.
[0015] Further, the second parameter information corresponding to the application service to be debugged includes the IP address and port number of the local development environment corresponding to the application service to be debugged; correspondingly, determining the application service to be debugged based on the debugging request and the second parameter information corresponding to the application service to be debugged also includes:
[0016] The IP address and port number in the debugging request are added to the preset client request to obtain the parameter-added client request. The parameter-added client request is sent to the local development environment where the application service to be debugged is located. Based on the parameter-added client request and the second parameter information corresponding to the application service to be debugged, the application service to be debugged is determined.
[0017] Further, based on the second parameter information corresponding to the client request after parameter supplementation and the application service to be debugged, the application service to be debugged is determined, including: if the IP address and port number in the client request after parameter supplementation are the same as the IP address and port number of the local development environment corresponding to one of the application services to be debugged, then the corresponding application service in the application service to be debugged is taken as the application service to be debugged.
[0018] Furthermore, debugging the application service that needs to be debugged includes: running the application service that needs to be debugged, as well as other application services in the preset project services other than the application service corresponding to the application service that needs to be debugged, in order to debug the application service that needs to be debugged.
[0019] Another technical solution of the present invention is as follows: an application debugging device is provided, including an initialization module, an application service addition module, a load access module, and a debugging module;
[0020] The initialization module is used to run a preset project service in an online development environment, the preset project service including multiple application services;
[0021] The application service addition module is used to determine at least one application service from the preset project services, and to add the at least one application service as an application service to be debugged in the local development environment.
[0022] The load access module is used to connect the network of the online development environment to the network of the local development environment where the application service to be debugged is located, and to make the local development environment where the application service to be debugged is located access the online development environment as a load;
[0023] The debugging module is used to determine the application service to be debugged based on the first parameter information corresponding to the application service to be debugged and the second parameter information corresponding to the application service to be debugged, and to debug the application service to be debugged, wherein the application service to be debugged includes the application service to be debugged.
[0024] Another technical solution of the present invention is as follows: an electronic device is provided, including a memory and a processor. The memory stores a computer program that can be executed by the processor. When the processor executes the computer program, it implements the application debugging method as described in any of the above technical solutions.
[0025] Another technical solution of the present invention is as follows: a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it implements the application debugging method as described in any of the above technical solutions.
[0026] The beneficial effects of this invention are as follows: A preset project service is run in an online development environment, the preset project service including multiple application services; at least one application service is determined from the preset project services, and the at least one application service is designated as an application service to be debugged, and the application service to be debugged is added to the local development environment; the network of the online development environment is connected to the network of the local development environment where the application service to be debugged is located, and the local development environment where the application service to be debugged is located is connected to the online development environment as a load; the application service to be debugged is determined according to the first parameter information corresponding to the application service to be debugged and the second parameter information corresponding to the application service to be debugged, and the application service to be debugged is debugged, wherein the application service to be debugged includes the application service to be debugged; through the above technical solution, the resources occupied by application debugging in the local development environment are saved, and the efficiency of application debugging is improved. Attached Figure Description
[0027] Figure 1 This is a flowchart illustrating the application debugging method according to an embodiment of the present invention;
[0028] Figure 2 This is a block diagram of the application debugging process according to an embodiment of the present invention;
[0029] Figure 3 This is a schematic diagram of the application debugging device according to an embodiment of the present invention;
[0030] Figure 4 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention. Detailed Implementation
[0031] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.
[0032] In the description of this application, the terms "first," "second," etc., are used only for distinguishing purposes and should not be construed as indicating or implying relative importance or order. In this specification, the terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.
[0033] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of the invention. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0034] Figure 1 This is a flowchart illustrating the application debugging method according to an embodiment of the present invention. It should be noted that if substantially the same result is achieved, the application debugging method of the present invention does not necessarily require further explanation. Figure 1 The illustrated process sequence is limited. For example... Figure 1 As shown, the application debugging method mainly includes the following steps:
[0035] S1, Run a preset project service in an online development environment, the preset project service including multiple application services;
[0036] Before running the preset project service in the online development environment, a complete online development (dev) environment needs to be added so that the preset project service can be run in the online development environment. The preset project service is a complete set of project services.
[0037] S2, determine at least one application service from the preset project services, and use the at least one application service as an application service to be debugged, and add the application service to be debugged in the local development environment;
[0038] The application service to be debugged includes one or more application services from the preset project services. For an insurance application scenario, if the preset project service is an insurance transaction service, then the multiple application services included in the preset project service can be service gateway applications, order accounting, product center, payment accounting, contract applications, financial accounting, policy information, etc., and the application service to be debugged can be one or more of these. To facilitate debugging, the application service to be debugged needs to be added to the local development environment.
[0039] S3, connect the network of the online development environment to the network of the local development environment where the application service to be debugged is located, and connect the local development environment where the application service to be debugged is located as a load to the online development environment;
[0040] Initially, the code corresponding to the application service to be debugged in the local development environment is consistent with the code corresponding to the application service in the online development environment. Subsequently, the code corresponding to the application service to be debugged in the local development environment may be changed due to the need for deployment. After connecting the local development environment where the application service to be debugged is located to the online development environment as a load balancer, it is convenient to debug the application service to be debugged after the code changes.
[0041] S4. Based on the first parameter information corresponding to the application service to be debugged and the second parameter information corresponding to the application service to be debugged, determine the application service to be debugged and debug the application service to be debugged, wherein the application service to be debugged includes the application service to be debugged.
[0042] It should be noted that if the application service to be debugged includes one of the application services in the preset project services, then the application service to be debugged is the current application service to be debugged. If the application service to be debugged includes several application services in the preset project services, then the application service to be debugged includes not only the current application service to be debugged, but also other application services to be debugged. Other application services to be debugged and the current application service to be debugged can be application services with different codes but the same name, such as both being order accounting application services.
[0043] In this embodiment of the invention, a preset project service is run in an online development environment. The preset project service includes multiple application services. At least one application service is determined from the preset project services and designated as an application service to be debugged. This application service to be debugged is then added to the local development environment. The network of the online development environment is connected to the network of the local development environment where the application service to be debugged is located, and the local development environment where the application service to be debugged is located is connected to the online development environment as a load balancer. The application service to be debugged is determined based on the first parameter information corresponding to the application service to be debugged and the second parameter information corresponding to the application service to be debugged, and the application service to be debugged is then debugged. This saves performance and content resources occupied by application debugging in the local development environment and improves the efficiency of application debugging.
[0044] In an optional implementation, the local development environment where the application service to be debugged resides is connected as a load balancer to the online development environment, including:
[0045] The machine information of the online development environment and the machine information of the local development environment are registered to a preset registration center, so that the local development environment where the application service to be debugged is located is connected to the online development environment as a load.
[0046] In one specific embodiment, the machine information includes information such as IP address, port number, and service name. The service name information may include the name of the application service in the preset project service, for example, the name of a service gateway application or an order calculation application service. By registering the machine information of the online development environment and the machine information of the local development environment to the preset registration center, the local development environment where the application service to be debugged resides can be connected to the online development environment as a load balancer; by starting the application service to be debugged in the local development environment, the machine information of the local development environment is registered to the preset registration center.
[0047] In an optional implementation, determining the application service to be debugged based on the first parameter information corresponding to the application service currently requiring debugging and the second parameter information corresponding to the application service to be debugged includes:
[0048] Obtain the first parameter information corresponding to the application service that needs to be debugged, generate a debugging request based on the first parameter information corresponding to the application service that needs to be debugged, and determine the application service that needs to be debugged based on the debugging request and the second parameter information corresponding to the application service to be debugged.
[0049] In one specific embodiment, the first parameter information corresponding to the application service to be debugged is added to the transmission protocol to generate a debugging request. The debugging request is initiated using a local interface test tool, such as Postman. Based on the debugging request and the second parameter information corresponding to the application service to be debugged, the application service to be debugged can be determined.
[0050] In one optional implementation, the first parameter information corresponding to the application service currently requiring debugging includes the IP address and port number of the local development environment corresponding to the application service currently requiring debugging; accordingly, generating a debugging request based on the first parameter information corresponding to the application service currently requiring debugging includes adding the IP address and port number of the local development environment corresponding to the application service currently requiring debugging to a preset hypertext transfer protocol, and generating a debugging request.
[0051] In one specific embodiment, the IP address and port number of the local development environment corresponding to the application service to be debugged are added to the HTTP request header to generate a debug request.
[0052] In an optional implementation, the second parameter information corresponding to the application service to be debugged includes the IP address and port number of the local development environment corresponding to the application service to be debugged; correspondingly, determining the application service to be debugged based on the debugging request and the second parameter information corresponding to the application service to be debugged further includes:
[0053] The IP address and port number in the debugging request are added to the preset client request to obtain the parameter-added client request. The parameter-added client request is sent to the local development environment where the application service to be debugged is located. Based on the parameter-added client request and the second parameter information corresponding to the application service to be debugged, the application service to be debugged is determined.
[0054] In one specific embodiment, dynamic routing for application debugging is implemented using remote procedure call (RPC) via Spring Cloud Feign (a microservice architecture client). Utilizing Spring's interceptor mechanism, before requesting downstream application services through FeignClient or RestTemplate, the request header information of a preset Hypertext Transfer Protocol request, namely the IP address and port number, is added to the preset client (Feign) request information. Then, the client request with the added parameters is sent to the local development environment where the downstream application service to be debugged resides. Based on the second parameter information corresponding to the client request with the added parameters and the application service to be debugged, the application service currently requiring debugging is determined.
[0055] In an optional implementation, the application service to be debugged is determined based on the second parameter information corresponding to the client request with the parameter supplementation and the application service to be debugged. This includes: if the IP address and port number in the client request with the parameter supplementation are the same as the IP address and port number of the local development environment corresponding to one of the application services to be debugged, then the corresponding application service in the application service to be debugged is taken as the application service to be debugged.
[0056] In one specific embodiment, when performing remote procedure call link adaptation across the entire link, in each remote procedure call link, priority is given to matching the IP address and port number that are the same as those in the client request after the parameters are supplemented, or the same as the IP address and port number filled in the request header of the preset Hypertext Transfer Protocol request. If a match is found, the request is used to invoke the load, thereby debugging the application service that needs to be debugged.
[0057] In an optional implementation, debugging the application service that needs to be debugged includes: running the application service that needs to be debugged, as well as other application services in the preset project services other than the application service corresponding to the application service that needs to be debugged, to debug the application service that needs to be debugged.
[0058] In one specific embodiment, a block diagram of the application debugging process is shown, such as Figure 2 As shown, Figure 2In the entire development process, there are four applications in the online development environment, namely A, B, C, and D. In the current application debugging scheme, the development machine needs to start four machines independently to support the debugging of these four applications. In this embodiment of the invention, the local development environment only needs to start one machine and register the local development environment and the online development environment to the same registry center. Figure 2 In this scenario, four applications are involved: Application A includes application service server1, Application B includes application services server2 and server3, Application C includes application services server4 and server5, and Application D includes application services server6 and server7. The local development environment includes the application service server8 to be debugged. The registry center registers server1, server2, server3, server4, server5, server6, server7, and server8. For Application B, the application service to be debugged (currently the application service to be debugged), server8, is started in the local development environment and added to the registry center. When a request is sent from Application A to Application B to invoke Application B, Application A obtains the IP addresses and port numbers of all successfully registered application services from the registry center. Service A matches the IP address and port number in the request with the application service server8 to be debugged, prioritizing routing to server8 to complete the service call, thus achieving dynamic access and flexible routing of local services.
[0059] In another specific embodiment, when debugging the application service server8, it is necessary to exclude the downstream application (e.g., application C or application D) corresponding to the application service to be debugged. However, if the IP address and port number are the same as those of the local development environment corresponding to the application service to be debugged, it is not necessary to exclude them. It should be noted that the first parameter information and the second parameter information may also include the application service version number and the business scenario routing. When comparing the first parameter information and the second parameter information, all information in the first parameter information and the second parameter information needs to be compared. By adding the application service version number and the business scenario routing to the first parameter information and the second parameter information, the usage scenarios of the local development environment can be enriched.
[0060] The application debugging method provided in this invention runs a preset project service in an online development environment, the preset project service including multiple application services; at least one application service is determined from the preset project service, and the at least one application service is designated as the application service to be debugged, and the application service to be debugged is added to the local development environment; the network of the online development environment is connected to the network of the local development environment where the application service to be debugged is located, and the local development environment where the application service to be debugged is located is connected to the online development environment as a load; the application service to be debugged is determined according to the first parameter information corresponding to the application service to be debugged and the second parameter information corresponding to the application service to be debugged, and the application service to be debugged is debugged; this method saves the performance and content resources occupied by application debugging in the local development environment and improves the efficiency of application debugging. The application debugging method provided in this invention can greatly unleash the performance of the local development environment (local development machine). In the end-to-end application service, there is no need to focus on the application service used to support functional debugging, and there is no need to publish the local application service in the online development environment or test environment. It supports the debugging function of the local integrated development environment IDE. The application debugging method provided in this invention can isolate different debugging machines, realize application debugging by multiple teams, and realize collaborative debugging of different local machines. It saves the time originally spent on starting the development environment on the local development machine, improves debugging efficiency, and thus helps technical personnel improve R&D efficiency and increase productivity.
[0061] The application debugging method provided in this invention can be built on artificial intelligence (AI). It acquires and processes relevant data using AI technology, enabling unattended AI application debugging. AI is the theory, method, technology, and application system that uses digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to obtain optimal results.
[0062] Foundational technologies for artificial intelligence generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interactive systems, and mechatronics. AI software technologies mainly encompass computer vision, robotics, biometrics, speech processing, natural language processing, and machine learning / deep learning.
[0063] Figure 3 This is a schematic diagram of the application debugging device according to an embodiment of the present invention, such as... Figure 3 As shown, the application debugging device 30 includes an initialization module 31, an application service addition module 32, a load access module 33, and a debugging module 34.
[0064] The initialization module 31 is used to run a preset project service in an online development environment, the preset project service including multiple application services;
[0065] Before running the preset project service in the online development environment, a complete online development (dev) environment needs to be added so that the preset project service can be run in the online development environment. The preset project service is a complete set of project services.
[0066] The application service addition module 32 is used to determine at least one application service from the preset project services, and to add the at least one application service as an application service to be debugged in the local development environment.
[0067] The application service to be debugged includes one or more application services from the preset project services. For an insurance application scenario, if the preset project service is an insurance transaction service, then the multiple application services included in the preset project service can be service gateway applications, order accounting, product center, payment accounting, contract applications, financial accounting, policy information, etc., and the application service to be debugged can be one or more of these. To facilitate debugging, the application service to be debugged needs to be added to the local development environment.
[0068] The load access module 33 is used to connect the network of the online development environment to the network of the local development environment where the application service to be debugged is located, and to make the local development environment where the application service to be debugged is located access the online development environment as a load;
[0069] Initially, the code corresponding to the application service to be debugged in the local development environment is consistent with the code corresponding to the application service in the online development environment. Subsequently, the code corresponding to the application service to be debugged in the local development environment may be changed due to the need for deployment. After connecting the local development environment where the application service to be debugged is located to the online development environment as a load balancer, it is convenient to debug the application service to be debugged after the code changes.
[0070] The debugging module 34 is used to determine the application service to be debugged based on the first parameter information corresponding to the application service to be debugged and the second parameter information corresponding to the application service to be debugged, and to debug the application service to be debugged, wherein the application service to be debugged includes the application service to be debugged.
[0071] It should be noted that if the application service to be debugged includes one of the application services in the preset project services, then the application service to be debugged is the current application service to be debugged. If the application service to be debugged includes several application services in the preset project services, then the application service to be debugged includes not only the current application service to be debugged, but also other application services to be debugged. Other application services to be debugged and the current application service to be debugged can be application services with different codes but the same name, such as both being order accounting application services.
[0072] In an optional implementation, the load balancing module 33 enables the local development environment where the application service to be debugged resides to be connected as a load balancer to the online development environment, including:
[0073] The machine information of the online development environment and the machine information of the local development environment are registered to a preset registration center, so that the local development environment where the application service to be debugged is located is connected to the online development environment as a load.
[0074] The machine information includes IP address, port number, and service name, etc. The service name information may include the name of the application service in the preset project service, such as the name of a service gateway application or an order calculation application service. Registering the machine information of the online development environment and the local development environment to the preset registration center allows the local development environment, where the application service to be debugged resides, to be connected as a load balancer to the online development environment. Starting the application service to be debugged in the local development environment registers the machine information of the local development environment to the preset registration center.
[0075] In an optional implementation, the debugging module 34 determines the application service to be debugged based on the first parameter information corresponding to the application service to be debugged and the second parameter information corresponding to the application service to be debugged, including:
[0076] Obtain the first parameter information corresponding to the application service that needs to be debugged, generate a debugging request based on the first parameter information corresponding to the application service that needs to be debugged, and determine the application service that needs to be debugged based on the debugging request and the second parameter information corresponding to the application service to be debugged.
[0077] In an optional implementation, the first parameter information corresponding to the application service to be debugged includes the IP address and port number of the local development environment corresponding to the application service to be debugged; accordingly, the debugging module 34 generates a debugging request based on the first parameter information corresponding to the application service to be debugged, including adding the IP address and port number of the local development environment corresponding to the application service to be debugged to a preset hypertext transfer protocol, and generating a debugging request.
[0078] In an optional implementation, the second parameter information corresponding to the application service to be debugged includes the IP address and port number of the local development environment corresponding to the application service to be debugged; correspondingly, the debugging module 34, based on the debugging request and the second parameter information corresponding to the application service to be debugged, determines the application service currently to be debugged, and further includes:
[0079] The IP address and port number in the debugging request are added to the preset client request to obtain the parameter-added client request. The parameter-added client request is sent to the local development environment where the application service to be debugged is located. Based on the parameter-added client request and the second parameter information corresponding to the application service to be debugged, the application service to be debugged is determined.
[0080] In an optional implementation, the debugging module 34 determines the application service to be debugged based on the second parameter information corresponding to the client request with the supplemented parameters and the application service to be debugged. This includes: if the IP address and port number in the client request with the supplemented parameters are the same as the IP address and port number of the local development environment corresponding to one of the application services to be debugged, then the corresponding application service in the application service to be debugged is taken as the application service to be debugged.
[0081] In an optional implementation, the debugging module 34 debugs the application service that needs to be debugged, including running the application service that needs to be debugged and other application services in the preset project services other than the application service corresponding to the application service that needs to be debugged, in order to debug the application service that needs to be debugged.
[0082] The application debugging device provided in this embodiment of the invention includes an initialization module 31 that runs a preset project service in an online development environment, the preset project service including multiple application services; an application service addition module 32 that determines at least one application service from the preset project service and adds the at least one application service as an application service to be debugged in a local development environment; a load connection module 33 that connects the network of the online development environment to the network of the local development environment where the application service to be debugged is located, and connects the local development environment where the application service to be debugged is located as a load to the online development environment; and a debugging module 34 that determines the application service to be debugged based on the first parameter information corresponding to the application service to be debugged and the second parameter information corresponding to the application service to be debugged, and debugs the application service to be debugged. This saves performance and content resources occupied by application debugging in the local development environment and improves the efficiency of application debugging.
[0083] Figure 4 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention. Figure 4 As shown, the electronic device 40 includes a processor 41 and a memory 42 communicatively connected to the processor 41.
[0084] The memory 42 stores program instructions for implementing the application debugging method of any of the above embodiments.
[0085] The processor 41 is used to execute program instructions stored in the memory 42 for application debugging.
[0086] The processor 41 can also be referred to as a CPU (Central Processing Unit). The processor 41 may be an integrated circuit chip with signal processing capabilities. The processor 41 can also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. A general-purpose processor can be a microprocessor or any conventional processor.
[0087] This invention provides a storage medium that stores program instructions capable of implementing all the methods described above. The storage medium can be non-volatile or volatile. These program instructions can be stored in the storage medium as a software product, including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks, or terminal devices such as computers, servers, mobile phones, and tablets.
[0088] In the several embodiments provided by this invention, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or modules may be electrical, mechanical, or other forms.
[0089] Furthermore, the functional modules in the various embodiments of the present invention can be integrated into one processing unit, or each module can exist physically separately, or two or more modules can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. The above are merely embodiments of the present invention and do not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.
[0090] The above description is merely an embodiment of the present invention. It should be noted that those skilled in the art can make improvements without departing from the inventive concept of the present invention, but these improvements all fall within the protection scope of the present invention.
Claims
1. An application debugging method characterized by comprising: Includes the following steps: Run a preset project service in an online development environment, the preset project service including multiple application services; Determine at least one application service from the preset project services, and use the at least one application service as an application service to be debugged, and add the application service to be debugged in the local development environment; Connect the network of the online development environment to the network of the local development environment where the application service to be debugged is located, and connect the local development environment where the application service to be debugged is located as a load to the online development environment; Based on the first parameter information corresponding to the application service currently requiring debugging and the second parameter information corresponding to the application service to be debugged, the application service currently requiring debugging is determined, including: Obtain the first parameter information corresponding to the application service that needs to be debugged, and generate a debugging request based on the first parameter information corresponding to the application service that needs to be debugged. The debugging request is initiated using a local interface testing tool. Based on the second parameter information corresponding to the debugging request and the application service to be debugged, the application service to be debugged is determined. The application service to be debugged is then debugged, wherein the application service to be debugged includes the application service to be debugged.
2. The application debugging method according to claim 1, wherein The step of determining the application service that needs to be debugged based on the first parameter information corresponding to the application service that needs to be debugged and the second parameter information corresponding to the application service to be debugged includes: Obtain the first parameter information corresponding to the application service that needs to be debugged, generate a debugging request based on the first parameter information corresponding to the application service that needs to be debugged, and determine the application service that needs to be debugged based on the debugging request and the second parameter information corresponding to the application service to be debugged.
3. The application debugging method according to claim 2, wherein The first parameter information corresponding to the application service currently requiring debugging includes the IP address and port number of the local development environment corresponding to the application service currently requiring debugging; accordingly, a debugging request is generated based on the first parameter information corresponding to the application service currently requiring debugging, including adding the IP address and port number of the local development environment corresponding to the application service currently requiring debugging to a preset hypertext transfer protocol, and generating a debugging request.
4. The application debugging method according to claim 3, wherein The second parameter information corresponding to the application service to be debugged includes the IP address and port number of the local development environment corresponding to the application service to be debugged; correspondingly, determining the application service to be debugged based on the debugging request and the second parameter information corresponding to the application service to be debugged also includes: The IP address and port number in the debugging request are added to the preset client request to obtain the parameter-added client request. The parameter-added client request is sent to the local development environment where the application service to be debugged is located. Based on the parameter-added client request and the second parameter information corresponding to the application service to be debugged, the application service to be debugged is determined.
5. The application debugging method according to claim 4, characterized in that, Based on the client request with the supplemented parameters and the second parameter information corresponding to the application service to be debugged, the application service to be debugged is determined, including: if the IP address and port number in the client request with the supplemented parameters are the same as the IP address and port number of the local development environment corresponding to one of the application services to be debugged, then the corresponding application service in the application service to be debugged is taken as the application service to be debugged.
6. The application debugging method according to claim 1, wherein Debugging the application service that needs to be debugged includes running the application service that needs to be debugged, as well as other application services in the preset project services other than the application service corresponding to the application service that needs to be debugged, in order to debug the application service that needs to be debugged.
7. An application debugging apparatus for implementing the application debugging method according to any one of claims 1 to 6, characterized by It includes an initialization module, an application service addition module, a load balancing module, and a debugging module; The initialization module is used to run a preset project service in an online development environment, the preset project service including multiple application services; The application service addition module is used to determine at least one application service from the preset project services, and to add the at least one application service as an application service to be debugged in the local development environment. The load access module is used to connect the network of the online development environment to the network of the local development environment where the application service to be debugged is located, and to make the local development environment where the application service to be debugged is located access the online development environment as a load; The debugging module is used to determine the application service to be debugged based on the first parameter information corresponding to the application service to be debugged and the second parameter information corresponding to the application service to be debugged, and to debug the application service to be debugged, wherein the application service to be debugged includes the application service to be debugged.
8. An electronic device comprising a memory, a processor, the memory storing a computer program executable by the processor, characterized in that, When the processor executes the computer program, it implements the application debugging method as described in any one of claims 1 to 6.
9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the application debugging method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Method, device and system for testing application
CN103631715A