Debugging method and device of mobile application development framework, computer equipment and storage medium

By detecting operating modes and establishing bidirectional communication channels, debugging code is dynamically integrated, solving cross-platform compatibility and real-time performance monitoring issues in mobile application debugging. This achieves flexibility in cross-platform debugging and efficient performance monitoring, improving debugging efficiency and user experience.

CN121597546APending Publication Date: 2026-03-03CHINA ASSET MANAGEMENT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511507678.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-21
Publication Date
2026-03-03

AI Technical Summary

Technical Problem

Existing mobile application debugging technologies suffer from insufficient cross-platform compatibility, lack of real-time performance monitoring capabilities, high coupling between debugging tools and application code, and a lack of a unified interactive experience, resulting in low debugging efficiency.

Method used

By detecting the operating mode of mobile applications, dynamically integrating debugging code, establishing a two-way communication channel with a preset serialized message protocol, collecting and processing interactive data, and displaying it in real time in a visual debugging interface, it supports cross-platform debugging and enhances performance monitoring capabilities and interactive experience.

Benefits of technology

It achieves flexibility and adaptability in cross-platform debugging, provides comprehensive performance monitoring and intuitive data display, unifies the debugging experience, and significantly improves debugging efficiency and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121597546A_ABST
    Figure CN121597546A_ABST
Patent Text Reader

Abstract

The invention discloses a debugging method and device for a mobile application development framework, computer equipment and a storage medium. The method comprises the following steps: detecting an operation mode of a mobile application; integrating the corresponding debugging code into the mobile application according to the operation mode; establishing a bidirectional communication channel between the first operation environment and the second operation environment through a preset serialized message protocol; collecting and processing interaction data between the first operation environment and the second operation environment through the communication channel; displaying the processed data in a visual debugging interface associated with the communication channel in real time; real-time performance monitoring can be achieved, and the coupling degree of a debugging tool and application codes can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of mobile application development technology, and in particular to a debugging method, apparatus, computer device, and storage medium for a mobile application development framework. Background Technology

[0002] Mobile application debugging is a crucial step in ensuring application quality and performance. Its technical solutions have evolved along with development models and can be broadly categorized into three types: hybrid development debugging for WebView containers, native development debugging based on Android Studio / Xcode, and cross-platform debugging for frameworks such as React Native. Existing debugging tools are typically designed based on specific technical approaches. For example, proxy-based network request debugging tools can intercept network data but are limited to network layer analysis; embedded web debugging tools can capture H5 page logs but cannot access native layer functionalities. While these tools can be effective in specific scenarios, their design principles and implementation methods have inherent limitations.

[0003] Current debugging techniques are highly dependent on the runtime environment and hardware connectivity. Web debugging tools need to be embedded in the application page and obtain logs through the browser kernel; native development debugging requires a USB connection to a physical device, with the IDE collecting system logs and device data; cross-platform framework debugging tools often run the code in a desktop browser environment and exchange data with the mobile device via WebSocket. This dependence on specific environments and physical connections leads to significant limitations in the application scenarios of debugging solutions.

[0004] Current debugging techniques suffer from insufficient cross-platform compatibility, making it difficult to support in-depth debugging of communication between JavaScript and the Native layer; they lack real-time performance monitoring capabilities, making it impossible to continuously track multi-dimensional indicators such as CPU / memory usage; the tools are highly invasive, requiring modification of the source code or reliance on wired connections, making dynamic injection impossible; and they lack a unified interactive experience, requiring developers to switch between multiple tools on different platforms, resulting in low debugging efficiency. Summary of the Invention

[0005] This application provides a debugging method, apparatus, computer device, and storage medium for a mobile application development framework that enables real-time performance monitoring and reduces the coupling between debugging tools and application code.

[0006] On the one hand, this application provides a debugging method for a mobile application development framework, including: Detect the operating mode of mobile applications; Based on the operating mode, integrate the corresponding debugging code into the mobile application; A bidirectional communication channel is established between the first and second runtime environments by using a pre-defined serialized message protocol. The system collects and processes interactive data between the first and second operating environments through a communication channel. The processed data is displayed in real time in a visual debugging interface associated with the communication channel.

[0007] In one embodiment, the operating mode includes at least one of the following: development mode, test mode, and production mode. Based on the operating mode, the corresponding debugging code is integrated into the mobile application, including: In response to the detection that the running mode is development mode or test mode, the first set of debug code containing full debugging capabilities is integrated into the mobile application; In response to the detection that the operating mode is production mode, a second set of debug code containing only core performance monitoring functions is integrated into the mobile application, wherein the first set of debug code contains more code modules than the second set of debug code.

[0008] In one embodiment, establishing a bidirectional communication channel between a first runtime environment and a second runtime environment through a preset serialization message protocol includes: Configure preset serialization message protocols in the first and second runtime environments respectively; In the first runtime environment, based on a preset serialization message protocol, the interactive data to be transmitted is converted into a serialized message in a unified format and sent to the second runtime environment; In the second operating environment, based on a preset serialization message protocol, the received serialized messages are parsed and converted into equivalent data that is equivalent to the data structure of this environment; The second runtime environment processes the equivalent data, generates response data, and converts the response data into a serialized message in a unified format based on a preset serialization message protocol, returning it to the first runtime environment.

[0009] In one embodiment, collecting and processing interaction data between the first and second runtime environments via a communication channel includes: By monitoring message transmission within the communication channel, the raw data of the interaction between the first and second operating environments can be obtained; Store the raw data in a temporary buffer queue; The raw data in the temporary buffer queue is batch merged and compressed to generate data packets to be transmitted.

[0010] In one embodiment, integrating the corresponding debugging code into the mobile application further includes: integrating interface rendering code for generating a visual debugging interface, and displaying the processed data in real time in the visual debugging interface associated with the communication channel, including: In response to the successful establishment of the bidirectional communication channel, a visual debugging interface associated with the communication channel is generated based on the interface rendering code; Establish a data connection between the visual debugging interface and the two-way communication channel; The processed data is displayed in real time in the visual debugging interface via data connection.

[0011] In one embodiment, the method further includes: The raw interactive data transmitted through the communication channel is scanned, and sensitive information is identified through regular expression matching and keyword list comparison. The identified sensitive information is masked according to predefined de-identification rules; The anonymized data is then encrypted end-to-end using an encryption algorithm. The encrypted data is transmitted to the visual debugging interface for display.

[0012] In one embodiment, the method further includes: The performance metrics data of the first and second operating environments are collected using a performance acquisition device. Historical performance index data is acquired and statistically analyzed based on the sliding window algorithm to obtain a dynamic threshold. The dynamic threshold is determined by μ + k × σ, where μ represents the mean of historical data, σ represents the standard deviation, and k represents the sensitivity coefficient. The performance metric data is compared with a dynamic threshold. When the number of times the performance metric data exceeds the dynamic threshold consecutively reaches a preset number, the corresponding alarm mechanism is activated. Multi-level alarm information is generated based on the degree of deviation of performance indicators, and corresponding early warning methods are executed according to the alarm level.

[0013] On the other hand, this application provides a debugging device for a mobile application development framework, the device comprising: The mode determination module is used to detect the operating mode of mobile applications; The code injection module is used to integrate corresponding debugging code into the mobile application based on the running mode; The channel establishment module is used to establish a bidirectional communication channel between the first runtime environment and the second runtime environment through a preset serialized message protocol. The data acquisition module is used to collect and process interactive data between the first operating environment and the second operating environment through the communication channel; The data interaction module is used to display the processed data in real time in a visual debugging interface associated with the communication channel.

[0014] In another aspect, a computer device is also provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the debugging method of the mobile application development framework described in the first aspect.

[0015] In another aspect, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the debugging method of the mobile application development framework described in the first aspect.

[0016] By implementing the aforementioned debugging method, apparatus, computer equipment, and storage medium for a mobile application development framework, this method ensures the flexibility and adaptability of the debugging process by detecting the mobile application's operating mode and dynamically integrating debugging code according to different modes. This allows developers to effectively debug for different environments and needs. A bidirectional communication channel established using a pre-defined serialized message protocol enables real-time data exchange between the first and second operating environments. It not only supports cross-platform debugging but also enhances the ability to handle complex data structures, resolving the issue of insufficient support for bridging communication mechanisms. Furthermore, by collecting and processing interactive data through the communication channel, performance monitoring becomes more comprehensive and accurate. Developers can obtain key performance indicators such as CPU utilization and memory usage in real time, effectively meeting the needs of performance problem diagnosis in production environments. Finally, the processed data is displayed in real-time in a visual debugging interface, providing not only intuitive data display but also a unified cross-platform debugging experience, reducing the burden on developers to adapt to multiple debugging tools and significantly improving debugging efficiency and user experience. This approach addresses several shortcomings of existing technologies, including compatibility issues, lack of real-time performance monitoring capabilities, high coupling between debugging tools and application code, and lack of a unified debugging experience, thus advancing debugging technology in mobile application development frameworks. Attached Figure Description

[0017] To more clearly illustrate the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 This is a flowchart of a debugging method for a mobile application development framework in one embodiment.

[0019] Figure 2 This is a structural diagram of a debugging method for a mobile application development framework in one embodiment.

[0020] Figure 3 This is a timing diagram of a debugging method for a mobile application development framework in one embodiment.

[0021] Figure 4 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0022] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0023] In one embodiment, such as Figure 1 As shown, a debugging method for a mobile application development framework is provided, including: S100: Detects the operating mode of mobile applications; S200: Based on the operating mode, integrate the corresponding debugging code into the mobile application; S300: Establishes a bidirectional communication channel between the first and second operating environments through a preset serialized message protocol; S400: Collects and processes interactive data between the first operating environment and the second operating environment through the communication channel; S500: The processed data is displayed in real time in a visual debugging interface associated with the communication channel.

[0024] Among them, the mobile application's running mode refers to how the application runs in different environments, including development mode, debugging mode, and production mode. The application's behavior and debugging requirements may differ in different modes; debugging code refers to code snippets used to monitor, analyze, and diagnose the application's running status; serialization message protocol refers to a format used for data transmission, converting complex data structures into a transmittable byte stream to enable data exchange between different environments; in this application, the first running environment and the second running environment refer to the Android and iOS platforms, respectively; visual debugging interface: a graphical interface that displays the application's running data and status.

[0025] Specifically, by detecting the mobile application's operating mode and dynamically integrating debugging code according to different modes, the flexibility and adaptability of the debugging process are ensured, enabling developers to effectively debug for different environments and needs. A bidirectional communication channel established using a pre-defined serialized message protocol enables real-time data exchange between the first and second operating environments. This not only supports cross-platform debugging but also enhances the ability to handle complex data structures, resolving the issue of insufficient support for bridging communication mechanisms. Furthermore, by collecting and processing interactive data through the communication channel, performance monitoring becomes more comprehensive and accurate. Developers can obtain key performance indicators such as CPU utilization and memory usage in real time, effectively meeting the needs of performance problem diagnosis in production environments. Finally, the processed data is displayed in real-time in a visual debugging interface, providing not only intuitive data display but also a unified cross-platform debugging experience, reducing the burden on developers to adapt to multiple debugging tools and significantly improving debugging efficiency and user experience. This approach comprehensively addresses multiple shortcomings in existing technologies, including compatibility issues, lack of real-time performance monitoring capabilities, high coupling between debugging tools and application code, and a lack of a unified debugging experience, thus driving the advancement of mobile application development framework debugging technology.

[0026] In one embodiment, the operating mode includes at least one of the following: development mode, test mode, and production mode. Based on the operating mode, the corresponding debugging code is integrated into the mobile application, including: In response to the detection that the running mode is development mode or test mode, the first set of debug code containing full debugging capabilities is integrated into the mobile application; In response to the detection that the operating mode is production mode, a second set of debug code containing only core performance monitoring functions is integrated into the mobile application, wherein the first set of debug code contains more code modules than the second set of debug code.

[0027] The first and second debugging code are different debugging modules integrated into the application. The first debugging code contains complete debugging functionality modules, including but not limited to logging, error capture, and performance monitoring, suitable for the development and testing phases, helping developers to fully understand the application's running status; the second debugging code simplifies the debugging functionality, retaining only the core performance monitoring module, so as to monitor the application's key performance indicators in the production environment without significantly impacting the overall performance of the application.

[0028] Specifically, by dynamically integrating corresponding debugging code according to different operating modes, the system can flexibly adapt to the different needs of applications in the development, testing, and production phases. During development and testing, the first set of debugging code provides comprehensive debugging tools, enabling developers to deeply analyze application behavior and performance bottlenecks, thereby quickly locating and fixing problems. In the production phase, the use of the second set of debugging code ensures minimal impact on application performance while still monitoring key performance indicators, helping developers promptly identify potential problems and optimize them. This phased debugging code integration strategy not only improves debugging efficiency and effectiveness but also enhances overall application performance and user experience by reducing the burden of unnecessary debugging functions in the production environment. Through this approach, developers can effectively manage application debugging needs at different stages, achieving an optimal balance between debugging functionality and application performance.

[0029] In one embodiment, establishing a bidirectional communication channel between a first runtime environment and a second runtime environment through a preset serialization message protocol includes: Configure preset serialization message protocols in the first and second runtime environments respectively; In the first runtime environment, based on a preset serialization message protocol, the interactive data to be transmitted is converted into a serialized message in a unified format and sent to the second runtime environment; In the second operating environment, based on a preset serialization message protocol, the received serialized messages are parsed and converted into equivalent data that is equivalent to the data structure of this environment; The second runtime environment processes the equivalent data, generates response data, and converts the response data into a serialized message in a unified format based on a preset serialization message protocol, returning it to the first runtime environment.

[0030] The pre-defined serialization message protocol is a standardized format for transmitting data between different operating environments. It transforms complex data structures into a unified byte stream format, enabling seamless data transmission and parsing across different platforms. This protocol ensures the integrity and consistency of data transmission, avoiding data incompatibility issues caused by platform differences.

[0031] Specifically, a preset serialization message protocol is first configured in both the first runtime environment (e.g., Android) and the second runtime environment (e.g., iOS). This step ensures that both environments can understand and process serialized messages in a unified format. In the first runtime environment, the interactive data to be transmitted is converted into a serialized message in a unified format according to the protocol and sent to the second runtime environment. In the second runtime environment, the received serialized message is parsed into data equivalent to the data structure of that environment, i.e., equivalent data. Then, the second runtime environment processes this equivalent data to generate response data. Finally, the response data is again converted into a serialized message in a unified format using the preset serialization message protocol and returned to the first runtime environment. By establishing a bidirectional communication channel, efficient data exchange between different platforms is achieved. By using the preset serialization message protocol, the consistency and integrity of data during transmission are ensured, avoiding data parsing errors caused by platform differences. This bidirectional communication channel enables the two runtime environments to exchange interactive and response data in real time, thereby achieving more flexible and efficient cross-platform debugging. This not only improves the accuracy and efficiency of debugging but also enhances the ability to handle complex data structures, ensuring consistent application behavior across different platforms. Furthermore, this approach reduces the workload for developers in manually adjusting data formats across different platforms, improving development efficiency and user experience. Developers are able to better manage and optimize the performance and functionality of cross-platform applications.

[0032] In one embodiment, collecting and processing interaction data between the first and second runtime environments via a communication channel includes: By monitoring message transmission within the communication channel, the raw data of the interaction between the first and second operating environments can be obtained; Store the raw data in a temporary buffer queue; The raw data in the temporary buffer queue is batch merged and compressed to generate data packets to be transmitted.

[0033] The communication channel refers to the bidirectional data transmission path established between the first runtime environment (such as Android) and the second runtime environment (such as iOS). Through this channel, the two environments can exchange information in real time, ensuring the consistency of application behavior across different platforms. Raw data refers to the unprocessed data obtained by monitoring message transmission within the communication channel. This data represents real-time interaction information between the two environments, including user operations, system events, and application status. The temporary buffer queue is a memory structure used to temporarily store raw data. Its function is to collect and save real-time data obtained from the communication channel, awaiting subsequent processing.

[0034] Specifically, raw data from the interaction between the first and second runtime environments is acquired by monitoring message transmission within the communication channel. This data is stored in a temporary buffer queue for subsequent processing. The raw data in the temporary buffer queue is then batch-merged and compressed to generate data packets for transmission. Batch merging combines multiple small data fragments into a larger data packet to improve transmission efficiency. Compression reduces the size of the data packets, lowering bandwidth consumption and transmission time. Real-time monitoring of the communication channel ensures comprehensive acquisition of cross-platform interaction data, making the debugging process more accurate. Using a temporary buffer queue to store raw data effectively manages data flow and prevents data loss or omission. Batch merging and compression further optimize data transmission efficiency, reducing network load and transmission latency. This data processing strategy not only improves the efficiency and accuracy of debugging but also enhances support for large-scale data interaction, ensuring high-performance operation of the application across different platforms.

[0035] In one embodiment, such as Figure 3 As shown, integrating the corresponding debugging code into the mobile application also includes: integrating interface rendering code for generating a visual debugging interface, and displaying the processed data in real time in the visual debugging interface associated with the communication channel, including: In response to the successful establishment of the bidirectional communication channel, a visual debugging interface associated with the communication channel is generated based on the interface rendering code; Establish a data connection between the visual debugging interface and the two-way communication channel; The processed data is displayed in real time in the visual debugging interface via data connection.

[0036] The interface rendering code is a code module used to generate a visual debugging interface. It is responsible for presenting the processed data in a graphical way, enabling developers to intuitively observe and analyze the application's running status. The visual debugging interface is a graphical interface associated with the communication channel, which displays the application's real-time data and status in different running environments. This interface provides developers with a comprehensive debugging perspective through charts, logs, and other visual elements.

[0037] Specifically, by integrating interface rendering code and establishing real-time data connections, a graphical display of debugging information is achieved. The generated visual debugging interface provides an intuitive way to observe application performance and behavior, helping developers quickly locate problems and conduct effective analysis. Through real-time association with the communication channel, the debugging interface can continuously display the latest data changes, ensuring that developers always have a grasp of the application's running status. This real-time display function improves debugging efficiency and accuracy, enabling developers to respond and resolve issues more quickly. Furthermore, by using the visual debugging interface, developers can reduce their reliance on complex code and logs, instead relying on graphical tools for analysis and decision-making. This not only simplifies the debugging process but also improves user experience and application stability. Overall, this approach enhances the functionality and ease of use of debugging tools, providing a more efficient debugging solution for mobile application development.

[0038] In one embodiment, the method further includes: The raw interactive data transmitted through the communication channel is scanned, and sensitive information is identified through regular expression matching and keyword list comparison. The identified sensitive information is masked according to predefined de-identification rules; The anonymized data is then encrypted end-to-end using an encryption algorithm. The encrypted data is transmitted to the visual debugging interface for display.

[0039] Regular expression matching is a technique for identifying text patterns, scanning and identifying specific information in data by defining specific patterns; a keyword list is a predefined vocabulary set used to compare and identify potentially sensitive information contained in data; sensitive information refers to personal or confidential data that needs to be protected during data transmission, such as passwords and credit card numbers; de-identification rules are predefined strategies used to mask identified sensitive information to prevent unauthorized access; masking refers to partially or completely obscuring sensitive information, making it invisible or unrecognizable during data transmission; encryption algorithms are techniques used to protect data confidentiality by encoding data so that it cannot be read by unauthorized parties during transmission.

[0040] Specifically, it ensures data security and privacy protection during transmission and display through multi-layered security measures. By using regular expression matching and keyword list comparison, it efficiently identifies and processes sensitive information in the data, preventing its leakage. The application of de-identification rules further protects sensitive information, making it unidentifiable during transmission. The use of encryption algorithms ensures that even if data is intercepted, it cannot be interpreted by unauthorized parties, thus providing strong security. It not only improves the security of data transmission but also enhances privacy protection during debugging, ensuring that developers do not unintentionally disclose users' sensitive information while debugging applications. By transmitting encrypted data to a visual debugging interface, developers can continue efficient debugging and analysis while ensuring data security. It provides a secure and reliable debugging solution for mobile application development, improving user data security and the overall trustworthiness of the application.

[0041] In one embodiment, the method further includes: The performance metrics data of the first and second operating environments are collected using a performance acquisition device. Historical performance index data is acquired and statistically analyzed based on the sliding window algorithm to obtain a dynamic threshold. The dynamic threshold is determined by μ + k × σ, where μ represents the mean of historical data, σ represents the standard deviation, and k represents the sensitivity coefficient. The performance metric data is compared with a dynamic threshold. When the number of times the performance metric data exceeds the dynamic threshold consecutively reaches a preset number, the corresponding alarm mechanism is activated. Multi-level alarm information is generated based on the degree of deviation of performance indicators, and corresponding early warning methods are executed according to the alarm level.

[0042] The performance collector is a tool or module used to collect performance metric data from a primary runtime environment (such as Android) and a secondary runtime environment (such as iOS). This data includes key performance parameters such as CPU utilization, memory consumption, and network latency, helping developers monitor the application's running status. Historical performance metric data refers to performance data collected over a past period, used to analyze the application's long-term performance and trends. The sliding window algorithm is a method for real-time data analysis that calculates statistical values ​​of data within a defined time window to dynamically adjust the analysis results. The dynamic threshold is a variable boundary calculated based on historical performance metric data, used to determine whether the current performance metric is within a normal range.

[0043] Specifically, by dynamically adjusting thresholds and implementing a multi-level alarm mechanism, real-time monitoring and intelligent alerts for application performance are achieved. The use of a performance data collector ensures comprehensive monitoring of application performance, enabling developers to promptly identify potential performance issues. The sliding window algorithm and dynamic thresholds provide a flexible performance evaluation method, allowing thresholds to be dynamically adjusted based on historical data changes, avoiding false positives or false negatives that might occur with fixed thresholds. The generation and execution of multi-level alarm information, based on the severity of performance deviations, help developers prioritize the most pressing issues and optimize resource allocation and response strategies. Performance metric data collected by the performance data collector is compared with historical data, and a dynamic threshold is calculated using the sliding window algorithm. The dynamic threshold is determined by the formula μ + k × σ, where μ is the mean of the historical data, σ is the standard deviation, and k is the sensitivity coefficient. The system determines whether to trigger the alarm mechanism based on the comparison result between the performance metric data and the dynamic threshold. Specifically, when the performance metric data exceeds the dynamic threshold consecutively a preset number of times, the system will activate the alarm mechanism. Alarm information is categorized into multiple levels based on the degree to which performance metrics deviate from dynamic thresholds, such as informative alerts, warnings, critical warnings, and emergency alerts. Each alert level corresponds to a different response: informative alerts may only log in the console, while warnings may send email notifications to the administrator; critical warnings may trigger performance optimization scripts, while emergency alerts may initiate automated recovery operations, such as restarting the service or switching to a standby system. By dynamically adjusting thresholds, the system can more flexibly adapt to environmental changes, reducing false alarms and missed alarms. Simultaneously, the multi-level alarm mechanism ensures that the system can take appropriate measures based on the severity of the problem, promptly notify administrators, and execute corresponding automated operations, thereby improving system stability and reliability.

[0044] In one embodiment, the method further includes device permission verification: Before starting the debugging function, collect the device's fingerprint information, which includes at least two of the following: device unique identifier, MAC address, operating system version, and device model. The collected device fingerprint information is subjected to a secure hash calculation to generate an irreversible device feature code. The device signature is matched and verified against the pre-authorized device whitelist database; When the device signature exists in the whitelist database and verification is successful, a debug session can be established; When the device signature fails verification, the debugging function is terminated and the temporarily generated debugging data is cleared.

[0045] In one embodiment, the method further includes isolated storage of debug data: Create a separate sandbox storage area when the application starts, which is completely isolated from the application's business data storage space; Configure the data read / write permissions of the debugging module to restrict debugging data to be written only to the sandbox storage area; During the debugging process, debugging process data, log records, and performance index data are stored in the sandbox storage area. When the application uninstallation event is triggered, the sandbox data cleanup program is automatically executed to delete debugging-related data in the sandbox storage area; The creation of the sandbox storage area adopts a path isolation mechanism based on user identifiers to ensure that debugging data between different users is not visible to each other.

[0046] In one embodiment, the device whitelist database supports remote dynamic updates, allowing authorized devices to be added or removed in real time via a secure interface, including: The sandbox storage area uses a transparent encryption mechanism to automatically encrypt the written debug data, and the encryption key is bound to the device hardware feature code; The data cleaning process includes a secure erasure procedure that performs multiple overwrite operations on deleted data to prevent data recovery.

[0047] Specifically, the device permission verification step involves the system collecting the device's fingerprint information before starting the debugging function. The fingerprint information includes at least two of the following: the device's unique identifier, MAC address, operating system version, and device model. This information is used to generate an irreversible device signature through secure hash calculation. The device signature is used to match and verify against a pre-authorized device whitelist database. If the device signature exists in the whitelist database and verification is successful, the system allows the establishment of a debugging session; otherwise, the system terminates the debugging function and clears temporarily generated debugging data. The debug data isolation and storage step involves creating an independent sandbox storage area when the application starts, which is completely isolated from the application's business data storage space. The data read / write permissions of the debugging module are configured to only allow writing to the sandbox storage area. During debugging, debugging process data, log records, and performance indicator data are stored in the sandbox storage area. When the application uninstallation event is triggered, the system automatically executes the sandbox data cleanup procedure, deleting debugging-related data in the sandbox storage area. The creation of the sandbox storage area uses a path isolation mechanism based on user identifiers to ensure that debugging data between different users is not visible to each other. The device whitelist database supports remote dynamic updates, allowing authorized devices to be added or removed in real time through a secure interface. The sandbox storage area employs a transparent encryption mechanism, automatically encrypting written debug data, with the encryption key bound to the device's hardware signature. The data cleanup procedure includes a secure erase process, performing multiple overwrite operations on deleted data to prevent recovery. In this context, the "device signature" refers to a unique identifier generated using device fingerprint information, used to verify the device's authorization status. The "sandbox storage area" refers to an independent storage space used to isolate debug data, ensuring its separation from business data. The "transparent encryption mechanism" means that the data encryption process is transparent to users and applications, executing automatically without user intervention. The "secure erase process" refers to the process of repeatedly overwriting data to ensure its irrecoverability.

[0048] By employing device access verification and isolated debugging data storage, the system ensures the security of debugging functions while protecting the privacy and integrity of user data. Device access verification, through a rigorous matching and verification process, ensures that only authorized devices can perform debugging, thus preventing unauthorized access. Isolated debugging data storage uses a sandbox mechanism to separate debugging data from business data, preventing debugging data leakage or misuse. Transparent encryption and secure erasure further enhance data protection, ensuring that data cannot be illegally accessed or recovered even during data storage and deletion. Through these measures, the system not only improves the security of the debugging process but also enhances the overall reliability of the application and user trust.

[0049] In one embodiment, such as Figure 2As shown, this application provides a debugging device for a mobile application development framework. The device includes: a pattern determination module 610, a code injection module 620, a channel establishment module 630, a data acquisition module 640, and a data interaction module 650, used for: The mode determination module 610 detects the operating mode of the mobile application; The code injection module 620 integrates the corresponding debugging code into the mobile application based on the running mode. The channel establishment module 630 establishes a bidirectional communication channel between the first operating environment and the second operating environment through a preset serialized message protocol; The data acquisition module 640 collects and processes the interactive data between the first operating environment and the second operating environment through the communication channel; The data interaction module 650 displays the processed data in real time on a visual debugging interface associated with the communication channel.

[0050] In one embodiment, the code injection module 620 is used for: In response to the detection that the running mode is development mode or test mode, the first set of debug code containing full debugging capabilities is integrated into the mobile application; In response to the detection that the operating mode is production mode, a second set of debug code containing only core performance monitoring functions is integrated into the mobile application, wherein the first set of debug code contains more code modules than the second set of debug code.

[0051] In one embodiment, the channel establishment module 630 is used for: Configure preset serialization message protocols in the first and second runtime environments respectively; In the first runtime environment, based on a preset serialization message protocol, the interactive data to be transmitted is converted into a serialized message in a unified format and sent to the second runtime environment; In the second operating environment, based on a preset serialization message protocol, the received serialized messages are parsed and converted into equivalent data that is equivalent to the data structure of this environment; The second runtime environment processes the equivalent data, generates response data, and converts the response data into a serialized message in a unified format based on a preset serialization message protocol, returning it to the first runtime environment.

[0052] Embodiments of this application also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in the debugging method embodiments of any of the mobile application development frameworks described above at runtime.

[0053] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.

[0054] Embodiments of this application also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in the debugging method embodiments of any of the mobile application development frameworks described above.

[0055] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in connection with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both, such as Figure 3 As shown, to clearly illustrate the interchangeability of hardware and software, the components and steps of each example have been generally described in terms of functionality in the above description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0056] The debugging method for a mobile application development framework provided in this application has been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are only for the purpose of helping to understand the method and core ideas of this application. It should be noted that those skilled in the art can make several improvements and modifications to this application without departing from the principles of this application, and these improvements and modifications also fall within the protection scope of the claims of this application.

Claims

1. A debugging method for a mobile application development framework, characterized in that, include: Detect the operating mode of mobile applications; Based on the operating mode, the corresponding debugging code is integrated into the mobile application; A bidirectional communication channel is established between the first and second runtime environments by using a pre-defined serialized message protocol. The communication channel is used to collect and process the interaction data between the first operating environment and the second operating environment; The processed data is displayed in real time in a visual debugging interface associated with the communication channel.

2. The debugging method for a mobile application development framework according to claim 1, characterized in that, The operating mode includes at least one of the following: development mode, testing mode, and production mode. Integrating the corresponding debugging code into the mobile application according to the operating mode includes: In response to detecting that the operating mode is the development mode or the test mode, a first set of debug code containing full debugging functionality is integrated into the mobile application; In response to the detection that the operating mode is production mode, a second set of debug code containing only core performance monitoring functions is integrated into the mobile application, wherein the first set of debug code contains more code modules than the second set of debug code.

3. The debugging method for a mobile application development framework according to claim 1, characterized in that, A bidirectional communication channel is established between the first and second runtime environments through a pre-defined serialized message protocol, including: Configure the preset serialization message protocol in the first operating environment and the second operating environment respectively; In the first operating environment, based on the preset serialization message protocol, the interactive data to be transmitted is converted into a serialized message in a unified format and sent to the second operating environment; In the second operating environment, based on the preset serialization message protocol, the received serialization message is parsed and converted into equivalent data that is equivalent to the data structure of this environment; The second operating environment processes the equivalent data to generate response data, and based on the preset serialization message protocol, converts the response data into a serialized message in a unified format and returns it to the first operating environment.

4. The debugging method for a mobile application development framework according to claim 3, characterized in that, The communication channel is used to collect and process interaction data between the first operating environment and the second operating environment, including: By monitoring message transmission within the communication channel, the raw data of the interaction between the first operating environment and the second operating environment can be obtained; The original data is stored in a temporary buffer queue; The original data in the temporary buffer queue is batch merged and compressed to generate a data packet to be transmitted.

5. The debugging method for a mobile application development framework according to claim 1, characterized in that, The integration of the corresponding debugging code into the mobile application further includes: integrating interface rendering code for generating a visual debugging interface; and displaying the processed data in real time in the visual debugging interface associated with the communication channel, including: In response to the successful establishment of the bidirectional communication channel, the visual debugging interface associated with the communication channel is generated based on the interface rendering code; Establish a data connection between the visual debugging interface and the bidirectional communication channel; The processed data is displayed in real time on the visualization debugging interface via the data connection.

6. The debugging method for a mobile application development framework according to claim 4, characterized in that, The method further includes: The raw interactive data transmitted through the communication channel is scanned, and sensitive information is identified by regular expression matching and keyword list comparison. The identified sensitive information is masked according to predefined desensitization rules; The anonymized data is then encrypted end-to-end using an encryption algorithm. The encrypted data is transmitted to the visual debugging interface for display.

7. The debugging method for a mobile application development framework according to claim 1, characterized in that, The method further includes: The performance metrics data of the first and second operating environments are collected using a performance acquisition device. Historical performance index data is acquired and statistically analyzed based on the sliding window algorithm to obtain a dynamic threshold, wherein the dynamic threshold is determined by μ + k × σ, where μ represents the mean of historical data, σ represents the standard deviation, and k represents the sensitivity coefficient. The performance index data is compared with the dynamic threshold. When the number of times the performance index data exceeds the dynamic threshold consecutively reaches a preset number, the corresponding alarm mechanism is activated. Multi-level alarm information is generated based on the degree of deviation of performance indicators, and corresponding early warning methods are executed according to the alarm level.

8. A debugging device for a mobile application development framework, characterized in that, The device includes: The mode determination module is used to detect the operating mode of the mobile application; The code injection module is used to integrate the corresponding debugging code into the mobile application according to the running mode; The channel establishment module is used to establish a bidirectional communication channel between the first runtime environment and the second runtime environment through a preset serialized message protocol. The data acquisition module is used to collect and process the interactive data between the first operating environment and the second operating environment through the communication channel; The data interaction module is used to display the processed data in real time in a visual debugging interface associated with the communication channel.

9. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.