CN108446217A - A kind of method and computer equipment controlling Debugging message output by sub-module - Google Patents

A kind of method and computer equipment controlling Debugging message output by sub-module Download PDF

Info

Publication number
CN108446217A
CN108446217A CN201810132360.5A CN201810132360A CN108446217A CN 108446217 A CN108446217 A CN 108446217A CN 201810132360 A CN201810132360 A CN 201810132360A CN 108446217 A CN108446217 A CN 108446217A
Authority
CN
China
Prior art keywords
debugging message
module
debugging
information
data structure
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201810132360.5A
Other languages
Chinese (zh)
Inventor
陈成秋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujian Centerm Information Co Ltd
Original Assignee
Fujian Centerm Information Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujian Centerm Information Co Ltd filed Critical Fujian Centerm Information Co Ltd
Priority to CN201810132360.5A priority Critical patent/CN108446217A/en
Publication of CN108446217A publication Critical patent/CN108446217A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging

Abstract

The present invention provides a kind of method controlling Debugging message output by sub-module, including:Step 1 establishes a set of data structure for managing Debugging message output;Step 2, the information that required debugging software module is registered in the data structure;Step 3, configuration Debugging message export permission;Step 4 exports Debugging message according to configuration information;The present invention also provides a kind of computer equipments, convenient for the output of control Debugging message.

Description

A kind of method and computer equipment controlling Debugging message output by sub-module
Technical field
The present invention relates to a kind of methods and computer equipment controlling Debugging message output by sub-module.
Background technology
It is most common tune by adding " print " sentence in code to export Debugging message in software development process Examination mode.In most cases, software development is all that more people participate in, everyone is responsible for different software modules.People in the art is Know, when debugging a module, the Debugging message for having a large amount of other modules sometimes is full of wherein, these information are more All it is garbage to this modular debugging when number, the debugging of this module can be interfered.Debugging effect that is light then influencing module Rate even makes debugging efforts that can not continue when serious.This modular debugging is influenced in the Debugging message of other modules bigger When, it is necessary to by Debugging message go for other people in project team confirm interference information source, then by where interference information After interference information is closed submission by the responsible person of module, it is further continued for debugging.It develops over time, forgets sometimes, or The reasons such as person original responsible person transfer have left, and can not directly pass through the content check source of interference information, it is necessary to entire It searches for and searches in software systems, under efficiency is very low.
In view of the above problems, common processing scheme is:
1) by increasing some auxiliary informations, help confirms interference information source.It helps to confirm which interference information comes from Whom a module, responsible person be.Common processing scheme is where adding this Debugging message in all " print " sentences The information such as file name or function name are to assist in identifying interference information by filename or function name these collateral informations Which exported from software module.
2) switch control is carried out by the macro Debugging message to module.Add the switch of entire modular debugging information output The switch of macro and part Debugging message output is macro.It adds multiple macro, keeps configuration more flexible.
3) setting debugging grade can close the Debugging message output of inferior grade.
The shortcomings that common processing scheme:
1) by file name or function name come location interference information source, although more straight than by interference information text It sees, but still needs just to can confirm that by module owner.Meanwhile filename, the contents such as function name, word string can be very long sometimes, It is equivalent to and introduces new interference.
2) it is switched by macro, it is still desirable to be provided after being recompilated by module owner and close Debugging message output Module software.
3) since debugging grade is global to entire software effective, perhaps adjustment debugging grade can close interference information, But the Debugging message output of the same grade of this module can be also closed simultaneously.
Invention content
The technical problem to be solved in the present invention, be to provide it is a kind of by sub-module control Debugging message output method and Computer equipment so that the programmer for being only responsible for some software module encounters interference information when carrying out program debugging When interfering debugging, it can get which software module is interference information come from by " short name configuration ", then modification as needed " output configuration " shields interference information.If software systems support console debug, console instruction pair can also be passed through The Debugging message output of module is configured, and modification code all saves.
What one of present invention was realized in:A method of Debugging message output is controlled by sub-module, including:
Step 1 establishes a set of data structure for managing Debugging message output;
Step 2, the information that required debugging software module is registered in the data structure;
Step 3, configuration Debugging message export permission;
Step 4 exports Debugging message according to configuration information;
Further, the step 1 is specially further:Establish a set of data knot for managing Debugging message output Structure, the information of each software module of data structure records, and information is organized.
Further, the step 2 is specially further:The letter of debugging software module needed for being registered in the data structure Breath;The software module is equipped with title, and described information includes the title.
Further, the step 3 is specially further:The configuration item that respective software module is retrieved according to title, matches Set whether Debugging message head adds title and whether the Debugging message of the software module exports.
What the two of the present invention were realized in:A kind of computer equipment, including memory, processor and it is stored in memory Computer program that is upper and can running on a processor, which is characterized in that the processor is realized following when executing described program Step:
Step 1 establishes a set of data structure for managing Debugging message output;
Step 2, the information that required debugging software module is registered in the data structure;
Step 3, configuration Debugging message export permission;
Step 4 exports Debugging message according to configuration information;
Further, the step 1 is specially further:Establish a set of data knot for managing Debugging message output Structure, the information of each software module of data structure records, and information is organized.
Further, the step 2 is specially further:The letter of debugging software module needed for being registered in the data structure Breath;The software module is equipped with title, and described information includes the title.
Further, the step 3 is specially further:The configuration item that respective software module is retrieved according to title, matches Set whether Debugging message head adds title and whether the Debugging message of the software module exports.
The invention has the advantages that:
1) in the software development process that more people participate in, the source of Debugging message can be quickly identified.It is configured to every tune Examination information header exports " short name " of software module where it automatically, such as liquid crystal driver module using " lcd " as " short name ", It is known that the software module belonging to this Debugging message is that liquid crystal drives according to " lcd " on Debugging message head this " short name " It is dynamic;
2) it avoids increasing interference information.Although being just desirable in " short name " design under the premise of intuitive as possible briefly, But be not very necessary information after all in most cases, thus will " short name " whether export make it is configurable.Acquiescence It is configured as not exporting, export again when needed;
3) can at any time switch module Debugging message output.By call function interface in a program or pass through console The mode of (software systems is needed to support) debugging, the Debugging message output of switch module, reaches efficient debugging software whenever and wherever possible The purpose of module.
By this Analysis of Nested Design, avoids cooperate with other people unnecessary communications as far as possible so that module software developer The action oneself being responsible for can be focused more on, ensure that working efficiency.
Description of the drawings
The present invention is further illustrated in conjunction with the embodiments with reference to the accompanying drawings.
Fig. 1 is the method for the present invention execution flow chart.
Fig. 2 is the execution flow chart of single Debugging message of the present invention output.
Specific implementation mode
As shown in Figure 1, the present invention controls the method that Debugging message exports by sub-module, including:
Step 1 establishes a set of data structure for managing Debugging message output, each software mould of data structure records The information of block, and information is organized;
Step 2, the information that required debugging software module is registered in the data structure;The software module is equipped with title, Described information includes the title;
Whether step 3, the configuration item that respective software module is retrieved according to title, configuration Debugging message head add name Claim and whether the Debugging message of the software module exports;
Step 4 exports Debugging message according to configuration information.
Computer equipment of the present invention, including memory, processor and storage can be run on a memory and on a processor Computer program, which is characterized in that the processor realizes following steps when executing described program:
Step 1 establishes a set of data structure for managing Debugging message output, each software mould of data structure records The information of block, and information is organized;
Step 2, the information that required debugging software module is registered in the data structure;The software module is equipped with title, Described information includes the title;
Whether step 3, the configuration item that respective software module is retrieved according to title, configuration Debugging message head add name Claim and whether the Debugging message of the software module exports;
Step 4 exports Debugging message according to configuration information.
As shown in Fig. 2, a kind of specific implementation mode of the present invention:
1) data structure of Debugging message outgoing management is established
The data structure of individual module
Modules are linked by list structure
2) by new module access-in management chained list by way of registration
Oneself is included in Debugging message by i.e. each software module by providing short name to LogModuleRegister functions Output control.Acquiescence allows this module to export Debugging message, but not output module short name.
3) encapsulation " print " interface exports Debugging message
It uses, interface parameters can be simplified by function macro mode, such as convenience of module software:#define LcdPrintf(fmt,...)LogModulePrintf(“lcd”,fmt,##__VA_ARGS__)
In this way, using just with using common printf functions to be.
4) by the corresponding catena member of setup module, Debugging message output is controlled
It is used for convenience of module software, more interfaces can also be encapsulated, Debugging message is controlled, such as BOOL LogModuleMsgOnly(char*lpcName)
Only allow this module output debugging letter;
BOOL LogModuleAllNameOn(void)
Allow all Debugging message output module short names.
Although specific embodiments of the present invention have been described above, those familiar with the art should manage Solution, we are merely exemplary described specific embodiment, rather than for the restriction to the scope of the present invention, it is familiar with this The technical staff in field modification and variation equivalent made by the spirit according to the present invention, should all cover the present invention's In scope of the claimed protection.

Claims (8)

1. a kind of method controlling Debugging message output by sub-module, it is characterised in that:Including:
Step 1 establishes a set of data structure for managing Debugging message output;
Step 2, the information that required debugging software module is registered in the data structure;
Step 3, configuration Debugging message export permission;
Step 4 exports Debugging message according to configuration information.
2. a kind of method controlling Debugging message output by sub-module according to claim 1, it is characterised in that:It is described Step 1 is specially further:A set of data structure for managing Debugging message output is established, the data structure records are each soft The information of part module, and information is organized.
3. a kind of method controlling Debugging message output by sub-module according to claim 1, it is characterised in that:It is described Step 2 is specially further:The information of debugging software module needed for being registered in the data structure;The software module is equipped with name Claim, described information includes the title.
4. a kind of method controlling Debugging message output by sub-module according to claim 3, it is characterised in that:It is described Step 3 is specially further:The configuration item of respective software module is retrieved according to title, whether configuration Debugging message head adds Whether the Debugging message of title and the software module exports.
5. a kind of computer equipment, including memory, processor and storage are on a memory and the meter that can run on a processor Calculation machine program, which is characterized in that the processor realizes following steps when executing described program:
Step 1 establishes a set of data structure for managing Debugging message output;
Step 2, the information that required debugging software module is registered in the data structure;
Step 3, configuration Debugging message export permission;
Step 4 exports Debugging message according to configuration information.
6. a kind of method controlling Debugging message output by sub-module according to claim 1, it is characterised in that:It is described Step 1 is specially further:A set of data structure for managing Debugging message output is established, the data structure records are each soft The information of part module, and information is organized.
7. a kind of method controlling Debugging message output by sub-module according to claim 1, it is characterised in that:It is described Step 2 is specially further:The information of debugging software module needed for being registered in the data structure;The software module is equipped with name Claim, described information includes the title.
8. a kind of method controlling Debugging message output by sub-module according to claim 7, it is characterised in that:It is described Step 3 is specially further:The configuration item of respective software module is retrieved according to title, whether configuration Debugging message head adds Whether the Debugging message of title and the software module exports.
CN201810132360.5A 2018-02-09 2018-02-09 A kind of method and computer equipment controlling Debugging message output by sub-module Pending CN108446217A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810132360.5A CN108446217A (en) 2018-02-09 2018-02-09 A kind of method and computer equipment controlling Debugging message output by sub-module

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810132360.5A CN108446217A (en) 2018-02-09 2018-02-09 A kind of method and computer equipment controlling Debugging message output by sub-module

Publications (1)

Publication Number Publication Date
CN108446217A true CN108446217A (en) 2018-08-24

Family

ID=63192106

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810132360.5A Pending CN108446217A (en) 2018-02-09 2018-02-09 A kind of method and computer equipment controlling Debugging message output by sub-module

Country Status (1)

Country Link
CN (1) CN108446217A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101089827A (en) * 2007-07-27 2007-12-19 中兴通讯股份有限公司 Function call tracking system and method
CN101183333A (en) * 2007-12-12 2008-05-21 腾讯科技(深圳)有限公司 Method for outputting diary of debugging program, device and system
CN101826049A (en) * 2009-03-06 2010-09-08 上海摩波彼克半导体有限公司 Implementation method for debugging information output in embedded system
CN102270131A (en) * 2011-06-29 2011-12-07 深圳市博康智能信息技术有限公司 System for unified management of debugging information
US20120124556A1 (en) * 2010-11-16 2012-05-17 Hon Hai Precision Industry Co., Ltd. Computing device and device driver debugging method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101089827A (en) * 2007-07-27 2007-12-19 中兴通讯股份有限公司 Function call tracking system and method
CN101183333A (en) * 2007-12-12 2008-05-21 腾讯科技(深圳)有限公司 Method for outputting diary of debugging program, device and system
CN101826049A (en) * 2009-03-06 2010-09-08 上海摩波彼克半导体有限公司 Implementation method for debugging information output in embedded system
US20120124556A1 (en) * 2010-11-16 2012-05-17 Hon Hai Precision Industry Co., Ltd. Computing device and device driver debugging method
CN102467447A (en) * 2010-11-16 2012-05-23 鸿富锦精密工业(深圳)有限公司 Driver debugging system and method
CN102270131A (en) * 2011-06-29 2011-12-07 深圳市博康智能信息技术有限公司 System for unified management of debugging information

Similar Documents

Publication Publication Date Title
CN103309792B (en) A kind of control method of log information and system
CN107967316A (en) A kind of method of data synchronization, equipment and computer-readable recording medium
Bagheri et al. Software architectural principles in contemporary mobile software: from conception to practice
US7913224B2 (en) Device for the automated generation of program code
CN109657177A (en) The generation method of the page, device, storage medium and computer equipment after upgrading
CN107896162A (en) Dispositions method, device, computer equipment and the storage medium of monitoring system
CN107622211A (en) A kind of large data sets monarchial power limit access control method and device
CN107665216A (en) A kind of data bank access method and middleware
CN108363566A (en) File configuration method, intelligent terminal and storage medium in a kind of project development process
US20130205300A1 (en) Method and system for managing resource
CN105593859A (en) Method and system for managing and editing data of medical device
CN106293669A (en) A kind of generation method and apparatus of web pages component
CN103412745A (en) Development and application platform
García-Sánchez et al. Service oriented evolutionary algorithms
CN105718601A (en) Dynamic business integrating model and application method thereof
CN105354073B (en) A kind of stand-alone application networking method based on android system and system
US7831955B2 (en) Development and execution platform
CN112015374A (en) Cross-programming-language micro-service integration system based on natural language
CN108446217A (en) A kind of method and computer equipment controlling Debugging message output by sub-module
Szyperski Insight ETHOS: On object-orientation in operating systems
CN107368336A (en) A kind of cloud data center deployed with devices and the method and apparatus of management
US10977099B2 (en) Interchanging real-time data between program modules
Paronen A web-based monitoring system for the Industrial Internet
Lux The imalab method for vision systems
Kirsch et al. Snippets and Component-Based Authoring Tools for Reusing and Connecting Documents.

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20180824

RJ01 Rejection of invention patent application after publication