A sub-application debugging method, device, equipment and storage medium
By obtaining and replacing the entry files of the main application and sub-app and calling the rendering files of the sub-app, the problem of the difference between the development environment and the online environment in the micro front-end architecture is solved, and the stability and development efficiency of the sub-app is improved.
Patent Information
- Application Number
- CN202111367727.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-18
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2041-11-18
AI Technical Summary
In the micro front-end architecture, there are differences between the development environment and the online environment, which makes sub-applications unable to ensure their online stability in the development environment.
By obtaining the entry file of the main application, replacing the entry file of the current sub-app, and triggering the access portal of the target sub-app, calling its rendering file, to simulate the call of the online environment in the development environment, and reducing the development environment and the online environment difference.
It realizes that the sub-application is called through the main application in the development environment, which reduces the terminal resource usage, ensures the stability of the sub-application, and improves the development efficiency.
Smart Images

Figure CN114238074B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of network technology, and in particular to a sub-application debugging method, apparatus, device, and storage medium. Background Art
[0002] With the rapid development of internet technology, web front-end development is gaining increasing attention. Currently, most front-ends are developed based on a micro-frontend architecture. Micro-frontends can split different functions into multiple sub-applications based on different dimensions. In a micro-frontend architecture, online environments (such as production, phased release, and testing environments) can call different sub-applications from a master application.
[0003] However, when developing sub-applications in a development environment, each sub-application is implemented as a separate piece of project code. Therefore, when developing a sub-application in a development environment, the front-end page can only load the sub-application's content. In other words, sub-applications cannot be called from the main application in the development environment. This leads to differences between the development environment and the production environment, making it impossible to ensure the stability of the sub-application online. Summary of the Invention
[0004] The present disclosure provides a sub-application debugging method, apparatus, device, and storage medium, which can improve the online stability of the sub-application. The technical solution of the present disclosure is as follows:
[0005] According to the first aspect of the present disclosure, a sub-application debugging method is provided, which is applied to a terminal in which a current sub-application is deployed. The method includes: obtaining an entry file of a main application, the entry file of the main application is used to trigger the display of a page of the main application, the page of the main application includes at least one access entry of a sub-application, and the at least one sub-application includes the current sub-application. The entry file of the current sub-application is replaced with the entry file of the main application, the entry file of the current sub-application is used to trigger the display of the page of the current sub-application. The access entry of the target sub-application is triggered, and the rendering file of the target sub-application is called, and the rendering file of the target sub-application is used to render the page of the target sub-application, where the target sub-application is any sub-application among the at least one sub-application.
[0006] Optionally, the sub-application debugging method further includes: obtaining a uniform resource locator (URL) of the main application; sending a first request to a server, the first request being used to instruct the server to obtain an entry file for the main application, the first request including the URL of the main application; and receiving the entry file for the main application from the server.
[0007] Optionally, the debugging method of the sub-application further includes: calling the entry file of the main application and displaying the page of the main application.
[0008] Optionally, the terminal stores a first routing configuration file, the first routing configuration file stores the routing of the resource file of the current sub-application, and the resource file stores the routing of the rendering file. The sub-application debugging method further includes: if the target sub-application is the current sub-application, determining the routing of the resource file of the current sub-application from the first routing configuration file. Based on the routing of the resource file of the current sub-application, obtaining the routing of the rendering file in the resource file of the current sub-application. Based on the routing of the rendering file of the current sub-application, calling the rendering file of the current sub-application.
[0009] Optionally, at least one sub-application further includes other sub-applications, where the other sub-applications are sub-applications other than the current sub-application in the at least one sub-application. The sub-application debugging method further includes: if the target sub-application is another sub-application, obtaining rendering files of the other sub-applications, and calling the rendering files of the other sub-applications.
[0010] Optionally, the terminal stores a second routing configuration file, the second routing configuration file stores the routes of resource files of other sub-applications, and the resource files of other sub-applications store the routes of rendering files of other sub-applications. The debugging method of the sub-application also includes: sending a second request to the server, the second request is used to instruct to obtain the resource files of other sub-applications, and the second request includes the routes of the resource files of other sub-applications. Receiving the resource files of other sub-applications from the server. Sending a third request to the server, the third request is used to instruct to obtain the rendering files of other sub-applications, and the third request includes the routes of the rendering files of other sub-applications. Receiving the rendering files of other sub-applications from the server.
[0011] Optionally, the sub-application debugging method further includes: displaying a page of the main application and a page of the current sub-application.
[0012] Optionally, the sub-application debugging method further includes: displaying the main application page and the pages of other sub-applications.
[0013] According to a second aspect of the present disclosure, a sub-application debugging device is provided, which is applied to a terminal in which a current sub-application is deployed. The sub-application debugging device includes a receiving unit and a processing unit.
[0014] The receiving unit is configured to execute the acquisition of the main application's entry file, which is used to trigger the display of the main application's page. The main application's page includes at least one access entry for a sub-application, and the at least one sub-application includes the current sub-application. The processing unit is configured to execute the replacement of the current sub-application's entry file with the main application's entry file, and the current sub-application's entry file is used to trigger the display of the current sub-application's page. The processing unit is also configured to execute the triggering of the target sub-application's access entry, call the target sub-application's rendering file, and use the target sub-application's rendering file to render the target sub-application's page. The target sub-application is any sub-application among the at least one sub-application.
[0015] Optionally, the sub-application debugging apparatus further includes a sending unit. The processing unit is further configured to execute obtaining a uniform resource locator (URL) of the main application. The sending unit is configured to execute sending a first request to a server, the first request being used to instruct the server to obtain an entry file for the main application, the first request including the URL of the main application. The receiving unit is specifically configured to execute receiving the entry file for the main application from the server.
[0016] Optionally, the sub-application debugging device further includes a display unit configured to execute an entry file for calling the main application and display a page of the main application.
[0017] Optionally, the terminal stores a first routing configuration file, the first routing configuration file stores the routing of the resource file of the current sub-application, and the resource file stores the routing of the rendering file. The processing unit is further configured to determine the routing of the resource file of the current sub-application from the first routing configuration file if the target sub-application is the current sub-application. The receiving unit is further configured to execute the routing based on the resource file of the current sub-application and obtain the routing of the rendering file in the resource file of the current sub-application. The processing unit is specifically configured to execute the routing based on the rendering file of the current sub-application and call the rendering file of the current sub-application.
[0018] Optionally, at least one sub-application further includes other sub-applications, where the other sub-applications are sub-applications other than the current sub-application in the at least one sub-application. The receiving unit is further configured to, if the target sub-application is another sub-application, obtain rendering files of the other sub-applications. The processing unit is specifically configured to execute the call of the rendering files of the other sub-applications.
[0019] Optionally, the terminal stores a second routing configuration file, the second routing configuration file stores the routes of resource files of other sub-applications, and the resource files of other sub-applications store the routes of rendering files of other sub-applications. The sending unit is further configured to execute sending a second request to the server, the second request is used to indicate the acquisition of resource files of other sub-applications, and the second request includes the routes of resource files of other sub-applications. The receiving unit is further configured to execute receiving resource files of other sub-applications from the server. The sending unit is further configured to execute sending a third request to the server, the third request is used to indicate the acquisition of rendering files of other sub-applications, and the third request includes the routes of rendering files of other sub-applications. The receiving unit is specifically configured to execute receiving rendering files of other sub-applications from the server.
[0020] Optionally, the display unit is further configured to display the page of the main application and the page of the current sub-application.
[0021] Optionally, the display unit is further configured to display the page of the main application and the pages of other sub-applications.
[0022] According to a third aspect of the present disclosure, a terminal is provided, the terminal including:
[0023] A processor. A memory for storing processor-executable instructions. The processor is configured to execute the instructions to implement any optional sub-application debugging method of the first aspect.
[0024] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided, on which instructions are stored. When the instructions in the computer-readable storage medium are executed by a processor of a terminal, the terminal is enabled to execute any optional sub-application debugging method in the above-mentioned first aspect.
[0025] According to a fifth aspect of the present disclosure, there is provided a computer program product comprising instructions, which, when executed on a computer, causes the computer to execute the debugging method of any optional sub-application in the first aspect.
[0026] According to the sixth aspect of the present disclosure, the present disclosure provides a chip, which includes a processor and a communication interface, the communication interface and the processor are coupled, and the processor is used to run a computer program or instructions to implement the debugging method of the sub-application described in the first aspect and any possible implementation of the first aspect.
[0027] The technical solution provided by the present disclosure brings at least the following beneficial effects: obtaining the entry file of the main application, the entry file of the main application is used to trigger the display of the page of the main application, the page of the main application includes at least one access entry of a sub-application, and the at least one sub-application includes the current sub-application. Afterwards, the entry file of the current sub-application is replaced with the entry file of the main application, and the entry file of the current sub-application is used to trigger the display of the page of the current sub-application. In this way, even if the terminal is deployed with the current sub-application, the page of the main application can still be displayed. Then, the access entry of the target sub-application is triggered, and the rendering file of the target sub-application is called. The rendering file of the target sub-application is used to render the page of the target sub-application, and the target sub-application is any sub-application in the at least one sub-application. In this way, in the development environment, the sub-application (such as the target sub-application) can be called through the main application, which reduces the difference between the development environment and the online environment and improves the stability of the sub-application online.
[0028] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] The accompanying drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute an improper limitation of the present disclosure.
[0030] Figure 1 is a schematic structural diagram of a terminal device according to an exemplary embodiment;
[0031] Figure 2 is a flowchart of a method for debugging a sub-application according to an exemplary embodiment;
[0032] Figure 3 is a schematic diagram of a page of a main application according to an exemplary embodiment;
[0033] Figure 4 is a flowchart of another method for debugging a seed application according to an exemplary embodiment;
[0034] Figure 5 is a schematic structural diagram of a sub-application debugging device according to an exemplary embodiment;
[0035] Figure 6 FIG. 1 is a structural diagram of another device for debugging a seed application according to an exemplary embodiment. DETAILED DESCRIPTION
[0036] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
[0037] It should be noted that the terms "first," "second," and the like in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or precedence. It should be understood that the numbers used in this manner are interchangeable where appropriate so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure as detailed in the appended claims.
[0038] It should be noted that the user information involved in this disclosure (including but not limited to user device information, user personal information, etc.) is all information authorized by the user or fully authorized by all parties.
[0039] First, the application scenarios of the embodiments of the present disclosure are introduced.
[0040] The debugging method of the sub-application of the embodiment of the present disclosure is applied to the development of applications in a micro-frontend architecture. In the related art, the developer can start the main application project and the current sub-application project at the same time in the development environment. Afterwards, the sub-application can be called through the main application to achieve the effect of the current sub-application in the online environment. However, starting the main application project and the current sub-application project at the same time in the development environment will occupy the resources of the terminal. In addition, in the above technical solution, since the main application and the current sub-application are different projects, the current sub-application project will not be able to apply the relevant functions of the compilation tool.
[0041] It should be noted that in the embodiments of the present disclosure, a project refers to a code file and / or a compiled file after the code file is compiled. A sub-application entry exists within a main application. Typically, a terminal may first display the main application page. Subsequently, the terminal may display the sub-application page in response to an operation on the sub-application entry.
[0042] In order to solve the above problems, the embodiments of the present disclosure provide a sub-application debugging method, which obtains the entry file of the main application, and the entry file of the main application is used to trigger the display of the main application page. The main application page includes at least one access entry of the sub-application, and the at least one sub-application includes the current sub-application. The entry file of the current sub-application is replaced with the entry file of the main application, and the entry file of the current sub-application is used to trigger the display of the current sub-application page. The access entry of the target sub-application is triggered, and the rendering file of the target sub-application is called. The rendering file of the target sub-application is used to render the page of the target sub-application. The target sub-application is any sub-application in at least one sub-application. In this way, by starting the sub-application, the page of the main application can be displayed, and the sub-application (such as the target sub-application) can be called through the main application, which reduces the difference between the development environment and the online environment and improves the stability of the sub-application online.
[0043] Furthermore, the present disclosure only starts the sub-application, which not only reduces the occupancy of terminal resources, but also ensures that the sub-application can apply the relevant functions of the compilation tool, thereby improving development efficiency.
[0044] Figure 1 The present invention provides a schematic diagram of a terminal device for applying the method provided by the present invention. The terminal device 10 includes a processor 101 and a memory 102.
[0045] The processor 101 may include one or more processing cores, such as a quad-core processor, an octa-core processor, etc. The processor 101 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0046] The memory 102 may include one or more computer-readable storage media, which may be non-transitory. The memory 102 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices and flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 102 is used to store at least one instruction, which is executed by the processor 101 to implement the group communication method provided by the embodiment of the method of the present disclosure.
[0047] In some embodiments, the terminal device 10 may optionally include a peripheral device interface 103 and at least one peripheral device. The processor 101, memory 102, and peripheral device interface 103 may be connected via a bus or signal lines. Each peripheral device may be connected to the peripheral device interface 103 via a bus, signal lines, or circuit boards. Specifically, the peripheral device may include at least one of a radio frequency circuit 104, a display screen 105, a camera assembly 106, an audio circuit 107, a positioning assembly 108, and a power supply 109.
[0048] The peripheral device interface 103 can be used to connect at least one I / O (Input / Output)-related peripheral device to the processor 101 and the memory 102. In some embodiments, the processor 101, the memory 102, and the peripheral device interface 103 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 101, the memory 102, and the peripheral device interface 103 can be implemented on separate chips or circuit boards, which is not limited in this embodiment.
[0049] The RF circuit 104 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The RF circuit 104 communicates with communication networks and other communication devices via electromagnetic signals. The RF circuit 104 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals into electrical signals. Optionally, the RF circuit 104 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, etc. The RF circuit 104 can communicate with other terminal devices via at least one wireless communication protocol. Such wireless communication protocols include, but are not limited to, metropolitan area networks, various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and / or Wi-Fi (Wireless Fidelity) networks. In some embodiments, the RF circuit 104 may also include circuits related to NFC (Near Field Communication), which is not limited in this disclosure.
[0050] The display screen 105 is used to display a UI (User Interface). The UI may include graphics, text, icons, videos, and any combination thereof. When the display screen 105 is a touch screen display, the display screen 105 also has the ability to collect touch signals on the surface or above the surface of the display screen 105. The touch signal can be input as a control signal to the processor 101 for processing. At this time, the display screen 105 can also be used to provide virtual buttons and / or virtual keyboards, also known as soft buttons and / or soft keyboards. In some embodiments, the display screen 105 can be one, and the front panel of the terminal device 10 is set; the display screen 105 can be made of materials such as LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), etc.
[0051] The camera assembly 106 is used to capture images or videos. Optionally, the camera assembly 106 includes a front-facing camera and a rear-facing camera. Typically, the front-facing camera is located on the front panel of the terminal device, and the rear-facing camera is located on the back of the terminal device. The audio circuit 107 may include a microphone and a speaker. The microphone is used to capture sound waves from the user and the environment, converting them into electrical signals that are then input into the processor 101 for processing, or input into the RF circuit 104 for voice communication. For stereo sound capture or noise reduction, multiple microphones may be provided, located in different locations on the terminal device 10. The microphone may also be an array microphone or an omnidirectional microphone. The speaker is used to convert electrical signals from the processor 101 or the RF circuit 104 into sound waves. The speaker may be a traditional thin-film speaker or a piezoelectric ceramic speaker. A piezoelectric ceramic speaker can convert electrical signals not only into audible sound waves but also into inaudible sound waves for purposes such as distance measurement. In some embodiments, the audio circuit 107 may also include a headphone jack.
[0052] The positioning component 108 is used to locate the current geographic location of the terminal device 10 to implement navigation or LBS (Location Based Service). The positioning component 108 can be a positioning component based on the US GPS (Global Positioning System), China's Beidou system, Russia's Greninja system, or the European Union's Galileo system.
[0053] The power supply 109 is used to power the various components in the terminal device 10. The power supply 109 can be AC power, DC power, a disposable battery, or a rechargeable battery. When the power supply 109 includes a rechargeable battery, the rechargeable battery can support wired charging or wireless charging. The rechargeable battery can also be used to support fast charging technology.
[0054] In some embodiments, the terminal device 10 further includes one or more sensors 1010. The one or more sensors 1010 include, but are not limited to, an acceleration sensor, a gyroscope sensor, a pressure sensor, a fingerprint sensor, an optical sensor, and a proximity sensor.
[0055] The acceleration sensor can detect the magnitude of acceleration on the three coordinate axes of the coordinate system established with the terminal device 10. The gyroscope sensor can detect the body direction and rotation angle of the terminal device 10, and the gyroscope sensor can cooperate with the acceleration sensor to collect the user's 3D actions on the terminal device 10. The pressure sensor can be set on the side frame of the terminal device 10 and / or the lower layer of the display screen 105. When the pressure sensor is set on the side frame of the terminal device 10, it can detect the user's grip signal on the terminal device 10. The fingerprint sensor is used to collect the user's fingerprint. The optical sensor is used to collect the ambient light intensity. The proximity sensor, also known as the distance sensor, is usually set on the front panel of the terminal device 10. The proximity sensor is used to collect the distance between the user and the front of the terminal device 10.
[0056] The execution subject of the sub-application debugging method provided by the present disclosure may be a sub-application debugging device, and the execution device may be Figure 1 The terminal device shown. At the same time, the execution device can also be the central processing unit (CPU) of the terminal device, or a control module in the terminal device for debugging the sub-application. In the embodiment of the present application, the debugging method of the sub-application executed by the terminal device is taken as an example to illustrate the debugging method of the sub-application provided in the embodiment of the present application.
[0057] In one embodiment, a terminal device is used to provide voice and / or data connectivity services to a user. The terminal device may be referred to by different names, such as UE, terminal unit, terminal station, mobile station, mobile station, remote station, remote terminal, mobile device, wireless communication device, vehicle user equipment, terminal agent, or terminal device.
[0058] Optionally, the terminal device may be any handheld device, vehicle-mounted device, wearable device, or computer with communication capabilities, which is not limited in the present disclosure. For example, the handheld device may be a smartphone. The vehicle-mounted device may be a vehicle navigation system. The wearable device may be a smart bracelet. The computer may be a personal digital assistant (PDA), a tablet computer, or a laptop computer.
[0059] In the disclosed embodiments, the terminal device is a device installed with a programming tool that supports programming using a programming language (e.g., Java, Python). For example, the programming tool may be IntelliJ IDEA, Eclipse, or Webpack. The computer device may store script code written by a developer or automatically generate script code generated by scripting software. The programming tool may also support compiling the script code to generate compiled files (e.g., .js files and .css files).
[0060] In the embodiment of the present disclosure, the terminal device is deployed with the current sub-application. The terminal device can start the current sub-application and execute the embodiment of the present disclosure. Exemplarily, the terminal device stores a file after the sub-application code is compiled.
[0061] After introducing the application scenarios and terminal devices of the embodiments of the present disclosure, the debugging method of the sub-application provided by the embodiments of the present disclosure is introduced in detail below.
[0062] Figure 2 FIG. 1 is a flowchart of a method for debugging a sub-application according to an exemplary embodiment. Figure 2 As shown, the method may include steps 201 to 204.
[0063] 201. Get the entry file of the main application.
[0064] Among them, the entry file of the main application is used to trigger the display of the page of the main application, and the page of the main application includes an access entry of at least one sub-application, and the at least one sub-application includes the current sub-application.
[0065] For example, the entry file of the main application can be the index.html file of the main application. The index.html file can be compiled by a compilation tool to compile the project code of the main application. In response to the operation of opening the index.html file, the page of the main application can be displayed. For example, Figure 3As shown, in response to the operation of opening the index.html file, the terminal can display the page 301 of the main application through the browser. The page 301 of the main application includes area 302, area 303 and area 304. Among them, area 302 can be used to display the title information of the main application, etc. Area 303 is used to display the entrance of at least one sub-application in the main application. For example, the sub-application A area is the access entrance of sub-application A, and the sub-application B area is the access entrance of sub-application B. Area 304 can be used to display the page content of the main application, and can also be used to display the page content of the sub-application. Optionally, the page 301 of the main application may only include area 303 and area 304.
[0066] As a possible implementation, the current sub-application deployed on the terminal is started, and the main application's entry file is obtained through a preset method. The preset method is used to obtain the main application's entry file from the online (i.e., server). For example, the preset method can be the "await getHtml()" method. For another example, the preset method can be a template function method.
[0067] In one practicable embodiment, before obtaining the main application's entry file, the main application's Uniform Resource Locator (URL) can be obtained. Subsequently, a first request is sent to a server, the first request being used to instruct the server to obtain the main application's entry file, and the first request including the main application's URL. Subsequently, the main application's entry file is received from the server.
[0068] As a possible implementation, the server stores the main application's entry file, and the main application's URL corresponds to the main application's entry file. The server can search for the main application's entry file based on the main application's URL. The server can then send the main application's entry file to the terminal.
[0069] The technical solution provided by the above embodiment provides at least the following beneficial effects: obtaining the main application's Uniform Resource Locator (URL), sending a first request to a server, and receiving the main application's entry file from the server. This allows the terminal to obtain the main application's entry file without launching the main application's project code. This prevents the terminal from simultaneously launching the main application's project code and the sub-application's project code, thus reducing terminal resource usage.
[0070] Optionally, after obtaining the entry file of the main application, the entry file of the main application may be saved to the terminal.
[0071] 202. Replace the entry file of the current sub-application with the entry file of the main application.
[0072] Among them, the entry file of the current sub-application is used to trigger the display of the page of the current sub-application.
[0073] In the embodiment of the present disclosure, the entry file of the current sub-application is compiled from the project code of the current sub-application.
[0074] For example, combined Figure 3 If application A is the current sub-application, the terminal may call the entry file of application A in response to the access operation to application A, and then may display the page of application A in area 304.
[0075] As a possible implementation method, the entry file of the current sub-application can be replaced with the entry file of the main application through the hook function in the preset plug-in, where the hook function is used to replace the entry file of the current sub-application.
[0076] It should be noted that the embodiments of the present disclosure do not limit the preset plug-in. For example, the preset plug-in may be the htmlWebpackPlugin plug-in. For another example, the preset plug-in may be the webpack plug-in.
[0077] For example, the htmlWebpackPlugin plug-in can be used to replace the entry file of the current sub-application with the entry file of the main application through the following code.
[0078]
[0079] Among them, compilation.hooks.htmlWebpackPluginAfterHtmlProcessing.tapAsync is the method called in the htmlWebpackPlugin plug-in mechanism, await getHtml() is the method for obtaining the entry file of the main application, data.html=res means replacing the entry file of the current sub-application with the entry file of the main application, and cb(null,data) means returning the entry file of the main application.
[0080] For example, the webpack plug-in can be used to replace the entry file of the current sub-application with the entry file of the main application through the following code.
[0081]
[0082] Among them, compilation.hooks.additionalAssets.tapAsync is the method called in the webpack plug-in, await getHtml() is the method for obtaining the entry file of the main application, and return res means returning the entry file of the main application.
[0083] In one practicable manner, after the entry file of the current sub-application is replaced with the entry file of the main application, the entry file of the main application is called and the page of the main application is displayed.
[0084] For example, combined Figure 3 , the terminal accesses the local host address (eg, http: / / localhost:8000) through a browser, and the terminal can call the entry file of the main application and display page 301 of the main application.
[0085] The technical solution provided by the above embodiment has at least the following beneficial effects: calling the main application's entry file and displaying the main application's page. This allows the main application's page to be displayed when launching the current sub-application project, allowing developers to experience the process of calling a sub-application in a live environment while in the development environment, thereby ensuring the online stability of the sub-application.
[0086] 203. Trigger the access entry of the target sub-application and call the rendering file of the target sub-application.
[0087] The target sub-application is any sub-application in the at least one sub-application, and the rendering file of the target sub-application is used to render a page of the target sub-application.
[0088] Exemplarily, the at least one sub-application includes: sub-application A, sub-application B, and sub-application C, and the target sub-application can be any one of sub-application A, sub-application B, and sub-application C.
[0089] As a possible implementation, in response to the operation of starting the target sub-application, the access entry of the target sub-application is triggered, and the rendering file of the target sub-application is called. Thereafter, the page of the target sub-application can be displayed.
[0090] For example, combined Figure 3 If the developer inputs an operation to start sub-application A (such as clicking on the area of sub-application A), the access entrance of the target sub-application A can be triggered, and the rendering file of sub-application A can be called. After that, the page of sub-application A can be displayed.
[0091] It should be noted that the rendering file can be a css file, a js file, etc., and the embodiment of the present disclosure is not limited to this.
[0092] The technical solution provided by the above embodiment brings at least the following beneficial effects: obtaining the entry file of the main application, the entry file of the main application is used to trigger the display of the page of the main application, the page of the main application includes at least one access entry of a sub-application, and the at least one sub-application includes the current sub-application. Afterwards, the entry file of the current sub-application is replaced with the entry file of the main application, and the entry file of the current sub-application is used to trigger the display of the page of the current sub-application. In this way, even if the terminal deploys the project of the current sub-application, the page of the main application can still be displayed. Then, the access entry of the target sub-application is triggered, and the rendering file of the target sub-application is called. The rendering file of the target sub-application is used to render the page of the target sub-application, and the target sub-application is any sub-application in the at least one sub-application. In this way, in the development environment, the sub-application (such as the target sub-application) can be called through the main application, which reduces the difference between the development environment and the online environment and improves the stability of the sub-application online.
[0093] In one practicable manner, Figure 4 As shown, before calling the rendering file of the target sub-application, the debugging method of the sub-application may further include steps 401 to 404.
[0094] 401. Determine whether the target sub-application is the current sub-application.
[0095] As a possible implementation method, the access entry of the target sub-application is triggered to determine whether the target sub-application is the current sub-application.
[0096] In one possible design, in response to an operation to launch a target sub-application, the identifier of the target sub-application and the identifier of the current sub-application are obtained. A determination is made as to whether the identifier of the target sub-application is the same as the identifier of the current sub-application. If the identifier of the target sub-application is the same as the identifier of the current sub-application, the target sub-application is determined to be the current sub-application. If the identifier of the target sub-application is different from the identifier of the current sub-application, the target sub-application is determined to be another sub-application.
[0097] The other sub-applications are sub-applications other than the current sub-application in at least one sub-application. For example, if the at least one sub-application includes sub-application A, sub-application B, and sub-application C, and the current sub-application is sub-application A, then the other sub-applications include sub-application B and sub-application C.
[0098] It should be noted that the embodiments of the present disclosure do not limit the identifier of a sub-application. For example, the identifier of a sub-application can be an application name. For another example, the identifier of a sub-application can be a project code name. For another example, the identifier of a sub-application can be a network address.
[0099] For example, if the current sub-application is identified as app1, if the target sub-application is identified as app1, then the target sub-application is determined to be the current sub-application. If the target sub-application is identified as app2, then the target sub-application is determined to be another sub-application.
[0100] In one practicable manner, if the target sub-application is the current sub-application, then steps 402 to 404 are executed. If the target sub-application is another sub-application, then steps 405 to 406 are executed.
[0101] 402. Determine the route of the resource file of the current sub-application from the first routing configuration file.
[0102] In an embodiment of the present disclosure, the terminal stores a first routing configuration file, the first routing configuration file stores the routing of the resource file of the current sub-application, and the resource file stores the routing of the rendering file.
[0103] Optionally, the first routing configuration file can be a json file. The resource file can be a json file
[0104] Exemplarily, the first routing configuration file can be represented by the following code.
[0105] config.plugin('assets-plugin').use(AssetsPlugin,[{filename:'assets.json',path:" / app1"}]).
[0106] Among them, config.plugin('assets-plugin'). indicates a method description of using the plug-in under the webpack tool, filename:'assets.json',path:" / app1" indicates the file named assets.json, and the storage address is / app1.
[0107] 403. According to the route of the resource file of the current sub-application, obtain the route of the rendering file in the resource file of the current sub-application.
[0108] As a possible implementation method, the resource file of the current sub-application is determined based on the route of the resource file of the current sub-application. Then, the route of the rendering file is obtained from the resource file of the current sub-application.
[0109] Exemplarily, the resource file can be implemented by the following code.
[0110] {"version":1,
[0111] "js":["chunk1.js","chunk2.js","app.js"],
[0112] "css":["chunk1.css","chunk2.css","app.css"]}.
[0113] Among them, version indicates the file version, js and css indicate the storage address of the specific rendering file.
[0114] In one practicable manner, calling the rendering file of the target sub-application includes step 404 .
[0115] 404. Call the rendering file of the current sub-application according to the route of the rendering file of the current sub-application.
[0116] For example, if the rendering files of the current sub-application include chunk1.js, chunk2.js, and chunk1.css, the terminal calls the rendering files according to the routing of the rendering files to render the page of the current sub-application.
[0117] The technical solution provided by the above embodiment provides at least the following beneficial effects: If the target sub-application is the current sub-application, the current sub-application's rendering file can be retrieved locally through the current sub-application's rendering file routing and then called. This allows the current sub-application to be called from the main application, not only allowing debugging of the current sub-application but also reducing the differences between the development environment and the production environment, improving the sub-application's online stability.
[0118] In one practicable manner, if the target sub-application is the current sub-application, after triggering the access entry of the target sub-application and calling the rendering file of the target sub-application, the page of the main application and the page of the current sub-application are displayed.
[0119] For example, combined Figure 3 After triggering the access entry of sub-application A and calling the rendering file of sub-application A, page 301 of the main application is displayed, and the page of sub-application A is displayed in area 304.
[0120] The technical solution provided by the above embodiment has at least the following beneficial effects: Displaying the main application page and the current sub-application page. This allows developers to call the current sub-application from the main application, which not only allows debugging of the current sub-application but also reduces the difference between the development environment and the production environment, improving the online stability of the sub-application.
[0121] 405. Get rendering files of other sub-applications.
[0122] As a possible implementation method, the terminal can download rendering files of other sub-applications from online.
[0123] In one practicable embodiment, before obtaining files for other sub-applications, the terminal sends a second request to the server, the second request being used to instruct the server to obtain resource files for the other sub-applications, the second request including a route to the resource files for the other sub-applications. The server may receive the second request and determine the resource files for the other sub-applications based on the route to the resource files for the other sub-applications.
[0124] In an embodiment of the present disclosure, the terminal stores a second routing configuration file, which stores routings of resource files of other sub-applications, and the resource files of other sub-applications store routings of rendering files of other sub-applications.
[0125] Optionally, the routes to resource files of other sub-applications include the URL of the main application.
[0126] Exemplarily, the second routing configuration file is represented by the following code.
[0127]
[0128] Among them, config.plugin('dev-plugin'). indicates that the method in the webpack construction tool is used, html indicates the address of the entry file of the main application, and assetMaps indicates the address of the entry file of other sub-applications.
[0129] Afterwards, the server may send resource files of other sub-applications to the terminal, and the terminal receives the resource files of other sub-applications from the server. Afterwards, the terminal sends a third request to the server, the third request being used to instruct to obtain rendering files of other sub-applications, and the third request including the route of the rendering files of other sub-applications.
[0130] For example, if the other sub-application is sub-application B, the terminal can download the resource file of sub-application B from the server by triggering the access entrance of sub-application B. Afterwards, the terminal downloads the rendering file of sub-application B from the server according to the routing of the rendering file in the resource file of sub-application B.
[0131] It should be noted that the rendering files obtained from the server are the rendering files of other sub-applications in the online environment. Therefore, the rendering files of other sub-applications are more stable and less likely to have problems.
[0132] In the embodiment of the present disclosure, obtaining rendering files of other sub-applications includes: receiving rendering files of other sub-applications from a server.
[0133] The technical solution provided by the above embodiment brings at least the following beneficial effects: sending a second request to the server, the second request is used to instruct the acquisition of resource files of other sub-applications, and the second request includes the routing of the resource files of other sub-applications. Receive resource files of other sub-applications from the server. Sending a third request to the server, the third request is used to instruct the acquisition of rendering files of other sub-applications, and the third request includes the routing of the rendering files of other sub-applications. Receive rendering files of other sub-applications from the server. In this way, the terminal can obtain rendering files of other sub-applications from the server, reducing the difference between the development environment and the online environment, and improving the stability of the sub-application online.
[0134] In one practicable manner, calling the rendering file of the target sub-application includes step 406 .
[0135] 406. Call rendering files of other sub-applications.
[0136] The technical solution provided by the above embodiment brings at least the following beneficial effects: when the target sub-application is another sub-application, the rendering files of the other sub-application are obtained and called. In this way, even if the terminal deploys the project of the current sub-application, the rendering files of other sub-applications can still be called.
[0137] In one practicable manner, if the target sub-application is another sub-application, after triggering the access entry of the target sub-application and calling the rendering file of the target sub-application, the page of the main application and the page of the other sub-application are displayed.
[0138] For example, combined Figure 3 If the other sub-application is sub-application B, after triggering the access entry of sub-application B and calling the rendering file of sub-application B, the page 301 of the main application is displayed, and the page of sub-application B is displayed in area 304.
[0139] The technical solution provided by the above embodiment brings at least the following beneficial effects: displaying the main application page and the pages of other sub-applications. This ensures that developers can view the pages of other sub-applications while developing the current sub-application, facilitating debugging between the current sub-application and other sub-applications, and further improving the online stability of the sub-applications.
[0140] It is understandable that the above method can be implemented by the debugging device of the sub-application. In order to implement the above functions, the debugging device of the sub-application includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the modules and algorithm steps of each example described in the embodiments disclosed herein, the embodiments of the present disclosure can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the embodiments of the present disclosure.
[0141] The embodiments of the present disclosure can divide the debugging device of the above-mentioned sub-application into functional modules according to the above-mentioned method example. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiments of the present disclosure is schematic and is only a logical functional division. There may be other division methods in actual implementation.
[0142] Figure 5 FIG. 1 is a structural block diagram of a sub-application debugging device according to an exemplary embodiment. Figure 5 The sub-application debugging device 50 includes a receiving unit 51 , a processing unit 52 , a sending unit 53 and a display unit 54 .
[0143] The receiving unit 51 is configured to execute the acquisition of the entry file of the main application, the entry file of the main application is used to trigger the display of the page of the main application, the page of the main application includes at least one access entry of a sub-application, and the at least one sub-application includes the current sub-application. The processing unit 52 is configured to execute the replacement of the entry file of the current sub-application with the entry file of the main application, the entry file of the current sub-application is used to trigger the display of the page of the current sub-application. The processing unit 52 is also configured to execute the triggering of the access entry of the target sub-application, call the rendering file of the target sub-application, the rendering file of the target sub-application is used to render the page of the target sub-application, and the target sub-application is any sub-application among the at least one sub-application.
[0144] Optionally, the processing unit 52 is further configured to obtain the uniform resource locator (URL) of the main application. The sending unit 53 is configured to send a first request to the server, the first request being used to instruct the server to obtain the entry file of the main application, the first request including the URL of the main application. The receiving unit 51 is specifically configured to receive the entry file of the main application from the server.
[0145] Optionally, the display unit 54 is configured to execute an entry file for calling the main application and display a page of the main application.
[0146] Optionally, the terminal stores a first routing configuration file, the first routing configuration file stores the routing of the resource file of the current sub-application, and the resource file stores the routing of the rendering file. The processing unit 52 is further configured to determine the routing of the resource file of the current sub-application from the first routing configuration file if the target sub-application is the current sub-application. The receiving unit 51 is further configured to execute the routing based on the resource file of the current sub-application and obtain the routing of the rendering file in the resource file of the current sub-application. The processing unit 52 is specifically configured to execute the routing based on the rendering file of the current sub-application and call the rendering file of the current sub-application.
[0147] Optionally, at least one sub-application further includes other sub-applications, where the other sub-applications are sub-applications other than the current sub-application in the at least one sub-application. The receiving unit 51 is further configured to, if the target sub-application is another sub-application, obtain rendering files for the other sub-applications. The processing unit 52 is specifically configured to execute the call to the rendering files of the other sub-applications.
[0148] Optionally, the terminal stores a second routing configuration file, the second routing configuration file stores the routes of resource files of other sub-applications, and the resource files of other sub-applications store the routes of rendering files of other sub-applications. The sending unit 53 is also configured to execute sending a second request to the server, the second request is used to indicate the acquisition of resource files of other sub-applications, and the second request includes the routes of resource files of other sub-applications. The receiving unit 51 is also configured to execute receiving resource files of other sub-applications from the server. The sending unit 53 is also configured to execute sending a third request to the server, the third request is used to indicate the acquisition of rendering files of other sub-applications, and the third request includes the routes of rendering files of other sub-applications. The receiving unit 51 is specifically configured to execute receiving rendering files of other sub-applications from the server.
[0149] Optionally, the display unit 54 is further configured to display the page of the main application and the page of the current sub-application.
[0150] Optionally, the display unit 54 is further configured to display the page of the main application and the pages of other sub-applications.
[0151] Regarding the debugging device for the sub-application in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated on here.
[0152] Figure 6 Schematic diagram of a sub-application debugging device 60 provided by the present disclosure. Figure 6The sub-application debugging device 60 may include at least one processor 601 and a memory 603 for storing instructions executable by the processor 601. The processor 601 is configured to execute the instructions in the memory 603 to implement the sub-application debugging method in the above embodiment.
[0153] In addition, the sub-application debugging device 60 may further include a communication bus 602 and at least one communication interface 604 .
[0154] The processor 601 may be a GPU, a microprocessing unit, an ASIC, or one or more integrated circuits for controlling the execution of the program of the disclosed solution.
[0155] The communication bus 602 may include a pathway for transmitting information between the aforementioned components.
[0156] The communication interface 604 uses any transceiver or other device for communicating with other devices or communication networks, such as Ethernet, radio access network (RAN), wireless local area network (WLAN), etc.
[0157] The memory 603 may be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (RAM) or other type of dynamic storage device that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, an optical disc storage (including a compact disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory may exist independently and be connected to the processing unit via a bus. The memory may also be integrated with the processing unit and be a volatile storage medium in the GPU.
[0158] The memory 603 is used to store instructions for executing the solution of the present disclosure, and the execution is controlled by the processor 601. The processor 601 is used to execute the instructions stored in the memory 603, thereby realizing the functions of the method of the present disclosure.
[0159] In a specific implementation, as an embodiment, the processor 601 may include one or more GPUs, such as Figure 6 GPU0 and GPU1 in .
[0160] In a specific implementation, as an embodiment, the sub-application debugging device 60 may include multiple processors, such as Figure 6 6 and 607. Each of these processors can be a single-core (single-CPU) processor or a multi-core (multi-GPU) processor. A processor herein can refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions).
[0161] In a specific implementation, as an embodiment, the debugging device 60 of the sub-application may further include an output device 605 and an input device 606. The output device 605 communicates with the processor 601 and may display information in a variety of ways. For example, the output device 605 may be a liquid crystal display (LCD), a light emitting diode (LED) display device, a cathode ray tube (CRT) display device, or a projector. The input device 606 communicates with the processor 601 and may receive user input in a variety of ways. For example, the input device 606 may be a mouse, a keyboard, a touch screen device, or a sensor device.
[0162] Those skilled in the art will understand that Figure 6 The structure shown in the figure does not constitute a limitation on the debugging device 60 of the sub-application, and may include more or fewer components than shown in the figure, or combine certain components, or adopt a different component arrangement.
[0163] The present disclosure further provides a computer-readable storage medium having instructions stored thereon. When the instructions in the storage medium are executed by a processor of a terminal, the terminal is enabled to execute the group communication method provided by the above-mentioned embodiment of the present disclosure.
[0164] The embodiments of the present disclosure also provide a computer program product containing instructions, which, when executed on a terminal, enables the terminal to execute the sub-application debugging method provided by the embodiments of the present disclosure.
[0165] Other embodiments of the present disclosure will readily occur to those skilled in the art after considering the specification and practicing the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, with the true scope and spirit of the present disclosure being indicated by the following claims.
[0166] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes can be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A method for debugging a sub-application, characterized in that: The method is applied to a terminal in which a current sub-application is deployed; the terminal stores a first routing configuration file, the first routing configuration file stores a route of a resource file of the current sub-application, and the resource file stores a route of a rendering file; the method comprises: Obtaining an entry file of a main application, wherein the entry file of the main application is used to trigger display of a page of the main application, wherein the page of the main application includes an access entry of at least one sub-application, and the at least one sub-application includes the current sub-application; Replace the entry file of the current sub-application with the entry file of the main application, wherein the entry file of the current sub-application is used to trigger the display of the page of the current sub-application; Triggering the access entry of the target sub-application, and if the target sub-application is the current sub-application, determining the route of the resource file of the current sub-application from the first routing configuration file; According to the route of the resource file of the current sub-application, obtain the route of the rendering file in the resource file of the current sub-application; Calling the rendering file of the current sub-application according to the route of the rendering file of the current sub-application, wherein the rendering file of the current sub-application is used to render the page of the target sub-application, wherein the target sub-application is any sub-application in the at least one sub-application; wherein the at least one sub-application further includes other sub-applications, and the other sub-applications are sub-applications in the at least one sub-application other than the current sub-application; If the target sub-application is the other sub-application, obtaining a rendering file of the other sub-application; The rendering file of the other sub-application is called, and the rendering file of the other sub-application is used to render the page of the target sub-application.
2. The method according to claim 1, characterized in that Before obtaining the entry file of the main application, it includes: Obtain the uniform resource locator URL of the main application; Sending a first request to the server, where the first request is used to instruct to obtain an entry file of the main application, and the first request includes a URL of the main application; The step of obtaining the entry file of the main application includes: Receive the entry file of the main application sent from the server.
3. The method according to claim 1 or 2, characterized in that: After replacing the entry file of the current sub-application with the entry file of the main application, the method further includes: The entry file of the main application is called to display the page of the main application.
4. The method according to claim 1, characterized in that The terminal stores a second routing configuration file, wherein the second routing configuration file stores the routing of the resource files of the other sub-applications, and the resource files of the other sub-applications store the routing of the rendering files of the other sub-applications; Before obtaining the rendering files of the other sub-applications, the method further includes: Sending a second request to the server, where the second request is used to instruct to obtain the resource files of the other sub-applications, and the second request includes the route of the resource files of the other sub-applications; Receiving resource files of the other sub-applications from the server; Sending a third request to the server, where the third request is used to instruct to obtain the rendering file of the other sub-application, and the third request includes the route of the rendering file of the other sub-application; Obtain rendering files of the other sub-applications, including: Receive rendering files of the other sub-applications from the server.
5. The method according to claim 1, characterized in that After triggering the access entry of the target sub-application and calling the rendering file of the target sub-application, the method further includes: The page of the main application and the page of the current sub-application are displayed.
6. The method according to claim 4, characterized in that After triggering the access entry of the target sub-application and calling the rendering file of the target sub-application, the method further includes: The page of the main application and the pages of the other sub-applications are displayed.
7. A debugging device for a sub-application, characterized in that: The device is applied to a terminal, in which a current sub-application is deployed, and a first routing configuration file is stored in the terminal, wherein the first routing configuration file stores a routing of a resource file of the current sub-application, and the resource file stores a routing of a rendering file; the device comprises: A receiving unit is configured to execute acquisition of an entry file of a main application, wherein the entry file of the main application is used to trigger display of a page of the main application, wherein the page of the main application includes an access entry of at least one sub-application, and the at least one sub-application includes the current sub-application; A processing unit, configured to replace an entry file of the current sub-application with an entry file of the main application, wherein the entry file of the current sub-application is used to trigger display of a page of the current sub-application; The processing unit is further configured to execute the access entry of the triggering target sub-application, and if the target sub-application is the current sub-application, determine the route of the resource file of the current sub-application from the first routing configuration file; The receiving unit is further configured to execute a route of a rendering file in the resource file of the current sub-application according to the route of the resource file of the current sub-application; The processing unit is specifically configured to execute routing according to the rendering file of the current sub-application, call the rendering file of the current sub-application, the rendering file of the current sub-application is used to render the page of the target sub-application, and the target sub-application is any sub-application in the at least one sub-application; wherein the at least one sub-application also includes other sub-applications, and the other sub-applications are sub-applications in the at least one sub-application other than the current sub-application; The receiving unit is further configured to execute, if the target sub-application is the other sub-application, obtaining a rendering file of the other sub-application; The processing unit is specifically configured to execute and call the rendering file of the other sub-application, and the rendering file of the other sub-application is used to render the page of the target sub-application.
8. The sub-application debugging device according to claim 7, characterized in that: The device comprises a sending unit; The processing unit is further configured to execute obtaining a uniform resource locator URL of the main application; The sending unit is configured to execute sending a first request to the server, where the first request is used to instruct to obtain an entry file of the main application, and the first request includes a URL of the main application; The receiving unit is specifically configured to receive the entry file of the main application sent from the server.
9. The sub-application debugging device according to claim 7 or 8, characterized in that: The device comprises a display unit; The display unit is configured to execute and call the entry file of the main application and display the page of the main application.
10. The sub-application debugging device according to claim 7, characterized in that: The terminal stores a second routing configuration file, wherein the second routing configuration file stores the routing of the resource files of the other sub-applications, and the resource files of the other sub-applications store the routing of the rendering files of the other sub-applications; The sending unit is further configured to execute sending a second request to the server, where the second request is used to instruct to obtain the resource files of the other sub-applications, and the second request includes the route of the resource files of the other sub-applications; The receiving unit is further configured to execute receiving resource files of the other sub-applications from the server; The sending unit is further configured to execute sending a third request to the server, wherein the third request is used to instruct to obtain the rendering file of the other sub-application, and the third request includes the route of the rendering file of the other sub-application; The receiving unit is specifically configured to receive rendering files of the other sub-applications from the server.
11. The sub-application debugging device according to claim 9, characterized in that: The display unit is further configured to display the page of the main application and the page of the current sub-application.
12. The sub-application debugging device according to claim 10, characterized in that: The display unit is configured to display the page of the main application and the pages of the other sub-applications.
13. A terminal, characterized in that: The terminal comprises: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the sub-application debugging method as described in any one of claims 1-6.
14. A computer-readable storage medium having instructions stored thereon, characterized in that: When the instructions in the computer-readable storage medium are executed by a processor of a terminal, the terminal is enabled to execute the debugging method of a sub-application as described in any one of claims 1 to 6.
15. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the debugging method of the sub-application according to any one of claims 1 to 6 is implemented.
