Debugging method and device and computer equipment

By obtaining and converting the debugging data of the native page, online debugging of the native page in the application software is realized, which solves the problem of cumbersome debugging process and the inability to display data on the H5 page, and improves debugging efficiency and portability.

CN118779202APending Publication Date: 2024-10-15BEIJING WODONG TIANJUN INFORMATION TECH CO LTD +1
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202310354956.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-04-04
Publication Date
2024-10-15

AI Technical Summary

Technical Problem

In the existing technology, the debugging process of the native page is cumbersome, which affects the debugging efficiency. Especially when the network is disconnected, the H5 page cannot display data, making debugging difficult.

Method used

By obtaining the initial debugging data of the page to be debugged and performing data format conversion and protocol conversion, online debugging of the native page is achieved, improving debugging portability and efficiency.

Benefits of technology

Realize online debugging of native pages in application software in a production environment, significantly improving debugging efficiency and portability, adapting to different functional modules and data formats, and ensuring the robustness and functionality of the debugging process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118779202A_ABST
    Figure CN118779202A_ABST
Patent Text Reader

Abstract

The invention provides a debugging method and device and computer equipment, and the method comprises the steps: if a to-be-debugged page in an application program is a native page, obtaining initial debugging data of the to-be-debugged page, carrying out the data format conversion of the initial debugging data to obtain first debugging data, and debugging the to-be-debugged page according to the first debugging data, therefore, online debugging of the native page in the application software can be achieved in the production environment, the portability of the native page debugging process is effectively improved, and the debugging efficiency is greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a debugging method, device and computer equipment. Background Art

[0002] With the rapid development and application of applications, debugging technology is an indispensable technology. The current application pages can be divided into native pages and H5 pages. Among them, native pages are pages developed based on the native system kernel and can be operated directly on the system; H5 pages are pages developed based on HTML5 technology, which need to pull data from the server and cannot display data when the network is disconnected.

[0003] In the related art, a specific debugging environment is required when debugging a native page, which makes the debugging process more complicated and affects the debugging efficiency. Summary of the invention

[0004] The present disclosure aims to solve one of the technical problems in the related art at least to some extent.

[0005] To this end, the purpose of the present disclosure is to propose a debugging method, apparatus, computer device, storage medium and computer program product, thereby enabling online debugging of native pages in application software in a production environment, so as to effectively improve the portability of the native page debugging process and significantly improve the debugging efficiency.

[0006] The debugging method proposed in the first aspect of the embodiment of the present disclosure includes: if the page to be debugged in the application is a native page, obtaining initial debugging data of the page to be debugged; performing data format conversion on the initial debugging data to obtain first debugging data; and debugging the page to be debugged according to the first debugging data to obtain a first debugging result.

[0007] The debugging method proposed in the embodiment of the first aspect of the present disclosure obtains initial debugging data of the page to be debugged when the page to be debugged in the application is a native page, performs data format conversion on the initial debugging data to obtain first debugging data, and debugs the page to be debugged according to the first debugging data to obtain a first debugging result. Thus, online debugging of native pages in application software can be implemented in a production environment, so as to effectively improve the portability of the native page debugging process and significantly improve the debugging efficiency.

[0008] The debugging device provided in the second embodiment of the present disclosure includes:

[0009] A first acquisition module, used for acquiring initial debugging data of the page to be debugged when the page to be debugged in the application is a native page;

[0010] A processing module, configured to perform data format conversion on the initial debugging data to obtain first debugging data;

[0011] The first debugging module is used to debug the page to be debugged according to the first debugging data to obtain a first debugging result.

[0012] The debugging device proposed in the second aspect of the embodiment of the present disclosure obtains initial debugging data of the page to be debugged when the page to be debugged in the application is a native page, converts the data format of the initial debugging data to obtain first debugging data, and debugs the page to be debugged according to the first debugging data to obtain a first debugging result. As a result, online debugging of native pages in application software can be implemented in a production environment, so as to effectively improve the portability of the native page debugging process and significantly improve the debugging efficiency.

[0013] The computer device proposed in the third aspect embodiment of the present disclosure includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the program, the debugging method proposed in the first aspect embodiment of the present disclosure is implemented.

[0014] The fourth aspect embodiment of the present disclosure proposes a non-temporary computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, the debugging method proposed in the first aspect embodiment of the present disclosure is implemented.

[0015] The fifth aspect of the present disclosure provides a computer program product. When instructions in the computer program product are executed by a processor, the debugging method provided in the first aspect of the present disclosure is performed.

[0016] Additional aspects and advantages of the present disclosure will be given in part in the following description and in part will be obvious from the following description or learned through practice of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The above and / or additional aspects and advantages of the present disclosure will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:

[0018] Figure 1 is a flowchart of a debugging method proposed in an embodiment of the present disclosure;

[0019] Figure 2 is a flowchart of a debugging method proposed in another embodiment of the present disclosure;

[0020] Figure 3 is a flowchart of a debugging method proposed in another embodiment of the present disclosure;

[0021] Figure 4is a flowchart of a debugging method proposed in another embodiment of the present disclosure;

[0022] Figure 5 is a structural schematic diagram of a debugging system proposed according to the present disclosure;

[0023] Figure 6 It is a schematic diagram of the use process of a debugging system proposed in an embodiment of the present disclosure;

[0024] Figure 7 is a schematic diagram of a workflow of a debugging system proposed in an embodiment of the present disclosure;

[0025] Figure 8 is a structural diagram of a debugging device proposed in an embodiment of the present disclosure;

[0026] Fig. 9 is a structural schematic diagram of a debugging device proposed in another embodiment of the present disclosure;

[0027] Fig.10 A block diagram of an exemplary computer device suitable for implementing embodiments of the present disclosure is shown. DETAILED DESCRIPTION

[0028] Embodiments of the present disclosure are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present disclosure, and are not to be construed as limitations of the present disclosure. On the contrary, the embodiments of the present disclosure include all changes, modifications, and equivalents that fall within the spirit and connotation of the appended claims.

[0029] Figure 1 It is a flowchart of a debugging method proposed in an embodiment of the present disclosure.

[0030] It should be noted that the executor of the debugging method of this embodiment is a debugging device, which can be implemented by software and / or hardware. The device can be configured in a computer device, and the computer device can include but is not limited to a terminal, a server, etc. For example, the terminal can be a mobile phone, a handheld computer, etc.

[0031] like Figure 1 As shown, the debugging method includes:

[0032] S101: If the page to be debugged in the application is a native page, initial debugging data of the page to be debugged is obtained.

[0033] The page to be debugged refers to a page in the application that is waiting to be debugged.

[0034] Among them, native pages refer to pages developed using the native system kernel and can be operated directly on the system.

[0035] The debugging data refers to data in the application that can be used to implement the debugging function, such as log data of the application, etc. The initial debugging data refers to the obtained unprocessed debugging data.

[0036] That is, based on the debugging method proposed in the embodiment of the present disclosure, a native page can be used as a page to be debugged in the production environment of an application, and initial debugging data of the page to be debugged can be obtained.

[0037] S102: Convert the data format of the initial debugging data to obtain first debugging data.

[0038] The first debugging data refers to debugging data obtained by performing data format conversion on the initial debugging data.

[0039] In the disclosed embodiment, the data format of the initial debugging data may be, for example, a string String, an object Object, and an array Array, etc., without limitation, and the data format conversion of the initial debugging data may refer to the mutual conversion between data formats such as String, Object, and Array.

[0040] It is understandable that the initial debugging data obtained in the embodiments of the present disclosure may be in any data format, and debugging data in different formats may affect subsequent debugging effects. Therefore, in the embodiments of the present disclosure, when the initial debugging data is converted into a data format to obtain first debugging data, the debugging process can be adapted to personalized application scenarios to ensure the practicality of the obtained first debugging data.

[0041] S103: Debugging the page to be debugged according to the first debugging data to obtain a first debugging result.

[0042] The first debugging result refers to a debugging result obtained by debugging the native page based on the first debugging data.

[0043] In the present embodiment, when the page to be debugged in the application is a native page, initial debugging data of the page to be debugged is obtained, the data format of the initial debugging data is converted to obtain first debugging data, and the page to be debugged is debugged according to the first debugging data to obtain a first debugging result. Thus, online debugging of native pages in application software can be implemented in a production environment, so as to effectively improve the portability of the native page debugging process and significantly improve the debugging efficiency.

[0044] Figure 2 It is a flowchart of a debugging method proposed in another embodiment of the present disclosure.

[0045] like Figure 2 As shown, the debugging method includes:

[0046] S201: If the page to be debugged in the application is a native page, initial debugging data of the page to be debugged is obtained.

[0047] S202: Convert the data format of the initial debugging data to obtain first debugging data.

[0048] The description of S201 and S202 can be specifically referred to the above embodiment, which will not be repeated here.

[0049] S203: Perform protocol conversion on the first debugging data according to a preset transmission protocol to obtain third debugging data.

[0050] The preset transmission protocol refers to the transmission protocol configured for data transmission between different functional modules during the debugging process.

[0051] The third debugging data refers to debugging data obtained by performing protocol conversion on the first debugging data according to a preset transmission protocol.

[0052] It is understandable that the execution subject of the embodiment of the present disclosure may include multiple functional modules, wherein the functional module for obtaining the first debugging data and the functional module for subsequently debugging the debugging page according to the first debugging data may not be the same functional module. Different functional modules may have different data transmission interface types. In the embodiment of the present disclosure, when the first debugging data is converted according to the preset transmission protocol to obtain the third debugging data, the reliability of the transmission of the first debugging data between different functional modules during the debugging process can be guaranteed.

[0053] S204: Perform protocol conversion on the third debugging data according to the first interface protocol to obtain fourth debugging data.

[0054] The first interface protocol may refer to a protocol supported by a data input / output interface in a module that performs a debugging function in an embodiment of the present disclosure.

[0055] The fourth debugging data refers to debugging data obtained by performing protocol conversion on the third debugging data according to the first interface protocol.

[0056] In the disclosed embodiment, when the third debugging data is converted according to the first interface protocol to obtain the fourth debugging data, localized conversion of the third debugging data can be achieved, which can effectively improve the applicability of the obtained fourth debugging data.

[0057] S205: Debug the page to be debugged according to the fourth debugging data to obtain a first debugging result.

[0058] That is to say, in the embodiment of the present disclosure, after the data format of the initial debugging data is converted to obtain the first debugging data, the first debugging data can be converted into a protocol according to a preset transmission protocol to obtain third debugging data, the third debugging data can be converted into a protocol according to the first interface protocol to obtain fourth debugging data, and the page to be debugged can be debugged according to the fourth debugging data to obtain a first debugging result. In this way, localized conversion of the first debugging data can be achieved, which can effectively improve the robustness of the debugging process.

[0059] S206: If the page to be debugged is a non-native page, obtain page log data of the page to be debugged.

[0060] Among them, non-native pages can refer to pages developed based on the H5 framework in the application.

[0061] The page log data may refer to a record file or a set of files used to record operation events in the above-mentioned non-native page.

[0062] In the disclosed embodiment, when obtaining the page log data of the non-native page, the console method of JS may be hooked to obtain the content of the console.log() of JS as the above page log data.

[0063] For example, in the embodiments of the present disclosure, corresponding page log data acquisition methods can be adopted according to different application environments. For example, Android can monitor the WebView console messages to obtain the above-mentioned page log data by extending the Web Chrome Client and rewriting the on Console Message method; iOS can monitor the WebView console messages through JS Context to obtain the above-mentioned page log data, and there is no restriction on this.

[0064] S207: Debugging the page to be debugged according to the page log data to obtain a second debugging result.

[0065] The second debugging result refers to the debugging result obtained by debugging the non-native page using the page log data.

[0066] That is to say, in the embodiment of the present disclosure, if the page to be debugged is a non-native page, the page log data of the page to be debugged can be obtained, and the page to be debugged can be debugged according to the page log data to obtain a second debugging result. Thus, the debugging of the non-native page can be implemented during the debugging process, which can effectively improve the functionality of the debugging method.

[0067] S208: Obtain first instruction information.

[0068] The first instruction information refers to instruction information acquired by the execution subject of the embodiment of the present disclosure and used to indicate the display status of the first display interface and / or the second display interface.

[0069] In the embodiment of the present disclosure, the first instruction information may be obtained based on different functional modules, and there is no limitation to this.

[0070] S209: Perform protocol conversion on the first instruction information according to a preset transmission protocol to obtain second instruction information.

[0071] The second instruction information refers to the instruction information obtained by performing protocol conversion on the first instruction information according to a preset transmission protocol.

[0072] It can be understood that in the embodiment of the present disclosure, obtaining the first instruction information and executing the first instruction information may be different functional modules respectively. When the first instruction information is converted according to the preset transmission protocol to obtain the second instruction information, the reliability of the transmission of the obtained second instruction information between different functional modules can be guaranteed.

[0073] S210: Perform protocol conversion on the second instruction information according to the second interface protocol to obtain third instruction information.

[0074] Among them, the second interface protocol may refer to the interface protocol supported by the data input / output interface in the functional module that controls the display status of the first display interface and / or the second display interface in the embodiment of the present disclosure.

[0075] The third instruction information refers to instruction information obtained by performing protocol conversion on the second instruction information according to the second interface protocol.

[0076] In the disclosed embodiment, when the second instruction information is converted according to the second interface protocol to obtain the third instruction information, localized conversion of the second instruction information can be achieved, which can effectively improve the indication accuracy of the obtained third instruction information.

[0077] S211: According to the third instruction information, control the display status of the first display interface and / or the second display interface, wherein the first display interface is used to display the first debugging result, and the second display interface is used to display the second debugging result.

[0078] The display state may be, for example, an open state, a hidden state, or a closed state, and there is no limitation on this.

[0079] That is to say, in the embodiment of the present disclosure, after obtaining the first debugging result and / or the second debugging result, the first instruction information can be obtained, the first instruction information can be converted into a protocol according to a preset transmission protocol to obtain the second instruction information, the second instruction information can be converted into a protocol according to the second interface protocol to obtain the third instruction information, and according to the third instruction information, the display status of the first display interface and / or the second display interface can be controlled, wherein the first display interface is used to display the first debugging result, and the second display interface is used to display the second debugging result. Thus, the display status of the first debugging result and the second debugging result can be flexibly controlled based on the first instruction information, which can effectively improve the practicality of the debugging method.

[0080] In this embodiment, by performing protocol conversion on the first debugging data according to the preset transmission protocol to obtain the third debugging data, performing protocol conversion on the third debugging data according to the first interface protocol to obtain the fourth debugging data, and debugging the page to be debugged according to the fourth debugging data to obtain the first debugging result, the localized conversion of the first debugging data can be realized, which can effectively improve the robustness of the debugging process. By obtaining the page log data of the page to be debugged when the page to be debugged is a non-native page, and debugging the page to be debugged according to the page log data to obtain the second debugging result, the debugging of the non-native page can be realized during the debugging process, which can effectively improve the functionality of the debugging method. By obtaining the first instruction information, performing protocol conversion on the first instruction information according to the preset transmission protocol to obtain the second instruction information, performing protocol conversion on the second instruction information according to the second interface protocol to obtain the third instruction information, and controlling the display state of the first display interface and / or the second display interface according to the third instruction information, wherein the first display interface is used to display the first debugging result, and the second display interface is used to display the second debugging result, thereby, the display state of the first debugging result and the second debugging result can be flexibly controlled based on the first instruction information, which can effectively improve the practicality of the debugging method.

[0081] Optionally, the embodiment of the present disclosure further provides a debugging method, wherein the native page includes at least one of the following:

[0082] A first native page, wherein the first native page is a native page in the application;

[0083] The second native page is a native page in a software development kit related to the application.

[0084] That is to say, the debugging method proposed in the embodiment of the present disclosure can debug the native pages in the application and the native pages in the software development kit related to the application, so as to quickly locate the problems in the third-party component access process, which can effectively improve the debugging efficiency and reduce the communication cost.

[0085] Figure 3 It is a flowchart of a debugging method proposed in another embodiment of the present disclosure.

[0086] like Figure 3 As shown, the debugging method includes:

[0087] S301: If the page to be debugged in the application is a native page, initial debugging data of the page to be debugged is obtained.

[0088] S302: Convert the data format of the initial debugging data to obtain first debugging data.

[0089] S303: Debug the page to be debugged according to the first debugging data to obtain a first debugging result.

[0090] The description of S301 - S303 can be specifically referred to the above embodiment, which will not be repeated here.

[0091] S304: Determine first display requirement information corresponding to the first debugging result.

[0092] The first display requirement information refers to requirement information for the display process of the first debugging result.

[0093] S305: Determine first interface layout information according to the first display requirement information.

[0094] The first interface layout information refers to information generated based on the first display requirement information and used to initialize the corresponding display interface.

[0095] S306: Generate a first display interface based on the first interface layout information.

[0096] The first display interface refers to an initialization interface generated for the first debugging result, and can be used to display the first debugging result.

[0097] S307: Based on the first display interface, display the first debugging result.

[0098] In this embodiment, by determining the first display requirement information corresponding to the first debugging result, and determining the first interface layout information based on the first display requirement information, generating the first display interface based on the first interface layout information, and displaying the first debugging result based on the first display interface, it is possible to implement a customized layout of the first display interface based on the first display adjustment information, thereby effectively improving the display effect of the first debugging result.

[0099] Figure 4 It is a flowchart of a debugging method proposed in another embodiment of the present disclosure.

[0100] like Figure 4 As shown, the debugging method includes:

[0101] S401: If the page to be debugged is a non-native page, obtain page log data of the page to be debugged.

[0102] S402: Debugging the page to be debugged according to the page log data to obtain a second debugging result.

[0103] The description of S401 and S402 can be specifically referred to the above embodiment, which will not be repeated here.

[0104] S403: Determine second display requirement information corresponding to the second debugging result.

[0105] The second display requirement information refers to requirement information for the display process of the second debugging result.

[0106] S404: Determine second interface layout information according to the second display requirement information.

[0107] The second interface layout information refers to information generated based on the second display requirement information and used to initialize the corresponding display interface.

[0108] S405: Generate a second display interface based on the second interface layout information.

[0109] The second display interface refers to an initialization interface generated for the second debugging result, and can be used to display the second debugging result.

[0110] S406: Based on the second display interface, display the second debugging result.

[0111] In this embodiment, by determining the second display requirement information corresponding to the second debugging result, determining the second interface layout information according to the second display requirement information, generating a second display interface based on the second interface layout information, and displaying the second debugging result based on the second display interface, a customized layout of the second display interface can be achieved based on the second display adjustment information, thereby effectively improving the display effect of the second debugging result.

[0112] For example, Figure 5 As shown, Figure 5 It is a structural schematic diagram of a debugging system proposed according to the present disclosure.

[0113] The debugging system 50 can be used as the execution subject of the debugging method in the above embodiment, such as Figure 5As shown, the debugging system 50 includes: a data processing unit 501 and a debugging unit 502; wherein the data processing unit 501 is used to obtain the initial debugging data of the native page of the application and convert the data format of the initial debugging data to obtain the first debugging data; the debugging unit 502 is used to debug the native page according to the first debugging data to obtain the first debugging result.

[0114] The data processing unit 501 may be a functional module developed based on a native framework in the debugging system 50 , and may serve as a data transfer station in the debugging system 50 , responsible for data reception and data processing.

[0115] The debugging unit 502 may be a functional module developed based on the H5 framework in the debugging system 50, which may receive debugging data from the data processing unit 501 in the debugging system 50 and complete the debugging function for the application software.

[0116] For example, the debugging unit 502 in the embodiment of the present disclosure may implement functions such as searching, clearing, copying, and hiding.

[0117] In some embodiments of the present disclosure, the debugging unit 502 is also used to display the first debugging result, so that the debugging system can display the first debugging result to the user in real time, so that the user can locate the problem and take corresponding processing measures for the first debugging result in time.

[0118] In some embodiments of the present disclosure, Figure 5 As shown, the debugging system 50 also includes: a starting unit 503; wherein the starting unit 503 is used to adjust the control parameter of the data processing unit 501 from a first parameter value to a second parameter value, the first parameter value is used to control the debugging unit 502 to be in a closed state, and the second parameter value is used to control the debugging unit 502 to be in an open state, and the debugging unit 502 is used to display a first debugging result when it is in the open state, and not display the first debugging result when it is in the closed state. Therefore, accurate control of the control parameters in the data processing unit can be achieved based on the starting unit, thereby providing a reliable trigger basis for the startup of the debugging unit.

[0119] Among them, the startup unit 503 can be a functional module developed based on the H5 framework in the debugging system 50, and can be used to adjust the control parameter of the data processing unit 501 from the first parameter value to the second parameter value to realize the startup of the debugging tool 50.

[0120] The control parameter refers to a parameter used in the data processing unit 501 to control the running state of the debugging unit 502. When the control parameter is a first parameter value, the debugging unit 502 can be controlled to be in a closed state, and when the control parameter is a second parameter value, the debugging unit 502 can be controlled to be in an open state.

[0121] It is understandable that the debugging system 50 in the embodiment of the present disclosure can be configured in the generation environment of the application and is in a hidden state by default, that is, the control parameter defaults to the first parameter value. When the debugging system receives the debugging startup instruction, the above startup unit is loaded to adjust the control parameter of the data processing unit 501 from the first parameter value to the second parameter value.

[0122] In some embodiments of the present disclosure, the data processing unit includes a first data input / output interface; the debugging unit includes a second data input / output interface; and the startup unit includes a third data input / output interface; wherein the interface type of the first data input / output interface is different from the interface type of the second data input / output interface, and the interface type of the second data input / output interface is the same as the interface type of the third data input / output interface.

[0123] The data input / output interface refers to the interface used to implement data receiving and sending functions in various functional modules of the debugging tool, such as the Java interface on the native side and the JavaScript interface on the Web side.

[0124] It can be understood that in the embodiment of the present disclosure, the data processing unit 501 is developed based on the native framework, while the debugging unit 502 and the startup unit 503 are developed based on the H5 framework. Therefore, the interface type of the first data input / output interface is different from the interface type of the second data input / output interface, and the interface type of the second data input / output interface is the same as the interface type of the third data input / output interface.

[0125] In some embodiments of the present disclosure, Figure 5 As shown, the debugging system 50 also includes: an interface calling unit 504, the interface calling unit 50 supports a preset transmission protocol, wherein the data processing unit is used to perform protocol conversion on the first debugging data according to the preset transmission protocol to obtain third debugging data, and send the third debugging data to the debugging unit; the debugging unit is used to perform protocol conversion on the third debugging data according to the interface protocol supported by the second data input / output interface to obtain fourth debugging data, and debug the native page according to the fourth debugging data to obtain a first debugging result, thereby, two-way communication between the data processing unit and the debugging unit, and between the data processing unit and the startup unit can be realized based on the interface calling unit, thereby ensuring the reliability of the debugging system during the debugging process.

[0126] Among them, the interface calling unit 504, for example, can be a functional module JS Bridge that realizes two-way communication between the native page (Native) and the H5 page (JavaScript, JS). The Web end can call the Java interface of the Native end, and the Native end can also call the JavaScript interface of the Web end through JS Bridge to realize two-way calling of each other.

[0127] In some embodiments of the present disclosure, the startup unit 503 is used to obtain first parameter adjustment information, and perform protocol conversion on the first parameter adjustment information according to a preset transmission protocol to obtain second parameter adjustment information, and send the second parameter adjustment information to the data processing unit 501. Thus, the startup unit can provide reliable reference information for the control parameter adjustment process of the data processing unit by obtaining the first parameter adjustment information, and perform protocol conversion on the first parameter adjustment information based on the preset transmission protocol to obtain third parameter adjustment information, so as to ensure the reliability of information transmission between the startup unit and the data processing unit.

[0128] The first parameter adjustment information refers to the information obtained by the startup unit 503 and used to adjust the control parameters in the data processing unit 501. The second parameter adjustment information refers to the parameter adjustment information obtained by performing protocol conversion on the first parameter adjustment information according to the preset transmission protocol.

[0129] For example, in the embodiment of the present disclosure, the debugging system 50 can be configured with a code scanning function module, and then obtain the first parameter adjustment information by scanning a preset code, or the first parameter adjustment information can be obtained by any other possible method such as a command line, a Mock interface, etc., without limitation.

[0130] In some embodiments of the present disclosure, the data processing unit 501 is used to perform protocol conversion on the second parameter adjustment information according to the interface protocol supported by the first data input / output interface to obtain third parameter adjustment information, and adjust the control parameter from the second parameter value to the first parameter value according to the third parameter adjustment information. Thus, the localized conversion of the second parameter adjustment information can be achieved based on the interface protocol supported by the first data input / output interface to effectively improve the indication effect of the obtained third parameter adjustment information in the data processing unit.

[0131] The third parameter adjustment information refers to the parameter adjustment information obtained by the data processing unit 501 performing protocol conversion on the second parameter adjustment information according to the interface protocol supported by the first data input / output interface.

[0132] In some embodiments of the present disclosure, the debugging unit 502 is used to obtain fourth parameter adjustment information, and perform protocol conversion on the fourth parameter adjustment information according to a preset transmission protocol to obtain fifth parameter adjustment information, and send the fifth parameter adjustment information to the data processing unit 501. Thus, the fourth parameter adjustment information can provide a reliable trigger basis for shutting down the debugging unit, and performing protocol conversion on the fourth parameter adjustment information according to the preset transmission protocol can ensure the reliability of the obtained fifth parameter adjustment information during the transmission process.

[0133] The fourth parameter adjustment information refers to information obtained by the debugging unit 502 and used to adjust control parameters in the data processing unit 501. The fifth parameter adjustment information refers to parameter adjustment information obtained by the debugging unit 502 performing protocol conversion on the fourth parameter adjustment information according to a preset transmission protocol.

[0134] For example, in the embodiment of the present disclosure, a function button corresponding to the fourth parameter adjustment information can be configured in the debugging unit 502. When the user clicks the function button, the fourth parameter adjustment information is automatically generated. Alternatively, the fourth parameter adjustment information can be generated by a third-party device and sent to the debugging unit 502. There is no limitation on this.

[0135] In some embodiments of the present disclosure, the data processing unit 501 is used to perform protocol conversion on the fifth parameter adjustment information according to the interface protocol supported by the first data input / output interface to obtain sixth parameter adjustment information, and adjust the control parameter of the data processing unit 501 from the second parameter value to the first parameter value according to the sixth parameter adjustment information. Thus, the localized conversion of the fifth parameter adjustment information can be achieved according to the interface protocol supported by the first data input / output interface to effectively improve the accuracy of the indication of the obtained sixth parameter adjustment information to the data processing unit.

[0136] The sixth parameter adjustment information refers to the parameter adjustment information obtained by the data processing unit 501 performing protocol conversion on the fifth parameter adjustment information according to the interface protocol supported by the first data input / output interface.

[0137] In some embodiments of the present disclosure, the application also includes: a non-native page; wherein the data processing unit 501 is also used to obtain page log data of the non-native page; the debugging unit 502 is also used to debug the non-native page according to the obtained page log data to obtain a second debugging result, and display the second debugging result, thereby, the debugging system can realize debugging of the non-native page to effectively improve the applicability of the debugging system in different application environments.

[0138] That is to say, the debugging system proposed in the embodiments of the present disclosure can implement debugging functions for native pages and non-native pages.

[0139] In some embodiments of the present disclosure, the debugging unit 502 is further used to determine first display requirement information corresponding to the first debugging result, and determine first interface layout information based on the first display requirement information, generate a first display interface based on the first interface layout information, and display the first debugging result based on the first display interface. Thus, a customized layout of the first display interface can be achieved based on the first display adjustment information, thereby effectively improving the display effect of the first debugging result.

[0140] In some embodiments of the present disclosure, the debugging unit 502 is further used to determine second display requirement information corresponding to the second debugging result, and determine second interface layout information based on the second display requirement information, generate a second display interface based on the second interface layout information, and display the second debugging result based on the second display interface. Thus, a customized layout of the second display interface can be achieved based on the second display adjustment information, thereby effectively improving the display effect of the second debugging result.

[0141] In some embodiments of the present disclosure, a native page includes at least one of the following: a first native page, wherein the first native page is a native page in an application; and a second native page, wherein the second native page is a native page in a software development kit associated with the application.

[0142] That is to say, the debugging system proposed in the embodiment of the present disclosure can debug native pages in the application and native pages in the software development kit related to the application, so as to quickly locate problems in the third-party component access process, effectively improve debugging efficiency and reduce communication costs.

[0143] For example, in the embodiment of the present disclosure, the data processing unit 501 may be a Debug SDK, the debugging unit 502 may be a debugging panel, and the startup unit 503 may be a switch panel. Figure 6 As shown, Figure 6 It is a schematic diagram of the use process of a debugging system proposed in an embodiment of the present disclosure, wherein a user of the debugging system can open an application App, scan a link code of the debugging system, enter the debugging panel H5 page after scanning the code, turn on the corresponding debugging switch, and the debugging system is directly loaded and suspended in the App in the form of an App-level Window, and then exit the page and enter the page developed by oneself for debugging.

[0144] For example, Figure 7 As shown, Figure 7 : is a schematic diagram of a workflow of a debugging system proposed in an embodiment of the present disclosure, wherein:

[0145] Debug SDK (data processing unit) can uniformly manage the switch value of switch panel H5 (startup unit), and the default value is False. When the user scans the code to enter the switch panel H5, Call Native of JS Bridge is automatically called to set the switch value to True; it provides an extensible API interface, connected SDK or Module (software development kit related to the application), and passes the data required for debugging and printing to Debug SDK by calling API; Debug SDK performs simple and necessary processing on the data after receiving the data (receive date); when the switch value is turned on, it is responsible for initializing the debug panel H5, including UI initialization and data display processing. By default, it is displayed in the lower right corner of the App as a button, and the debug panel pops up when the button is clicked; based on the hook JS console method, the content of the console.log() of the JS corresponding to the Web page is obtained, and the obtained log information is passed to the debug panel H5 in real time through the capabilities of JS Bridge. After JS monitors the data passed by Native, it displays the corresponding data UI.

[0146] JS Bridge (interface calling unit) can provide two-way communication between Native and JS. A Call Native function and a Call JS function can be pre-encapsulated to be responsible for the two-way communication between the Debug SDK and the debug panel and switch panel. Among them, Call Native is implemented through @JavascriptInterface; Call JS is implemented through evaluateJava script; the unified data format of communication is as follows: callbackName&&callbackName('{"status":"0","data":{"xx":"xx"},"msg":"xx"}'), JS receives data through window.callbackName. Among them, callbackName refers to the callback name, status refers to the callback status (0 means success; 1 means failure); data refers to the specific data, object type; msg refers to the callback information.

[0147] The switch panel (startup unit) is used to control the switch value in the Debug SDK, thereby controlling whether the debug panel is loaded and displayed.

[0148] The debug panel (debug unit) can receive data (such as UI initialization data and debug data) transmitted by the Debug SDK through the JS Bridge, and perform UI initialization operations on the panel and display specific data. After the debug panel H5 is loaded, the Debug SDK passes the UI initialization data to JS through the JS Bridge, and JS gets the data to perform UI layout operations.

[0149] For example, in the embodiment of the present disclosure, when initializing the above-mentioned debugging panel, some custom styles of cascading style sheets can be configured, and in actual use, the data can be expanded according to specific needs, and there is no limitation on this.

[0150] After the H5 page in the debug panel is loaded, the Debug SDK can pass the data information to JS through the Call JS method encapsulated by JS Bridge. During the componentDidMount of the H5 page life cycle, JS monitors real-time data through window.callbackName and displays it immediately after receiving a piece of data. The search function can be implemented by matching strings in JS. It also includes Clear, Copy, Hide and other functions: Clear and Copy are implemented through JS, and Hide is implemented through JS Bridge callNative.

[0151] In the disclosed embodiment, custom data logic can be implemented by customizing JSON data, specifying a type (such as String, Object, Array), each type corresponding to a display style, and passing it to the control panel H5 in the format of a JSON string through the Call JS method defined by JSBridge.

[0152] As shown below:

[0153] Array type: {"type":"Array","data":[{"key1":"value1","key2":"key2"}]}

[0154] ObjectObject type:{"type":"Object","data":{"key1":"value1","key2":"key2"}}

[0155] String type: {"type":"String","data":"welcome"}.

[0156] Figure 8 It is a structural diagram of a debugging device proposed in an embodiment of the present disclosure.

[0157] like Figure 8 As shown, the debugging device 80 includes:

[0158] The first acquisition module 801 is used to acquire initial debugging data of the page to be debugged when the page to be debugged in the application is a native page;

[0159] The processing module 802 is used to convert the data format of the initial debugging data to obtain the first debugging data;

[0160] The first debugging module 803 is used to debug the page to be debugged according to the first debugging data to obtain a first debugging result.

[0161] In some embodiments of the present disclosure, Fig. 9 As shown, Fig. 9 is a schematic diagram of the structure of a debugging device proposed in another embodiment of the present disclosure, the device also includes:

[0162] The second acquisition module 804 is used to acquire page log data of the page to be debugged when the page to be debugged is a non-native page;

[0163] The second debugging module 805 is used to debug the page to be debugged according to the page log data to obtain a second debugging result.

[0164] In some embodiments of the present disclosure, the first debugging module 803 is specifically configured to:

[0165] Performing protocol conversion on the first debugging data according to a preset transmission protocol to obtain third debugging data;

[0166] Performing protocol conversion on the third debugging data according to the first interface protocol to obtain fourth debugging data;

[0167] The page to be debugged is debugged according to the fourth debugging data to obtain a first debugging result.

[0168] In some embodiments of the present disclosure, the first debugging module 803 is further configured to:

[0169] Determining first display requirement information corresponding to the first debugging result;

[0170] Determining first interface layout information according to the first display requirement information;

[0171] Generate a first display interface based on the first interface layout information;

[0172] Based on the first display interface, a first debugging result is displayed.

[0173] In some embodiments of the present disclosure, the second debugging module 805 is further configured to:

[0174] Determining second display requirement information corresponding to the second debugging result;

[0175] Determining second interface layout information according to the second display requirement information;

[0176] Based on the second interface layout information, generate a second display interface;

[0177] Based on the second display interface, a second debugging result is displayed.

[0178] In some embodiments of the present disclosure, the first debugging module 803 and / or the second debugging module 805 is further configured to:

[0179] Obtaining first instruction information;

[0180] Performing protocol conversion on the first instruction information according to a preset transmission protocol to obtain second instruction information;

[0181] Performing protocol conversion on the second instruction information according to the second interface protocol to obtain third instruction information;

[0182] According to the third instruction information, the display status of the first display interface and / or the second display interface is controlled, wherein the first display interface is used to display the first debugging result, and the second display interface is used to display the second debugging result.

[0183] In some embodiments of the present disclosure, the native page includes at least one of the following:

[0184] A first native page, wherein the first native page is a native page in the application;

[0185] The second native page is a native page in a software development kit related to the application.

[0186] It should be noted that the above explanation of the debugging method is also applicable to the debugging device of this embodiment and will not be repeated here.

[0187] In the present embodiment, when the page to be debugged in the application is a native page, initial debugging data of the page to be debugged is obtained, the data format of the initial debugging data is converted to obtain first debugging data, and the page to be debugged is debugged according to the first debugging data to obtain a first debugging result. Thus, online debugging of native pages in application software can be implemented in a production environment, so as to effectively improve the portability of the native page debugging process and significantly improve the debugging efficiency.

[0188] Fig.10 A block diagram of an exemplary computer device suitable for implementing embodiments of the present disclosure is shown. Fig.10The computer device 12 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0189] like Fig.10 As shown, the computer device 12 is in the form of a general-purpose computing device. The components of the computer device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that connects various system components (including the system memory 28 and the processing unit 16).

[0190] The bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor or a local bus using any of a variety of bus structures. For example, these architectures include but are not limited to Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus and Peripheral Component Interconnection (PCI) bus.

[0191] The computer device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the computer device 12, including volatile and non-volatile media, removable and non-removable media.

[0192] The memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. The computer device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 34 may be used to read and write non-removable, non-volatile magnetic media ( Fig.10 Not shown, often called a "hard drive").

[0193] although Fig.10Not shown in the figure, a disk drive for reading and writing a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing a removable non-volatile optical disk (e.g., a compact disc read only memory (hereinafter referred to as: CD-ROM), a digital versatile disc read only memory (hereinafter referred to as: DVD-ROM) or other optical media) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present disclosure.

[0194] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in the memory 28, such program modules 42 including but not limited to an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. The program modules 42 generally perform the functions and / or methods of the embodiments described in the present disclosure.

[0195] The computer device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), one or more devices that enable a human body to interact with the computer device 12, and / or any device that enables the computer device 12 to communicate with one or more other computing devices (e.g., network card, modem, etc.). Such communication may be performed via an input / output (I / O) interface 22. In addition, the computer device 12 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 20. As shown, the network adapter 20 communicates with other modules of the computer device 12 via a bus 18. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the computer device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0196] The processing unit 16 executes various functional applications and data processing by running the programs stored in the system memory 28, such as implementing the debugging method mentioned in the above embodiment.

[0197] In order to implement the above embodiments, the present disclosure further proposes a non-transitory computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the debugging method proposed in the above embodiments of the present disclosure is implemented.

[0198] In order to implement the above embodiments, the present disclosure further proposes a computer program product. When an instruction processor in the computer program product is executed, the debugging method proposed in the above embodiments of the present disclosure is executed.

[0199] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present 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 that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0200] 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 may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

[0201] It should be noted that, in the description of the present disclosure, the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In addition, in the description of the present disclosure, unless otherwise specified, the meaning of "plurality" is two or more.

[0202] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present disclosure includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by those skilled in the art to which the embodiments of the present disclosure belong.

[0203] It should be understood that the various parts of the present disclosure can be implemented in hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0204] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.

[0205] In addition, each functional unit in each embodiment of the present disclosure may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.

[0206] The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc.

[0207] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present disclosure. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0208] Although the embodiments of the present disclosure have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present disclosure. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present disclosure.

Claims

1. A debugging method, characterized in that: The method comprises: If the page to be debugged in the application is a native page, obtaining initial debugging data of the page to be debugged; Performing data format conversion on the initial debugging data to obtain first debugging data; The page to be debugged is debugged according to the first debugging data to obtain a first debugging result.

2. The method according to claim 1, characterized in that The method further comprises: If the page to be debugged is a non-native page, obtaining page log data of the page to be debugged; The page to be debugged is debugged according to the page log data to obtain a second debugging result.

3. The method according to claim 1, characterized in that The debugging the page to be debugged according to the first debugging data to obtain a first debugging result includes: Performing protocol conversion on the first debugging data according to a preset transmission protocol to obtain third debugging data; Performing protocol conversion on the third debugging data according to the first interface protocol to obtain fourth debugging data; The page to be debugged is debugged according to the fourth debugging data to obtain the first debugging result.

4. The method according to claim 3, characterized in that Also includes: Determining first display requirement information corresponding to the first debugging result; Determining first interface layout information according to the first display requirement information; Generate a first display interface based on the first interface layout information; Based on the first display interface, the first debugging result is displayed.

5. The method according to claim 2, characterized in that Also includes: Determining second display requirement information corresponding to the second debugging result; Determining second interface layout information according to the second display requirement information; Based on the second interface layout information, generating a second display interface; Based on the second display interface, the second debugging result is displayed.

6. The method according to claim 4 or 5, characterized in that The method further comprises: Obtaining first instruction information; Performing protocol conversion on the first instruction information according to the preset transmission protocol to obtain second instruction information; Performing protocol conversion on the second instruction information according to the second interface protocol to obtain third instruction information; According to the third instruction information, the display status of the first display interface and / or the second display interface is controlled, wherein the first display interface is used to display the first debugging result, and the second display interface is used to display the second debugging result.

7. The method according to claim 3, characterized in that The native page includes at least one of the following: A first native page, wherein the first native page is a native page in the application; A second native page, wherein the second native page is a native page in a software development kit related to the application.

8. A debugging device, characterized in that: The device comprises: A first acquisition module, used for acquiring initial debugging data of the page to be debugged when the page to be debugged in the application is a native page; A processing module, configured to perform data format conversion on the initial debugging data to obtain first debugging data; The first debugging module is used to debug the page to be debugged according to the first debugging data to obtain a first debugging result.

9. A computer device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 7.

10. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: in, The computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 7.

11. A computer program product, characterized in that The invention comprises a computer program which, when executed by a processor, implements the steps of the method according to any one of claims 1 to 7.

Citation Information

Cited By

  • Native application development method and device, storage medium and electronic equipment

    CN119201072A