CN108319548A - A kind of program code adjustment method and device - Google Patents
A kind of program code adjustment method and device Download PDFInfo
- Publication number
- CN108319548A CN108319548A CN201710046481.3A CN201710046481A CN108319548A CN 108319548 A CN108319548 A CN 108319548A CN 201710046481 A CN201710046481 A CN 201710046481A CN 108319548 A CN108319548 A CN 108319548A
- Authority
- CN
- China
- Prior art keywords
- script
- debugging
- language
- debug command
- target
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/362—Software debugging
- G06F11/3628—Software debugging of optimised code
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
Abstract
The embodiment of the present application provides a kind of program code adjustment method and device, including:Call debug command packet;The debug command packet has and debugging script at least corresponding with a kind of language form;The debugging script has debug command;Determine the language form for the program code currently debugged;Determine that target corresponding with the language form for the program code currently debugged debugs script;The target debugging script is run, program code operation result corresponding with the target debugging debug command of script is obtained.In the embodiment of the present application, either debug the program code of the program code or Swift language to Objective C languages, user only needs to input a debug command packet, LLDB debuggers call automatically to be debugged script and is debugged accordingly in debug command packet, without being manually entered multiple debug commands, you can realize required debugging effect.To simplify user's operation, reduces debugging difficulty and debug time can be saved.
Description
Technical field
This application involves software technology fields, more particularly to a kind of debug command packet generation method, a kind of program code
Adjustment method, a kind of debug command packet generating means and a kind of program code debugging apparatus.
Background technology
Present program becomes increasingly complex, and leads to various challenges occur, it is therefore desirable to be sent out with debugger
Now and solve the problems, such as.
The LLDB debuggers that the debugging of iOS at present is developed based on apple, are debugged by LLDB orders, but LLDB orders
Comparing more, different orders has different purposes, and parameter is various, and different parameters represent different processing.Developer is come
It says, to make good use of debugging function, it is more demanding to the debugging grounding in basic skills of developer.
And in order to reach some common debugging effects, needs to input multiple LLDB orders and be combined operation.Every time
Debugging will repeatedly input many similar orders to operate.For example search View, preserve in data to file, it needs to input
Multiple orders are combined to complete together, are difficult to remember these orders in this way for developer.
Invention content
In view of the above problems, it is proposed that the embodiment of the present application overcoming the above problem or at least partly in order to provide one kind
A kind of debug command packet generation method to solve the above problems, a kind of program code adjustment method, a kind of debug command packet generation
Device and a kind of program code debugging apparatus.
To solve the above-mentioned problems, the embodiment of the present application discloses a kind of debug command packet generation method, including:
Receive the debugging script for different language type;The debugging script includes debug command;
The storage debugging script for being directed to different language type, as debug command packet.
Preferably, the language form includes:Objective-C language and Swift language;
It is described receive for different language type debugging script the step of include:
Receive the debugging script for Objective-C language, and the debugging script for Swift language;
It is directed to the debugging script of different language type described in the storage, includes as the step of debug command packet:
The storage debugging script for Objective-C language and the debugging script for Swift language,
As debug command packet.
Preferably, the debugging script for a kind of encapsulation code of language form and debug command by forming.
The embodiment of the present application also discloses a kind of program code adjustment method, including:
Call debug command packet;The debug command packet has and debugging script at least corresponding with a kind of language form;
The debugging script has debug command;
Determine the language form for the program code currently debugged;
Determine that target corresponding with the language form for the program code currently debugged debugs script;
The target debugging script is run, program code corresponding with the target debugging debug command of script is obtained and transports
Row result.
Preferably, the debug command packet has:For the debugging script of Objective-C language, and it is directed to Swift languages
The debugging script of speech;
The step of determination corresponding with the language form for the program code currently debugged target debugging script includes:
If the language form for the program code currently debugged is Objective-C language, Objective-C languages will be directed to
The debugging script of speech is determined as target debugging script;
If the language form for the program code currently debugged is Swift language, will be for the debugging script of Swift language
It is determined as target debugging script.
Preferably, the debugging script for a kind of encapsulation code of language form and debug command by forming;The fortune
The row target debugs script, obtains the step of program code operation result corresponding with the target debugging debug command of script
Suddenly include:
Debug command and the encapsulation code for running the target debugging script, obtain the debugging with target debugging script
Order corresponding program code operation result.
The embodiment of the present application also discloses a kind of debug command packet generating means, including:
Script receiving module is debugged, for receiving the debugging script for different language type;The debugging script includes
Debug command;
Debug command packet generation module is ordered for storing the debugging script for being directed to different language type as debugging
Enable packet.
Preferably, the language form includes:Objective-C language and Swift language;
The debugging script receiving module includes:
Script receiving submodule is debugged, is used to receive the debugging script for Objective-C language, and be directed to Swift
The debugging script of language;
The debug command packet generation module includes:
Debug command packet generates submodule, for storing the debugging script for Objective-C language and described
For the debugging script of Swift language, as debug command packet.
Preferably, the debugging script for a kind of encapsulation code of language form and debug command by forming.
The embodiment of the present application also discloses a kind of program code debugging apparatus, including:
Debug command packet calling module, for calling debug command packet;The debug command packet have at least with one kind
The corresponding debugging script of language form;The debugging script has debug command;
Language form determining module, the language form for determining the program code currently debugged;
Target debugs script determining module, for determining target corresponding with the language form for the program code currently debugged
Debug script;
Target debugs script running module, debugs script for running the target, obtains and debug script with the target
The corresponding program code operation result of debug command.
Preferably, the debug command packet has:For the debugging script of Objective-C language, and it is directed to Swift languages
The debugging script of speech;
The target debugs script determining module:
First object debugs script determination sub-module, if the language form of the program code for currently debugging is
Objective-C language then will be determined as target for the debugging script of Objective-C language and debug script;
Second target debugs script determination sub-module, if the language form of the program code for currently debugging is Swift
Language then will be determined as target for the debugging script of Swift language and debug script.
Preferably, the debugging script for a kind of encapsulation code of language form and debug command by forming;The mesh
Mark debugs script running module:
Target debugs script and runs submodule, and debug command and the encapsulation code of script are debugged for running the target,
Obtain program code operation result corresponding with the target debugging debug command of script.
The embodiment of the present application includes the following advantages:
It in the embodiment of the present application, will be for the debugging script of Objective-C language and for the debugging of Swift language
Script is encapsulated in the same order packet, is shielded the otherness of both language as possible, is externally provided unified debug command packet
Form.The program code of the program code or Swift language to Objective-C language is either debugged, user only needs
A debug command packet is inputted, LLDB debuggers call automatically to be debugged script and debugged accordingly in debug command packet, be not necessarily to
It is manually entered multiple debug commands, you can realize required debugging effect.To simplify user's operation, debugging difficulty is reduced simultaneously
And debug time can be saved.
Description of the drawings
Fig. 1 is a kind of step flow chart of debug command packet generation method embodiment of the application;
Fig. 2 is a kind of step flow chart of program code adjustment method embodiment of the application;
Fig. 3 is a kind of structure diagram of debug command packet generating means embodiment of the application;
Fig. 4 is a kind of structure diagram of program code debugging apparatus embodiment of the application.
Specific implementation mode
In order to make the above objects, features, and advantages of the present application more apparent, below in conjunction with the accompanying drawings and it is specific real
Applying mode, the present application will be further described in detail.
Xcode is the programming software of IOS, and Xcode engineerings are mainly debugged using LLDB debuggers at present.It is debugging
When, user can input LLDB orders in LLDB debuggers and be debugged to program code.In order to reach the debugging effect of some,
User, which needs to input multiple LLDB orders, is combined operation.Debugging every time will repeatedly input many similar orders to grasp
Make.
In order to simplify debugging process, some LLDB orders are encapsulated as that specified debugging may be implemented in the embodiment of the present application
The debug command packet of effect.User calls debug command packet that can realize his debugging effect accordingly in LLDB debuggers, and
Without inputting multiple LLDB orders, to reach identical debugging effect.
Referring to Fig.1, the step flow chart for showing a kind of debug command packet generation method embodiment of the application, specifically may be used
To include the following steps:
Step 101, the debugging script for different language type is received;The debugging script includes debug command;
Debug command refers to LLDB orders, and LLDB debuggers support user to create debug command packet, and generation may be used in user
Code encapsulation LLDB orders generate debugging script.
LLDB debuggers are built-in with Python resolvers, therefore Python may be used and write encapsulation code to LLDB
Order is packaged.
Using Python to generate the process of debugging script can be for:User creates one using Python softwares
Python files;Input pin encapsulates code and LLDB orders to a kind of Python of language form in Python files.
User can be according to actual needs debugging effect, input different encapsulation codes and LLDB orders.Each is adjusted
Training can realize certain debugging effect after being originally run.
Since LLDB debuggers support the program code of Objective-C language and Swift language, user can be at one
Python files input pin is to the debugging script of Objective-C language and for the debugging script of Swift language.By Python
Software receives the debugging script input by user for Objective-C language, and the debugging script for Swift language.
Step 102, the storage debugging script for being directed to different language type, as debug command packet.
Debugging script input by user for different language type is stored to obtain debug command packet.
Specifically, Python software storages include the debugging script for Objective-C language, and it is directed to Swift languages
The Python files of the debugging script of speech, as debug command packet.
With reference to Fig. 2, a kind of step flow chart of program code adjustment method embodiment of the application is shown, it specifically can be with
Include the following steps:
Step 201, debug command packet is called;The debug command packet has and tune at least corresponding with a kind of language form
Training sheet;The debugging script has debug command;
Debug command refers to LLDB orders.Since LLDB debuggers are built-in with Python resolvers, may be used
Python writes code and is packaged generation debugging script to LLDB orders.
In the embodiment of the present application, some LLDB orders are encapsulated as that the debug command of specified debugging effect may be implemented
Packet.
Before debugging, the debug command packet that will be encapsulated in advance is needed to be loaded into LLDB debuggers.Debug command packet adds
After the completion of load, LLDB debuggers can call these debug command packets.
For example, the entitled alidbg.py of debug command packet encapsulated using Python scripts.
Before debugging, inputted in the .lldbinit files of home directory:Command script import texts
Path/alidbg.py where part.
LLDB debuggers can load the Python scripts in .lldbinit files automatically on startup in this way.
When to be debugged, then first program code execution allows program to suspend at the correlative code for running to desired debugging
Get off (operation suspension), breakpoint is arranged usually at correlative code, program is run at breakpoint will automatic pause operation.This
When user can the input frame of LLDB debuggers input debug command debug.In the embodiment of the present application, user can be
The title of the input frame input debug command packet of LLDB debuggers.LLDB debuggers are according to the title tune of the debug command packet of input
With corresponding debug command packet.
Currently, Xcode can support both programming languages of Objective-C and Swift.Equally, LLDB debuggers also prop up
It holds and the program code of Objective-C and Swift programming languages is debugged.
In the embodiment of the present application, a debug command packet has for Objective-C language program codes simultaneously
Debug script and the debugging script for Swift language program codes.And for the tune of Objective-C language program codes
Training sheet and debugging script for Swift language program codes, the debugging effect realized is the same, only in script
It is different to encapsulate code, debug command and parameter.That is, for Objective-C language program codes and Swift
Language program code, when realizing certain debugging effect, user can call the same debug command packet to debug.
Hereinafter, being illustrated with the expression orders of print object information:
For Objective-C objects, debug command is as follows:
expression-l objc++-O--<Objective-C pointer to object>
For Swift objects:Debug command is as follows:
expression-l Swift-O--<Swift pointer to object>
Expression orders are added to-l<Source language) distinguish Swift and Objective-C objects.
It should be noted that since Objective-C language and Swift language have prodigious otherness, in encapsulation needle
Debug command to Objective-C language and for Swift language debug command when, need according to the respective spy of language
Property, increase corresponding parameter.
For example, for Swift objects:Ordering to be:
expression-l Swift-d r-O--<Swift pointer to object>
If object is obtained by a base class pointer, since Objective-C is completely dynamic language, and Swift pairs
The polymorphism as only supporting similar C++, causes to print true object for Swift language, needs additionally addition-
D r (- dynamic-type run-target) parameter.
Step 202, the language form for the program code currently debugged is determined;
LLDB debuggers support the program code of at least one language form.Before debugging, LLDB debuggers firstly the need of
Determine the language form for the program code currently debugged.Such as determine the program code currently debugged is to belong to Objective-C
Language or Swift language.
Step 203, determine that target corresponding with the language form for the program code currently debugged debugs script;
Since debug command packet includes the debugging script at least one language form.LLDB debuggers are needed from tune
Debugging script corresponding with the language form for the program code currently debugged is determined in examination order packet.
Specifically, if the language form for the program code currently debugged is Objective-C language, will be directed to
The debugging script of Objective-C language is determined as target debugging script;If the language form for the program code currently debugged is
Swift language is determined as target debugging script then by for the debugging script of Swift language.
Step 204, the target debugging script is run, journey corresponding with the target debugging debug command of script is obtained
Sequence code operation result.
After LLDB debuggers run the target debugging script in debug command packet, obtain and the debugging in target debugging script
Order corresponding program code operation result.
In the embodiment of the present application, debugging script for a kind of encapsulation code of language form and debug command by forming;
The operation target debugs script, obtains program code operation corresponding with the target debugging debug command of script and ties
The step of fruit may include:
Debug command and the encapsulation code for running the target debugging script, obtain the debugging with target debugging script
Order corresponding program code operation result.User can debug program code according to program code operation result.Example
Such as, the debugging script that printing function is realized for a kind of program code of language form, LLDB tune are encapsulated in debug command packet
Examination device runs the debug command in the debugging script, you can prints specified program code operation result.In another example debug command
The debugging script for realizing the function of imageview being saved as local picture file is encapsulated in packet, LLDB debuggers run the tune
After debug command in training sheet, the imageview that program code operation result obtains is saved as into local picture file.And not
In the case of using debug command packet, user, which needs to input a large amount of debug command, could realize imageview is saved as local
The function of picture file.
LLDB debuggers itself are a debugging platforms, it only provides the LLDB orders on some bases, and to user's tune
For examination, he may provide what specific function more concerned with debug command packet, and a debug command packet realizes one specifically
Function for users may more directly a bit, without paying close attention to realize a debugging function, I must need to base
The details of plinth LLDB orders understands one by one.
It in the embodiment of the present application, will be for the debugging script of Objective-C language and for the debugging of Swift language
Script is encapsulated in the same order packet, is shielded the otherness of both language as possible, is externally provided unified debug command packet
Form.The program code of the program code or Swift language to Objective-C language is either debugged, user only needs
A debug command packet is inputted, LLDB debuggers call automatically to be debugged script and debugged accordingly in debug command packet, be not necessarily to
It is manually entered multiple debug commands, you can realize required debugging effect.To simplify user's operation, debugging difficulty is reduced simultaneously
And debug time can be saved.
It should be noted that for embodiment of the method, for simple description, therefore it is all expressed as a series of action group
It closes, but those skilled in the art should understand that, the embodiment of the present application is not limited by the described action sequence, because according to
According to the embodiment of the present application, certain steps can be performed in other orders or simultaneously.Secondly, those skilled in the art also should
Know, embodiment described in this description belongs to preferred embodiment, and involved action not necessarily the application is implemented
Necessary to example.
With reference to Fig. 3, a kind of structure diagram of debug command packet generating means embodiment of the application is shown, it specifically can be with
Including following module:
Script receiving module 301 is debugged, for receiving the debugging script for different language type;The debugging script packet
Include debug command;
Debug command packet generation module 302, for storing the debugging script for being directed to different language type, as debugging
Order packet.
In the embodiment of the present application, the language form includes:Objective-C language and Swift language;
The debugging script receiving module 301 may include:
Script receiving submodule is debugged, is used to receive the debugging script for Objective-C language, and be directed to Swift
The debugging script of language;
The debug command packet generation module includes:
Debug command packet generates submodule, for storing the debugging script for Objective-C language and described
For the debugging script of Swift language, as debug command packet.
In the embodiment of the present application, the debugging script is by the encapsulation code and debug command group for a kind of language form
At.
With reference to Fig. 4, shows a kind of structure diagram of program code debugging apparatus embodiment of the application, can specifically wrap
Include following module:
Debug command packet calling module 401, for calling debug command packet;The debug command packet have at least with one
The corresponding debugging script of kind language form;The debugging script has debug command;
Language form determining module 402, the language form for determining the program code currently debugged;
Target debugs script determining module 403, corresponding with the language form for the program code currently debugged for determination
Target debugs script;
Target debugs script running module 404, debugs script for running the target, obtains and debug foot with the target
This corresponding program code operation result of debug command.
In the embodiment of the present application, the debug command packet has:For the debugging script of Objective-C language, and
For the debugging script of Swift language;
The target debugs script determining module 403:
First object debugs script determination sub-module, if the language form of the program code for currently debugging is
Objective-C language then will be determined as target for the debugging script of Objective-C language and debug script;
Second target debugs script determination sub-module, if the language form of the program code for currently debugging is Swift
Language then will be determined as target for the debugging script of Swift language and debug script.
In the embodiment of the present application, the debugging script is by the encapsulation code and debug command group for a kind of language form
At;The target debugs script running module 404:
Target debugs script and runs submodule, and debug command and the encapsulation code of script are debugged for running the target,
Obtain program code operation result corresponding with the target debugging debug command of script.
It in the embodiment of the present application, will be for the debugging script of Objective-C language and for the debugging of Swift language
Script is encapsulated in the same order packet, is shielded the otherness of both language as possible, is externally provided unified debug command packet
Form.The program code of the program code or Swift language to Objective-C language is either debugged, user only needs
A debug command packet is inputted, LLDB debuggers call automatically to be debugged script and debugged accordingly in debug command packet, be not necessarily to
It is manually entered multiple debug commands, you can realize required debugging effect.To simplify user's operation, debugging difficulty is reduced simultaneously
And debug time can be saved.
For device embodiments, since it is basically similar to the method embodiment, so fairly simple, the correlation of description
Place illustrates referring to the part of embodiment of the method.
Each embodiment in this specification is described in a progressive manner, the highlights of each of the examples are with
The difference of other embodiment, the same or similar parts between the embodiments can be referred to each other.
It should be understood by those skilled in the art that, the embodiments of the present application may be provided as method, apparatus or calculating
Machine program product.Therefore, the embodiment of the present application can be used complete hardware embodiment, complete software embodiment or combine software and
The form of the embodiment of hardware aspect.Moreover, the embodiment of the present application can be used one or more wherein include computer can
With in the computer-usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) of program code
The form of the computer program product of implementation.
The embodiment of the present application is with reference to according to the method for the embodiment of the present application, terminal device (system) and computer program
The flowchart and/or the block diagram of product describes.It should be understood that flowchart and/or the block diagram can be realized by computer program instructions
In each flow and/or block and flowchart and/or the block diagram in flow and/or box combination.These can be provided
Computer program instructions are set to all-purpose computer, special purpose computer, Embedded Processor or other programmable data processing terminals
Standby processor is to generate a machine so that is held by the processor of computer or other programmable data processing terminal equipments
Capable instruction generates for realizing in one flow of flow chart or multiple flows and/or one box of block diagram or multiple boxes
The device of specified function.
These computer program instructions, which may also be stored in, can guide computer or other programmable data processing terminal equipments
In computer-readable memory operate in a specific manner so that instruction stored in the computer readable memory generates packet
The manufacture of command device is included, which realizes in one flow of flow chart or multiple flows and/or one side of block diagram
The function of being specified in frame or multiple boxes.
These computer program instructions can be also loaded into computer or other programmable data processing terminal equipments so that
Series of operation steps are executed on computer or other programmable terminal equipments to generate computer implemented processing, thus
The instruction executed on computer or other programmable terminal equipments is provided for realizing in one flow of flow chart or multiple flows
And/or in one box of block diagram or multiple boxes specify function the step of.
Although preferred embodiments of the embodiments of the present application have been described, once a person skilled in the art knows bases
This creative concept, then additional changes and modifications can be made to these embodiments.So the following claims are intended to be interpreted as
Including preferred embodiment and all change and modification within the scope of the embodiments of the present application.
Finally, it is to be noted that, herein, relational terms such as first and second and the like be used merely to by
One entity or operation are distinguished with another entity or operation, without necessarily requiring or implying these entities or operation
Between there are any actual relationship or orders.Moreover, the terms "include", "comprise" or its any other variant meaning
Covering non-exclusive inclusion, so that process, method, article or terminal device including a series of elements not only wrap
Those elements are included, but also include other elements that are not explicitly listed, or further include for this process, method, article
Or the element that terminal device is intrinsic.In the absence of more restrictions, being wanted by what sentence "including a ..." limited
Element, it is not excluded that there is also other identical elements in process, method, article or the terminal device including the element.
Above to a kind of debug command packet generation method provided herein, a kind of program code adjustment method is a kind of
Debug command packet generating means and a kind of program code debugging apparatus, are described in detail, specific case used herein
The principle and implementation of this application are described, and the explanation of above example is only intended to the sides that help understands the application
Method and its core concept;Meanwhile for those of ordinary skill in the art, according to the thought of the application, in specific implementation mode
And there will be changes in application range, in conclusion the contents of this specification should not be construed as limiting the present application.
Claims (12)
1. a kind of debug command packet generation method, which is characterized in that including:
Receive the debugging script for different language type;The debugging script includes debug command;
The storage debugging script for being directed to different language type, as debug command packet.
2. according to the method described in claim 1, it is characterized in that, the language form includes:Objective-C language, and
Swift language;
It is described receive for different language type debugging script the step of include:
Receive the debugging script for Objective-C language, and the debugging script for Swift language;
It is directed to the debugging script of different language type described in the storage, includes as the step of debug command packet:
The storage debugging script for Objective-C language and the debugging script for Swift language, as
Debug command packet.
3. according to the method described in claim 1, it is characterized in that, the debugging script is by for a kind of encapsulation of language form
Code and debug command composition.
4. a kind of program code adjustment method, which is characterized in that including:
Call debug command packet;The debug command packet has and debugging script at least corresponding with a kind of language form;It is described
Debugging script has debug command;
Determine the language form for the program code currently debugged;
Determine that target corresponding with the language form for the program code currently debugged debugs script;
The target debugging script is run, program code operation corresponding with the target debugging debug command of script is obtained and ties
Fruit.
5. according to the method described in claim 4, it is characterized in that, the debug command packet has:For Objective-C languages
The debugging script of speech, and the debugging script for Swift language;
The step of determination corresponding with the language form for the program code currently debugged target debugging script includes:
If the language form for the program code currently debugged is Objective-C language, will be for Objective-C language
Debugging script is determined as target debugging script;
If the language form for the program code currently debugged is Swift language, will be determined for the debugging script of Swift language
Script is debugged for target.
6. according to the method described in claim 4, it is characterized in that, the debugging script is by for a kind of encapsulation of language form
Code and debug command composition;The operation target debugs script, obtains the debug command with target debugging script
The step of program code operation result includes accordingly:
Debug command and the encapsulation code for running the target debugging script, obtain the debug command with target debugging script
Corresponding program code operation result.
7. a kind of debug command packet generating means, which is characterized in that including:
Script receiving module is debugged, for receiving the debugging script for different language type;The debugging script includes debugging
Order;
Debug command packet generation module, for storing the debugging script for being directed to different language type, as debug command packet.
8. device according to claim 7, which is characterized in that the language form includes:Objective-C language, and
Swift language;
The debugging script receiving module includes:
Script receiving submodule is debugged, is used to receive the debugging script for Objective-C language, and be directed to Swift language
Debugging script;
The debug command packet generation module includes:
Debug command packet generates submodule, for storing the debugging script for Objective-C language and described being directed to
The debugging script of Swift language, as debug command packet.
9. device according to claim 8, which is characterized in that the debugging script is by for a kind of encapsulation of language form
Code and debug command composition.
10. a kind of program code debugging apparatus, which is characterized in that including:
Debug command packet calling module, for calling debug command packet;The debug command packet have at least with a kind of language
The corresponding debugging script of type;The debugging script has debug command;
Language form determining module, the language form for determining the program code currently debugged;
Target debugs script determining module, for determining that target corresponding with the language form for the program code currently debugged is debugged
Script;
Target debugs script running module, and script is debugged for running the target, obtains the tune with target debugging script
Corresponding program code operation result is ordered in examination.
11. device according to claim 10, which is characterized in that the debug command packet has:For Objective-C
The debugging script of language, and the debugging script for Swift language;
The target debugs script determining module:
First object debugs script determination sub-module, if the language form of the program code for currently debugging is Objective-
C language then will be determined as target for the debugging script of Objective-C language and debug script;
Second target debugs script determination sub-module, if the language form of the program code for currently debugging is Swift language,
It then will be determined as target for the debugging script of Swift language and debug script.
12. device according to claim 10, which is characterized in that the debugging script is by for a kind of envelope of language form
Fill code and debug command composition;The target debugs script running module:
Target debugs script and runs submodule, and debug command and the encapsulation code of script are debugged for running the target, is obtained
Program code operation result corresponding with the target debugging debug command of script.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710046481.3A CN108319548A (en) | 2017-01-18 | 2017-01-18 | A kind of program code adjustment method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710046481.3A CN108319548A (en) | 2017-01-18 | 2017-01-18 | A kind of program code adjustment method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108319548A true CN108319548A (en) | 2018-07-24 |
Family
ID=62891216
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710046481.3A Pending CN108319548A (en) | 2017-01-18 | 2017-01-18 | A kind of program code adjustment method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108319548A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20210089419A1 (en) * | 2019-09-25 | 2021-03-25 | Alibaba Group Holding Limited | Debugging unit and processor |
CN112905470A (en) * | 2021-02-23 | 2021-06-04 | 中国平安人寿保险股份有限公司 | Interface calling method and device, computer equipment and medium |
CN113326190A (en) * | 2021-05-27 | 2021-08-31 | 北京百度网讯科技有限公司 | Method and device for determining code coverage rate and electronic equipment |
CN113407160A (en) * | 2021-05-17 | 2021-09-17 | 江苏航天七零六信息科技有限公司 | Multi-language debugger design method oriented to domestic operating system and hardware platform |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101847118A (en) * | 2009-03-24 | 2010-09-29 | 迈普通信技术股份有限公司 | Automatic test system |
CN102306122A (en) * | 2011-09-14 | 2012-01-04 | 北京星网锐捷网络技术有限公司 | Automated testing method and equipment |
EP2610754A1 (en) * | 2011-12-28 | 2013-07-03 | Verisign, Inc. | Test automation environment for testing domain name resolution |
CN103197947A (en) * | 2012-01-04 | 2013-07-10 | 中兴通讯股份有限公司 | Script processing method and device |
CN105893238A (en) * | 2015-08-04 | 2016-08-24 | 乐视致新电子科技(天津)有限公司 | Code debugging method and device |
-
2017
- 2017-01-18 CN CN201710046481.3A patent/CN108319548A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101847118A (en) * | 2009-03-24 | 2010-09-29 | 迈普通信技术股份有限公司 | Automatic test system |
CN102306122A (en) * | 2011-09-14 | 2012-01-04 | 北京星网锐捷网络技术有限公司 | Automated testing method and equipment |
EP2610754A1 (en) * | 2011-12-28 | 2013-07-03 | Verisign, Inc. | Test automation environment for testing domain name resolution |
CN103197947A (en) * | 2012-01-04 | 2013-07-10 | 中兴通讯股份有限公司 | Script processing method and device |
CN105893238A (en) * | 2015-08-04 | 2016-08-24 | 乐视致新电子科技(天津)有限公司 | Code debugging method and device |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20210089419A1 (en) * | 2019-09-25 | 2021-03-25 | Alibaba Group Holding Limited | Debugging unit and processor |
US11755441B2 (en) * | 2019-09-25 | 2023-09-12 | Alibaba Group Holding Limited | Debugging unit and processor |
CN112905470A (en) * | 2021-02-23 | 2021-06-04 | 中国平安人寿保险股份有限公司 | Interface calling method and device, computer equipment and medium |
CN113407160A (en) * | 2021-05-17 | 2021-09-17 | 江苏航天七零六信息科技有限公司 | Multi-language debugger design method oriented to domestic operating system and hardware platform |
CN113326190A (en) * | 2021-05-27 | 2021-08-31 | 北京百度网讯科技有限公司 | Method and device for determining code coverage rate and electronic equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108345531B (en) | Test method, device and system | |
CN107291438B (en) | Automatic script generation method and device and electronic equipment | |
US10209968B2 (en) | Application compiling | |
CN108319548A (en) | A kind of program code adjustment method and device | |
CN110134386B (en) | Program editing method and device | |
CN108345535A (en) | Mock test methods, device and equipment | |
US8615750B1 (en) | Optimizing application compiling | |
CN106970873A (en) | Mock method of testings, apparatus and system on line | |
US20130167123A1 (en) | Application debugging | |
US20130298110A1 (en) | Software Visualization Using Code Coverage Information | |
US9122798B2 (en) | Debugger with method restart capability | |
CN107015903B (en) | Interface test program generation method and device and electronic equipment | |
US7680668B2 (en) | Method for generating a language-independent regression test script | |
CN108153533B (en) | Method and device for making installation program, and method and device for installing program | |
CN107092474B (en) | Program development method, ETL processing method and device | |
CN111523065B (en) | Rich text data processing method and device, electronic equipment and computer storage medium | |
CN112925583B (en) | Host application capability extension method, device, equipment and storage medium | |
CN113590491B (en) | Test platform and product test method | |
CN111679828B (en) | Data processing method and device, electronic equipment and storage medium | |
CN106126240A (en) | A kind of method and system customizing mobile terminal desktop shortcut icon | |
CN106776285B (en) | Webpage front end debugging method and device | |
CN110851370B (en) | Program testing method and device and storage medium | |
CN111611008A (en) | Software code packaging and deploying method, device, equipment and storage medium | |
CN110888641A (en) | Automatic script generation method and device, server and storage medium | |
CN113641594B (en) | Cross-terminal automatic testing method and related device |
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: 20180724 |
|
RJ01 | Rejection of invention patent application after publication |