Software function debugging method, device, electronic device and storage medium

By setting up independent debugging modules during Flutter's software development process to modify the operation behavior of software functions, the problem of long and inaccurate debugging time in the existing technology is solved, and fast and accurate debugging effects are achieved.

CN114371991BActive Publication Date: 2025-03-28DOUYIN VISION CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111451587.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-01
Publication Date
2025-03-28
Estimated Expiration
2041-12-01

AI Technical Summary

Technical Problem

In the software function debugging process, the debugging time is long and inaccurate because the real results of the software function need to be triggered and obtained in a real operating environment.

Method used

During Flutter's software development process, a debugging module independent of the software is set up. By determining the software functions to be debugged, the operation behavior adjustment rules are obtained, and the operation behavior of the software functions is modified at the pre-set modification point position to obtain the modified results.

Benefits of technology

This method can quickly and accurately debug software functions, skip unnecessary processes and constraints, improve debugging speed and accuracy, and is suitable for debugging of different software functions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114371991B_ABST
    Figure CN114371991B_ABST
Patent Text Reader

Abstract

The present application discloses a debugging method, device, electronic device and storage medium for software functions, and relates to the field of computer technology, in order to solve the problem of long debugging time and low accuracy of software functions. In the software development process based on the cross-platform mobile user interface UI framework Flutter, the Flutter is provided with a debugging module independent of the software, and the debugging method of the software function runs on the debugging module, and the method includes: determining the software function to be debugged; according to the software function to be debugged, obtaining the corresponding operation behavior adjustment rule; during the operation of the software function to be debugged, at the pre-set modification tangent position, modifying the operation behavior of the software function to be debugged according to the operation behavior adjustment rule, and obtaining the result of the modified operation behavior.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present disclosure relate to the field of computer technology, and in particular to a method, device, electronic device and storage medium for debugging software functions. Background Art

[0002] In the process of software development, developers often need to debug the functions of the software to achieve the expected operating results. The debugging method of software functions provided by the prior art needs to be debugged according to the real results returned by the software function module to be debugged during the software operation. For example: in the process of software development, when the developer needs to debug the lottery function included in the software, first, the lottery function needs to be triggered to run, such as: the developer manually clicks the lottery button to trigger the lottery function to run, and then obtains the real lottery result returned after the lottery function runs, so that the developer can debug the lottery function according to the real lottery result.

[0003] However, the actual operating environment may contain many unnecessary processes, such as identity verification processes, which makes the entire debugging process time-consuming and not conducive to quickly obtaining results. In addition, due to the limitations of some objective factors in the actual operating environment, such as the limit on the number of draws, the debugging results may be inaccurate. Summary of the invention

[0004] The purpose of the embodiments of the present disclosure is to provide a method, device, electronic device and storage medium for debugging software functions, which can achieve the purpose of quickly and accurately debugging software functions.

[0005] To solve the above technical problems, an embodiment of the present disclosure provides a debugging method for software functions, which is applied in a software development process based on a cross-platform mobile user interface UI framework Flutter. A debugging module independent of the software is provided in the Flutter, and the debugging method for the software function runs on the debugging module. The method includes: determining a software function to be debugged; obtaining a corresponding running behavior adjustment rule according to the software function to be debugged; during the running of the software function to be debugged, at a preset modification tangent point position, modifying the running behavior of the software function to be debugged according to the running behavior adjustment rule, and obtaining a result generated by the modified running behavior.

[0006] Optionally, after determining the software function to be debugged, during the running of the software function to be debugged, at a preset modification cut-off point position, modifying the running behavior of the software function to be debugged according to the running behavior adjustment rules, and before obtaining the result of the modified running behavior, it also includes: obtaining the modification cut-off point position of the software function to be debugged according to the running status of the software function to be debugged.

[0007] Optionally, obtaining the modified tangent point position of the software function to be debugged according to the running status of the software function to be debugged includes: obtaining a result log of the running status during the running of the software function to be tested; from the result log of the running status, searching for a tangent point with universality and deep-rooted code characteristics, and using the position of the tangent point as the modified tangent point position of the software function to be debugged.

[0008] Optionally, modifying the running behavior of the software function to be debugged according to the running behavior adjustment rules and obtaining the result of the modified running behavior includes: modifying the running behavior of the software function to be debugged according to the running behavior adjustment rules, sending the running result of the modified running behavior to the software, and displaying it through the software; or, modifying the running behavior of the software function to be debugged according to the running behavior adjustment rules, and displaying the running result of the software function to be debugged according to the modified running behavior.

[0009] Optionally, modifying the running behavior of the software function to be debugged according to the running behavior adjustment rule, sending the running result of the modified running behavior to the software, and displaying it through the software includes: if the software function to be debugged is a network debugging function, and the running behavior adjustment rule is to modify the running result, then according to the rule of modifying the running result, the original running result of the network debugging function is modified to a preset running result, and the preset running result is sent to the software, and displayed through the software.

[0010] Optionally, the running behavior of the software function to be debugged will be modified according to the running behavior adjustment rule, and the running result of the software function to be debugged will be displayed according to the modified running behavior, including: if the software function to be debugged is a memory leakage function, and the running behavior adjustment rule is to record memory leakage behavior, then according to the rule of recording memory leakage behavior, a snapshot of the current running environment is captured and displayed.

[0011] Optionally, the running behavior of the software function to be debugged will be modified according to the running behavior adjustment rule, and the running result of the software function to be debugged will be displayed according to the modified running behavior, including: if the software function to be debugged is a channel monitor function, and the running behavior adjustment rule is to record the usage of the channel monitor, then when data transmission occurs on the channel channel, according to the rule of recording the usage of the channel monitor, the data transmitted by the channel is snapshotted, archived and recorded, and displayed.

[0012] The embodiments of the present disclosure further provide a debugging device for software functions, which is applied in a software development process based on a cross-platform mobile user interface UI framework Flutter. In the Flutter, the debugging device for the software functions is independently set up between the software, and the device includes:

[0013] A determination module, used to determine the software function to be debugged;

[0014] A first acquisition module, used to acquire corresponding operation behavior adjustment rules according to the software function to be debugged;

[0015] The modification module is used to modify the running behavior of the software function to be debugged according to the running behavior adjustment rule at a preset modification point during the running of the software function to be debugged, and obtain the result generated by the modified running behavior.

[0016] Optionally, the software function debugging device further includes:

[0017] The second acquisition module is used to acquire the modification cut-off point position of the software function to be debugged according to the running state of the software function to be debugged.

[0018] Optionally, the second acquisition module includes:

[0019] A first acquisition submodule is used to acquire a result log of the running status during the running of the software function to be debugged;

[0020] The second acquisition submodule is used to find a cut point with universality and deep code bottom layer characteristics from the result log of the running status, and use the position of the cut point as the modified cut point position of the software function to be debugged.

[0021] Optionally, the modification module includes:

[0022] A first modification submodule is used to modify the operation behavior of the software function to be debugged according to the operation behavior adjustment rule, send the operation result of the modified operation behavior to the software, and display it through the software; or

[0023] The second modification submodule is used to modify the operation behavior of the software function to be debugged according to the operation behavior adjustment rule, and display the operation result of the software function to be debugged according to the modified operation behavior.

[0024] An embodiment of the present disclosure further provides an electronic device, including:

[0025] at least one processor; and,

[0026] a memory communicatively connected to the at least one processor; wherein,

[0027] The memory stores instructions that can be executed by the at least one processor. The instructions are executed by the at least one processor to enable the at least one processor to execute the debugging method of the software function described above.

[0028] The embodiments of the present disclosure further provide a computer-readable storage medium storing a computer program, wherein the computer program implements the software function debugging method described above when executed by a processor.

[0029] Compared with the prior art, the embodiment of the present disclosure has the following advantages: since the running behavior of the software function to be debugged is obtained by modifying it according to the running behavior adjustment rules, the debugging process can skip unnecessary processes and other constraints existing in the actual running of the software function, thereby improving the debugging speed and accuracy of the software function, and avoiding the problem that the prior art requires the actual running of the software function, resulting in a long debugging process, slow speed and low accuracy of the software function; since the step of modifying the running behavior of the software function to be debugged according to the running behavior adjustment rules is performed at a pre-set modification point position, the technical solution provided by the embodiment of the present disclosure can set different modification point positions for different software functions, thereby ensuring the rationality and feasibility of the software function running process, and setting different modification point positions for different software functions can further shorten the debugging time of the software function and ensure the accuracy of the debugging of the software function; and since the debugging module is set independently of the software and does not modify the running code of the software itself, the application scope of the embodiment of the present disclosure is wider and the adaptability is stronger only through the debugging module in the process of debugging the software function. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.

[0031] Figure 1 is a flowchart of a method for debugging a software function provided by an embodiment of the present disclosure;

[0032] Figure 2 is a flowchart of a method for debugging a software function provided by another embodiment of the present disclosure;

[0033] Figure 3 yes Figure 2 The flowchart of step 100 in the method for debugging software functions provided by another embodiment of the present disclosure is shown;

[0034] Figure 4 It is one of the structural schematic diagrams of a software function debugging device provided by another embodiment of the present disclosure;

[0035] Figure 5 This is a second structural diagram of a software function debugging device provided by another embodiment of the present disclosure;

[0036] Figure 6 yes Figure 5 A structural schematic diagram of a second acquisition module 400 in a software function debugging device provided by another embodiment of the present disclosure is shown;

[0037] Figure 7 yes Figure 4 The structural diagram of the modification module 403 in the debugging device for software functions provided by another embodiment of the present disclosure is shown.

[0038] Figure 8 It is a schematic diagram of the structure of an electronic device provided by one embodiment of the present disclosure. DETAILED DESCRIPTION

[0039] In order to make the purpose, technical scheme and advantages of the embodiments of the present disclosure clearer, each embodiment of the present disclosure will be described in detail below in conjunction with the accompanying drawings. However, it will be understood by those skilled in the art that in each embodiment of the present disclosure, many technical details are proposed in order to enable readers to better understand the present application. However, even without these technical details and various changes and modifications based on the following embodiments, the technical scheme claimed in the present application can be implemented. The division of the following embodiments is for the convenience of description and should not constitute any limitation on the specific implementation of the present disclosure. The various embodiments can be combined and referenced with each other without contradiction.

[0040] An embodiment disclosed in the present invention relates to a debugging method for software functions, which is applied in a software development process based on a cross-platform mobile user interface UI framework Flutter. A debugging module independent of the software is provided in Flutter, and the debugging method for the software function runs on the debugging module.

[0041] In this embodiment, the software developed based on Flutter is specifically applied to mobile terminals such as mobile phones. The debugging module can be set on the same mobile terminal as the software, or on a cloud device such as a debugging server. It should be noted that when the debugging module is set on a cloud device, it is necessary to set the running entry of the debugging module on the mobile terminal where the software is running, so that the developer can call the debugging module to debug the software function and obtain the running results of the debugging module.

[0042] In order to enable those skilled in the art to more clearly understand the technical solution provided by the embodiments of the present disclosure, in this embodiment and the following embodiments, an example is given in which a debugging module is set on a mobile terminal where the software is located.

[0043] like Figure 1 As shown, in this embodiment, the debugging method of the software function may include:

[0044] Step 101: determine the software function to be debugged.

[0045] In this embodiment, the software functions to be debugged may mainly include: network debugging function, memory leak function and channel monitor function. Of course, the above is only a specific example. In actual use, the software functions to be debugged may also include other functions based on Flutter settings, which will not be described one by one here.

[0046] In this embodiment, step 101 can determine the software function to be debugged through the running behavior of the software. For example, when the developer clicks on a network access module of the software, step 101 can intercept the network access request sent by the network access module, analyze the network access request, and determine that the software function to be debugged is a network debugging function; step 101 can also determine the software function to be debugged based on the information input by the developer. It should be noted that the developer described in this embodiment is a developer in a broad sense, including but not limited to software programmers, testers, and designers.

[0047] Step 102: Obtain corresponding operation behavior adjustment rules according to the software function to be debugged.

[0048] In this embodiment, the operation behavior adjustment rules are specifically set according to the specific debugging requirements of the software function to be debugged. For example: when the software function to be debugged is a network debugging function, the operation behavior adjustment rules can be pre-set to modify the operation results; or, when the software function to be debugged is a memory leak function, the operation behavior adjustment rules can be pre-set to record the memory leak behavior; or, when the software function to be debugged is a channel monitor function, the operation behavior adjustment rules can be pre-set to record the channel monitor usage. Each case will not be described here one by one.

[0049] In this embodiment, the operation behavior adjustment rules can be pre-set, for example: for all memory leakage functions, the operation behavior adjustment rules can be pre-set to record memory leakage behavior; for all channelmonitor functions, the operation behavior adjustment rules can be pre-set to record channel monitor usage.

[0050] In order to meet the application scenarios and debugging requirements of different software functions, the operation behavior adjustment rules can also be set after the software function to be debugged is determined in step 101. For example, after the software function to be debugged is determined to be a network debugging function according to the intercepted network access request in step 101, the operation behavior adjustment rules corresponding to the network access request can be set to modify the operation result, and the operation result is pointed to the pre-set operation result file. The operation behavior adjustment rules set in this way can not only meet the debugging requirements of different software functions to be debugged, but also further meet the debugging requirements of the specific content corresponding to the same software function to be debugged, such as the specific network access request described above, thereby further ensuring the accuracy of the debugging results obtained by applying the technical solution provided by this embodiment.

[0051] In this embodiment, in order to facilitate the setting of the operation behavior adjustment rules, a human-computer interaction interface for setting the operation behavior adjustment rules can be displayed during the startup of the debugging module, and the operation behavior adjustment rules are set through the human-computer interaction interface. In this embodiment, the human-computer interaction interface includes two areas, namely: a software function display area to be debugged and an operation behavior adjustment rule setting area.

[0052] The software function to be debugged display area can automatically display the software function to be debugged determined in step 101, or can display the software function to be debugged input by the developer. Further, when the software function to be debugged corresponds to specific content, the software function to be debugged display area displays the specific content. For example, when the software function to be debugged is a network debugging function, and step 101 intercepts a specific accessed network address, the software function to be debugged display area displays the network address corresponding to the network debugging function.

[0053] The operation behavior adjustment rule setting area can receive the operation behavior adjustment rule input by the developer, and establish a one-to-one correspondence between the operation behavior adjustment rule and the software function to be debugged displayed in the software function display area to be debugged.

[0054] At this time, after the software function to be debugged is determined in step 101, step 102 can obtain the operation behavior adjustment rule corresponding to the software function to be debugged according to the one-to-one correspondence between the operation behavior adjustment rule and the software function to be debugged.

[0055] Step 103, during the operation of the software function to be debugged, at a preset modification cut-off point, the operation behavior of the software function to be debugged is modified according to the operation behavior adjustment rule, and the result generated by the modified operation behavior is obtained.

[0056] In this embodiment, step 103 of modifying the running behavior of the software function to be debugged according to the running behavior adjustment rule and obtaining the result generated by the modified running behavior may include two cases:

[0057] One is to modify the running behavior of the software function to be debugged according to the running behavior adjustment rule, send the running result of the modified running behavior to the software, and display it through the software.

[0058] Specifically, if the software function to be debugged is a network debugging function, and the operation behavior adjustment rule is to modify the operation result, then according to the rule of modifying the operation result, the original operation result of the network debugging function is modified to a preset operation result, and the preset operation result is sent to the software for display through the software.

[0059] For example, if the network debugging function is a network lottery function, and the operation behavior adjustment rule is to modify the operation result, then according to the rule for modifying the operation result, the result that should be returned by the actual operation of the lottery function (such as the number of lottery draws and the lottery result - success or failure) is modified to the preset operation result, such as the number of lottery draws is 0 and the lottery result is success. By modifying the operation behavior as described above, developers can skip the actual number of lottery draws displayed for the network lottery function and debug the lottery draws indefinitely, thereby achieving the purpose of debugging the network lottery function more accurately.

[0060] The other is to modify the running behavior of the software function to be debugged according to the running behavior adjustment rule, and display the running result of the software function to be debugged according to the modified running behavior.

[0061] Specifically, if the software function to be debugged is a memory leak function, and the running behavior adjustment rule is to record the memory leak behavior, then according to the rule of recording the memory leak behavior, a snapshot of the current running environment is captured and displayed.

[0062] Alternatively, if the software function to be debugged is a channel monitor function, and the operating behavior adjustment rule is to record the usage of the channel monitor, then when data transmission occurs on the channel, according to the rule for recording the usage of the channel monitor, the data transmitted by the channel is snapshotted, archived, recorded and displayed.

[0063] Compared with the prior art, the embodiment of the present disclosure has the following advantages: since the running behavior of the software function to be debugged is obtained by modifying it according to the running behavior adjustment rules, the debugging process can skip unnecessary processes and other constraints existing in the actual running of the software function, thereby improving the debugging speed and accuracy of the software function, and avoiding the problem that the prior art requires the actual running of the software function, resulting in a long debugging process, slow speed and low accuracy of the software function; since the step of modifying the running behavior of the software function to be debugged according to the running behavior adjustment rules is performed at a pre-set modification point position, the technical solution provided by the embodiment of the present disclosure can set different modification point positions for different software functions, thereby ensuring the rationality and feasibility of the software function running process, and setting different modification point positions for different software functions can further shorten the debugging time of the software function and ensure the accuracy of the debugging of the software function; and since the debugging module is set independently of the software and does not modify the running code of the software itself, the application scope of the embodiment of the present disclosure is wider and the adaptability is stronger only through the debugging module in the process of debugging the software function.

[0064] Another embodiment disclosed in the present invention relates to a debugging method for software functions, which is applied in a software development process based on a cross-platform mobile user interface UI framework Flutter. A debugging module independent of the software is provided in Flutter, and the debugging method for software functions runs on the debugging module.

[0065] In this embodiment, the software developed based on Flutter is specifically applied to mobile terminals such as mobile phones. The debugging module can be set on the same mobile terminal as the software, or on a cloud device such as a debugging server. It should be noted that when the debugging module is set on a cloud device, it is necessary to set the running entry of the debugging module on the mobile terminal where the software is running, so that the developer can call the debugging module to debug the software function and obtain the running results of the debugging module.

[0066] like Figure 2 As shown, in this embodiment, the debugging method of the software function is similar to the Figure 1 The method is basically the same as shown, except that after step 101 and before step 103, the following may also be included:

[0067] Step 100: Obtain the modification cut-off point position of the software function to be debugged according to the running state of the software function to be debugged.

[0068] Specifically, Figure 3 As shown, step 100 may include:

[0069] Step 301: During the operation of the software function to be debugged, a result log of the operation status is obtained.

[0070] Step 302: Find a pointcut that is universal and has deep code bottom layer characteristics from the result log of the running status, and use the position of the pointcut as the modified pointcut position of the software function to be debugged.

[0071] For example: during the operation of the network debugging function, you can obtain the result log of the running status of each software debugging function, analyze the result log of the running status, and obtain the code position of the exit of the network request sent by each network debugging function at the software code level, and use the code position as the modification cut-off point position of the network debugging function.

[0072] It should be noted that step 100 provided in this embodiment can occur at any position after step 101 and before step 103. For ease of understanding, this embodiment takes step 100 occurring after step 101 and before step 102 as an example for explanation.

[0073] The technical solution provided by this embodiment achieves Figure 1 Based on the beneficial effects brought by the technical solution shown in Figure 3 The modification cut-off point positions obtained in the steps shown are universal and have deep code bottom-level characteristics, making the software function debugging method provided in this embodiment more reasonable and feasible in step 103 to modify the running behavior of the software function to be debugged according to the running behavior adjustment rules, further ensuring the accuracy of software function debugging.

[0074] Another embodiment disclosed in the present invention relates to a debugging device for software functions, which is applied in a software development process based on a cross-platform mobile user interface UI framework Flutter. In the Flutter, the debugging device for the software functions is independently set up between the software.

[0075] In this embodiment, the software developed based on Flutter is specifically applied to mobile terminals such as mobile phones, and the debugging device of the software function can be set on the same mobile terminal as the software, or can be set on a cloud device such as a debugging server. It should be noted that when the debugging device of the software function is set on a cloud device, it is necessary to set the running entry of the debugging device of the software function on the mobile terminal where the software is running, so that the developer can call the debugging device of the software function to debug the software function and obtain the running result of the debugging module.

[0076] like Figure 4 As shown, the debugging device of the software function may include:

[0077] Determining module 401, used to determine the software function to be debugged;

[0078] A first acquisition module 402 is used to acquire corresponding operation behavior adjustment rules according to the software function to be debugged;

[0079] The modification module 403 is used to modify the running behavior of the software function to be debugged according to the running behavior adjustment rules at a preset modification point during the running of the software function to be debugged, and obtain the result of the modified running behavior.

[0080] Furthermore, if Figure 5 As shown, the debugging device for software functions may also include:

[0081] The second acquisition module 400 is used to acquire the modification cut-off point position of the software function to be debugged according to the running state of the software function to be debugged.

[0082] Furthermore, if Figure 6 As shown, the second acquisition module 400 may include:

[0083] The first acquisition submodule 4001 is used to obtain the result log of the running status during the running of the software function to be debugged;

[0084] The second acquisition submodule 4002 is used to find a cut point with universality and deep code bottom layer characteristics from the result log of the running status, and use the position of the cut point as the modified cut point position of the software function to be debugged.

[0085] Furthermore, if Figure 7 As shown, the modification module 403 may include:

[0086] The first modification submodule 4031 is used to modify the operation behavior of the software function to be debugged according to the operation behavior adjustment rule, send the operation result of the modified operation behavior to the software, and display it through the software; or

[0087] The second modification submodule 4032 is used to modify the operation behavior of the software function to be debugged according to the operation behavior adjustment rule, and display the operation result of the software function to be debugged according to the modified operation behavior.

[0088] Among them, the first modification sub-module 701 can be specifically used for if the software function to be debugged is a network debugging function, and the running behavior adjustment rule is to modify the running result, then according to the rule of modifying the running result, the original running result of the network debugging function is modified to a preset running result, and the preset running result is sent to the software for display through the software.

[0089] Among them, the second modification submodule 702 can be specifically used for capturing and displaying a snapshot of the current operating environment according to the rule of recording memory leakage behavior if the software function to be debugged is a memory leak function and the operating behavior adjustment rule is to record memory leak behavior; or, if the software function to be debugged is a channel monitor function and the operating behavior adjustment rule is to record the usage of the channel monitor, then when data transmission occurs on the channel channel, according to the rule of recording the usage of the channel monitor, a snapshot of the data transmitted by the channel is taken, archived and recorded, and displayed.

[0090] The specific implementation method of the debugging device for software functions described in this embodiment can refer to the disclosed content of the debugging method for software functions described above, which will not be repeated here.

[0091] Compared with the prior art, the embodiment of the present disclosure has the following advantages: since the running behavior of the software function to be debugged is obtained by modifying it according to the running behavior adjustment rules, the debugging process can skip unnecessary processes and other constraints existing in the actual running of the software function, thereby improving the debugging speed and accuracy of the software function, and avoiding the problem that the prior art requires the actual running of the software function, resulting in a long debugging process, slow speed and low accuracy of the software function; since the step of modifying the running behavior of the software function to be debugged according to the running behavior adjustment rules is performed at a pre-set modification point position, the technical solution provided by the embodiment of the present disclosure can set different modification point positions for different software functions, thereby ensuring the rationality and feasibility of the software function running process, and setting different modification point positions for different software functions can further shorten the debugging time of the software function and ensure the accuracy of the debugging of the software function; and since the debugging module is set independently of the software and does not modify the running code of the software itself, the application scope of the embodiment of the present disclosure is wider and the adaptability is stronger only through the debugging module in the process of debugging the software function.

[0092] One embodiment of the present disclosure relates to an electronic device, such as Figure 8 As shown, including:

[0093] at least one processor 901; and,

[0094] A memory 902 that is communicatively connected to the at least one processor 901; wherein,

[0095] The memory 902 stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor 1001 to enable the at least one processor 901 to execute the debugging method of the software function described in the embodiment of the present disclosure.

[0096] Among them, the memory and the processor are connected in a bus manner, and the bus may include any number of interconnected buses and bridges, and the bus connects various circuits of one or more processors and memories together. The bus can also connect various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. The bus interface provides an interface between the bus and the transceiver. The transceiver can be one element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices on a transmission medium. The data processed by the processor is transmitted on a wireless medium via an antenna, and further, the antenna also receives data and transmits the data to the processor.

[0097] The processor is responsible for managing the bus and general processing, and can also provide various functions, including timing, peripheral interfaces, voltage regulation, power management, and other control functions. Memory can be used to store data used by the processor when performing operations.

[0098] An embodiment of the present disclosure relates to a computer-readable storage medium storing a computer program, which implements the above method embodiment when executed by a processor.

[0099] That is, those skilled in the art can understand that all or part of the steps in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a program, and the program is stored in a storage medium, including a number of instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0100] Those skilled in the art will appreciate that the above-mentioned embodiments are specific examples for implementing the present disclosure, and in actual applications, various changes may be made thereto in form and detail without departing from the spirit and scope of the present disclosure.

Claims

1. A method for debugging a software function, characterized in that: In the software development process based on the cross-platform mobile user interface UI framework Flutter, a debugging module independent of the software is provided in the Flutter, and the debugging method of the software function runs on the debugging module, and the method includes: Determine the software functions to be debugged; According to the software function to be debugged, obtaining corresponding operation behavior adjustment rules; During the operation of the software function to be debugged, at a preset modification cut-off point, the operation behavior of the software function to be debugged is modified according to the operation behavior adjustment rule, and a result generated by the modified operation behavior is obtained.

2. The method according to claim 1, characterized in that After determining the software function to be debugged, during the operation of the software function to be debugged, at a preset modification tangent point position, modifying the operation behavior of the software function to be debugged according to the operation behavior adjustment rule, and before obtaining the result generated by the modified operation behavior, the method further includes: According to the running state of the software function to be debugged, the modification cut-off point position of the software function to be debugged is obtained.

3. The method according to claim 2, characterized in that The acquiring the modification cut-off point position of the software function to be debugged according to the running state of the software function to be debugged comprises: During the operation of the software function to be debugged, obtaining a result log of the operation status; From the result log of the running status, find a cut point with universality and deep code bottom layer characteristics, and use the position of the cut point as the modified cut point position of the software function to be debugged; Among them, the search for a tangent point that is universal and in-depth into the underlying characteristics of the code, and using the position of the tangent point as the modified tangent point position of the software function to be debugged, includes: during the operation of the network debugging function, obtaining the result log of the running status of each software debugging function, analyzing the result log of the running status, and at the software code level, obtaining the code position of the exit of the network request sent by each network debugging function, and using the code position as the modified tangent point position of the network debugging function.

4. The method according to claim 1, characterized in that: The step of modifying the running behavior of the software function to be debugged according to the running behavior adjustment rule and obtaining the result generated by the modified running behavior includes: Modifying the running behavior of the software function to be debugged according to the running behavior adjustment rule, sending the running result of the modified running behavior to the software, and displaying it through the software; or The running behavior of the software function to be debugged is modified according to the running behavior adjustment rule, and the running result of the software function to be debugged is displayed according to the modified running behavior.

5. The method according to claim 4, characterized in that The step of modifying the running behavior of the software function to be debugged according to the running behavior adjustment rule, sending the running result of the modified running behavior to the software, and displaying it through the software comprises: If the software function to be debugged is a network debugging function, and the operation behavior adjustment rule is to modify the operation result, then according to the operation behavior adjustment rule of modifying the operation result, the original operation result of the network debugging function is modified to a preset operation result, and the preset operation result is sent to the software and displayed by the software.

6. The method according to claim 4, characterized in that The step of modifying the running behavior of the software function to be debugged according to the running behavior adjustment rule, and displaying the running result of the software function to be debugged according to the modified running behavior includes: If the software function to be debugged is a memory leak function, and the running behavior adjustment rule is to record the memory leak behavior, then according to the rule of recording the memory leak behavior, a snapshot of the current running environment is captured and displayed.

7. The method according to claim 4, characterized in that The step of modifying the running behavior of the software function to be debugged according to the running behavior adjustment rule, and displaying the running result of the software function to be debugged according to the modified running behavior includes: If the software function to be debugged is a channel monitor function, and the operation behavior adjustment rule is to record the usage of the channel monitor, then when data transmission occurs on the channel channel, according to the rule for recording the usage of the channel monitor, a snapshot, archive record and display of the data transmitted by the channel are taken.

8. A software function debugging device, characterized in that: In the software development process based on the cross-platform mobile user interface UI framework Flutter, in the Flutter, the debugging device of the software function is independently set between the software, and the device includes: A determination module, used to determine the software function to be debugged; A first acquisition module, used to acquire corresponding operation behavior adjustment rules according to the software function to be debugged; The modification module is used to modify the running behavior of the software function to be debugged according to the running behavior adjustment rules at a preset modification point during the running of the software function to be debugged, and obtain the result generated by the modified running behavior.

9. The device according to claim 8, characterized in that Also includes: The second acquisition module is used to acquire the modification cut-off point position of the software function to be debugged according to the running state of the software function to be debugged.

10. The device according to claim 9, characterized in that The second acquisition module includes: A first acquisition submodule is used to acquire a result log of the running status during the running of the software function to be debugged; The second acquisition submodule is used to find a cut point with universality and deep code bottom layer characteristics from the result log of the running status, and use the position of the cut point as the modified cut point position of the software function to be debugged; Among them, the searching for a tangent point that is universal and has in-depth code bottom-level characteristics, and using the position of the tangent point as the modified tangent point position of the software function to be debugged includes: during the operation of the network debugging function, obtaining a result log of the running status of each software debugging function, analyzing the result log of the running status, and at the software code level, obtaining the code position of the exit of the network request sent by each network debugging function, and using the code position as the modified tangent point position of the network debugging function.

11. The device according to claim 8, characterized in that The modification module comprises: A first modification submodule is used to modify the operation behavior of the software function to be debugged according to the operation behavior adjustment rule, and send the operation result of the modified operation behavior to the software for display through the software; or The second modification submodule is used to modify the running behavior of the software function to be debugged according to the running behavior adjustment rule, and display the running result of the software function to be debugged according to the modified running behavior.

12. An electronic 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 debugging method of the software function according to any one of claims 1 to 7.

13. A computer-readable storage medium storing a computer program, characterized in that: The computer program, when executed by a processor, implements a debugging method for the software function described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Debugging method and device, electronic equipment and storage medium

    CN110502439A

  • Positioning method and device for component in cross-platform interface framework and electronic device

    CN110688173A