CN106681897A - Code debugging method and device - Google Patents
Code debugging method and device Download PDFInfo
- Publication number
- CN106681897A CN106681897A CN201510752641.7A CN201510752641A CN106681897A CN 106681897 A CN106681897 A CN 106681897A CN 201510752641 A CN201510752641 A CN 201510752641A CN 106681897 A CN106681897 A CN 106681897A
- Authority
- CN
- China
- Prior art keywords
- code
- line number
- breakpoint
- execution
- user
- 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.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Prevention of errors by analysis, debugging or testing of software
- G06F11/362—Debugging of software
- G06F11/3628—Debugging of software 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
Description
技术领域technical field
本发明涉及计算机软件编程技术领域,尤其涉及一种代码调试方法及装置。The invention relates to the technical field of computer software programming, in particular to a code debugging method and device.
背景技术Background technique
IronPython是Python语言的.NET实现。有了IronPython,.NET开发人员可以在自己的软件产品中通过集成IronPython向用户提供Python代码的运行功能,对于某些业务功能需要用户自己通过Python代码定制的场景,IronPython的出现可谓是给.NET开发人员提供了强有力的技术支撑。IronPython is a .NET implementation of the Python language. With IronPython, .NET developers can integrate IronPython in their software products to provide users with the running function of Python code. For some business functions that need to be customized by users through Python code, the appearance of IronPython can be said to be for .NET Developers provide strong technical support.
但是,.NET开发人员在自己的软件产品中通过集成IronPython向用户提供Python代码的运行功能会遇到一个问题:用户编写完处理具体业务的Python代码提交到软件中运行的时候可能会因编写的Python代码错误导致用户预期的业务功能无法实现,此时用户需要查找自己编写的Python代码中的错误并修正它。用户通过检查Python代码发现代码中几个关键位置存在的疑点,希望Python代码的几个存在疑点的关键位置能够在执行的时候暂停以方便用户分析错误,从而解决代码存在的问题。在传统方案中,如果用户编写的Python代码存在错误,一般是用户自己通过在代码关键位置插入弹框代码来实现代码运行到关键位置时的暂停效果,然后用户再分析代码及代码的运行效果来判断代码错误的位置及原因。However, .NET developers will encounter a problem in providing users with the function of running Python codes by integrating IronPython in their software products: when users write Python codes that handle specific businesses and submit them to the software for running, they may fail because of the written Python code. An error in the Python code prevents the user's expected business function from being realized. At this time, the user needs to find the error in the Python code written by the user and correct it. The user finds suspicious points in several key positions in the code by checking the Python code, and hopes that the execution of several key positions in the Python code with suspicious points can be paused to facilitate the user to analyze errors, so as to solve the problems existing in the code. In the traditional solution, if there is an error in the Python code written by the user, the user usually inserts the pop-up code at the key position of the code to realize the pause effect when the code runs to the key position, and then the user analyzes the code and the running effect of the code to find out Determine the location and cause of the code error.
然而,使用向Python代码关键位置插入弹框代码的方式虽然也可以让Python代码在关键位置执行的时候暂停下来,但是这种做法仍然存在一个问题:当用户向Python代码关键位置插入了弹框代码,Python代码运行到插入了弹框代码的关键位置处暂停下来之后,如果用户通过分析代码行为认为代码关键位置后面的某个位置也存在疑点,想在执行到后面的某个位置也能暂停下来的时候,使用传统的向代码插入弹框代码来实现代码运行暂停效果方案只能让已运行的Python代码先停止运行,然后用户手动修改代码向新发现的可疑位置插入弹框代码然后再重新运行修改后的Python代码等待代码运行到可疑位置处暂停。这种做法对于用户操作极其不便,需要用户频繁的修改Python代码、停止代码运行、重新让代码运行、等待代码运行暂停。However, although the method of inserting the pop-up code into the key position of the Python code can also pause the execution of the Python code at the key position, there is still a problem with this method: when the user inserts the pop-up code into the key position of the Python code , after the Python code runs to the key position where the pop-up code is inserted and pauses, if the user thinks that a certain position behind the key position of the code is also suspicious by analyzing the code behavior, he wants to pause at a certain position after execution When using the traditional method of inserting pop-up code into the code to achieve the effect of code running pause, the running Python code can only be stopped first, and then the user manually modifies the code to insert the pop-up code into the newly discovered suspicious location and then re-runs The modified Python code waits for code execution to pause at suspicious locations. This approach is extremely inconvenient for the user to operate, requiring the user to frequently modify the Python code, stop the code running, restart the code running, and wait for the code to pause.
发明内容Contents of the invention
有鉴于此,本发明提供一种代码调试方法及装置,主要目的在于简化Python代码的调试过程,通过在调试过程中实时调整代码中的断点位置来快速确定问题代码的位置,从而提升Python代码的调试效率。In view of this, the present invention provides a code debugging method and device, the main purpose of which is to simplify the debugging process of Python code, and quickly determine the position of the problem code by adjusting the breakpoint position in the code in real time during the debugging process, thereby improving the Python code. debugging efficiency.
为达到上述目的,本发明主要提供如下技术方案:In order to achieve the above object, the present invention mainly provides the following technical solutions:
一方面,本发明提供了一种代码调试方法,该方法包括:On the one hand, the present invention provides a kind of code debugging method, and this method comprises:
获取用户在代码中设置的断点行号,得到断点集合;Get the breakpoint line number set by the user in the code, and get the breakpoint set;
根据所述代码执行的当前行号,判断所述当前行号是否在所述断点集合中;judging whether the current line number is in the breakpoint set according to the current line number executed by the code;
若存在,则执行中断事件函数,以中断所述代码的执行。If it exists, execute the interrupt event function to interrupt the execution of the code.
另一方面,本发明还提供了一种代码调试装置,该装置包括:On the other hand, the present invention also provides a code debugging device, which includes:
获取单元,用于获取用户在代码中设置的断点行号,得到断点集合;The obtaining unit is used to obtain the line number of the breakpoint set by the user in the code, and obtain the set of breakpoints;
判断单元,用于根据所述代码执行的当前行号,判断所述当前行号是否在所述获取单元得到的断点集合中;a judging unit, configured to judge whether the current line number is in the breakpoint set obtained by the acquisition unit according to the current line number executed by the code;
执行单元,用于当所述判断单元判断所述当前行号为所述断点行号时,执行中断事件函数,以中断所述代码的执行。An execution unit, configured to execute an interrupt event function to interrupt the execution of the code when the judging unit judges that the current line number is the breakpoint line number.
依据上述本发明所提出的代码调试方法及装置,只需要用户确定需要暂停调试的代码行位置,代码程序在执行时就能够自动的识别出用户所选择的暂停位置,并将代码程序停止在该位置上,等待用户的下一步指示,在接收到用户取消暂停的指令后,恢复代码程序的执行,直至运行至下一个调试断点代码行。由于本发明所采用的方法是实时地更新断点集合中的断点行号,因此,能够在代码程序的执行过程中随时的添加或删除用户所需的断点,为代码程序的调试提供了更加灵活的调试方式。相对于现有的代码程序调试方式,本发明不需要用户进行频繁的修改代码,设置插入弹框来暂停代码程序的执行,而是由用户在代码的调试过程中动态的选择需要暂停的位置,并在用户的控制下恢复代码的运行状态。因此,本发明所采用的代码调试方法及装置能够更快速的确定问题代码的位置,从而提升Python代码的调试效率。According to the code debugging method and device proposed by the present invention, the user only needs to determine the position of the code line that needs to be suspended for debugging, and the code program can automatically recognize the pause position selected by the user when the code program is executed, and stop the code program at this position. At the position, wait for the user's next instruction, and after receiving the user's instruction to cancel the suspension, resume the execution of the code program until it runs to the next debugging breakpoint code line. Because the method adopted by the present invention is to update the breakpoint line number in the breakpoint collection in real time, therefore, the breakpoint required by the user can be added or deleted at any time during the execution of the code program, which provides a great advantage for the debugging of the code program. More flexible debugging methods. Compared with the existing code program debugging method, the present invention does not require the user to frequently modify the code and set the insertion bullet box to suspend the execution of the code program. Instead, the user dynamically selects the position that needs to be suspended during the code debugging process. And restore the running state of the code under the control of the user. Therefore, the code debugging method and device adopted in the present invention can more quickly determine the location of problem codes, thereby improving the debugging efficiency of Python codes.
附图说明Description of drawings
通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并不认为是对本发明的限制。而且在整个附图中,用相同的参考符号表示相同的部件。在附图中:Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiment. The drawings are only for the purpose of illustrating a preferred embodiment and are not to be considered as limiting the invention. Also throughout the drawings, the same reference numerals are used to designate the same components. In the attached picture:
图1示出了本发明实施例提出的一种代码调试方法的流程图;Fig. 1 shows a flow chart of a code debugging method proposed by an embodiment of the present invention;
图2示出了本发明实施例提出的另一种代码调试方法的流程图;FIG. 2 shows a flowchart of another code debugging method proposed by an embodiment of the present invention;
图3示出了本发明实施例提出的一种代码调试装置的组成框图;FIG. 3 shows a block diagram of a code debugging device proposed by an embodiment of the present invention;
图4示出了本发明实施例提出的另一种代码调试装置的组成框图。FIG. 4 shows a block diagram of another code debugging device proposed by an embodiment of the present invention.
具体实施方式detailed description
下面将参照附图更详细地描述本发明的示例性实施例。虽然附图中显示了本发明的示例性实施例,然而应当理解,可以以各种形式实现本发明而不应被这里阐述的实施例所限制。相反,提供这些实施例是为了能够更透彻地理解本发明,并且能够将本发明的范围完整的传达给本领域的技术人员。Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present invention are shown in the drawings, it should be understood that the invention may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided for more thorough understanding of the present invention and to fully convey the scope of the present invention to those skilled in the art.
本发明实施例提供了一种代码调试的方法,如图1所示,该方法应用于中断停代码执行的代码调试过程,具体步骤包括:The embodiment of the present invention provides a method for code debugging. As shown in FIG. 1, the method is applied to the code debugging process of interrupting and stopping code execution. The specific steps include:
101、获取用户在代码中设置的断点行号,得到断点集合。101. Obtain the line number of the breakpoint set by the user in the code, and obtain a set of breakpoints.
针对现有的调试方式的不足,本发明实施例通过获取用户设置的断点位置来确定代码在执行时需要暂停的代码行,并将这些代码行号组成断点集合。对于用户设置的断点位置,是由用户通过鼠标或者是通过触屏在代码编辑器中选择代码中需要暂停的位置,该位置可以是一个,也可以为多个。并且,用户在选择断点位置时,对于代码的当前状态没有限定,可以是在执行前,提前确定所有断点的位置,也可以是在代码的执行过程中,实时地确定断点的位置。需要说明的是,在代码执行过程中,用户只能设置在当前执行行号之后的代码行行号为断点位置。To address the shortcomings of the existing debugging methods, the embodiment of the present invention determines the code lines that need to be suspended during code execution by obtaining the breakpoint positions set by the user, and forms these code line numbers into a breakpoint set. For the breakpoint position set by the user, the user selects the position in the code that needs to be paused in the code editor through the mouse or through the touch screen, and the position can be one or multiple. Moreover, when the user selects the breakpoint position, there is no limit to the current state of the code. The position of all breakpoints can be determined in advance before execution, or the position of the breakpoint can be determined in real time during the execution of the code. It should be noted that during code execution, the user can only set the code line number after the current execution line number as the breakpoint position.
不仅如此,用户在设置断点位置的过程中,还包括对代码中增加断点和删除已有断点两种设置,增加断点如上所述,可以在代码中的任意位置设置断点,而删除断点则是在当前标有断点的代码中再次选择标有断点的代码行来取消在该代码行的中断标记。Not only that, in the process of setting the breakpoint position, the user also includes two settings for adding a breakpoint and deleting an existing breakpoint in the code. Adding a breakpoint as mentioned above can set a breakpoint at any position in the code, To delete a breakpoint is to select the code line marked with a breakpoint again in the current code marked with a breakpoint to cancel the break mark on the code line.
断点集合中记录了针对该代码的所有用户标记中断的代码行号,并且该集合中的断点行号是实时更新的。根据用户的选择,集合会对其中的断点行号时刻更新,增加新的断点或删除已有的断点。The breakpoint collection records the code line numbers that all users mark breaks for the code, and the breakpoint line numbers in the collection are updated in real time. According to the user's choice, the collection will update the breakpoint line number, add new breakpoints or delete existing breakpoints.
102、根据代码执行的当前行号,判断该行号是否在断点集合中。102. According to the current line number of code execution, determine whether the line number is in the breakpoint set.
在创建了断点集合后,在进行代码调试时,该代码在每执行一行代码时,都会将该代码行的行号与断点集合中的断点行号进行比对,以判断该行代码在执行后是否需要暂停。对于代码在执行过程中获取代码执行的当前行号的方式本实施例不做具体限定,较简单的方式是在每一行原代码后增加一句调用中断事件函数代码,通过在该调用函数中内置计数器来统计代码执行的行数,将计数器的初始值设置为1,每调用一次该函数就在该计数器中加1,通过读取计算器的值就可确定代码执行的当前行号。After creating a breakpoint set, when debugging the code, each time the code executes a line of code, it will compare the line number of the code line with the breakpoint line number in the breakpoint set to determine whether the line of code is Whether to pause after execution. This embodiment does not specifically limit the method of obtaining the current line number of code execution during code execution. The simpler method is to add a call interrupt event function code after each line of original code, and build a counter in the call function To count the number of lines of code execution, set the initial value of the counter to 1, add 1 to the counter every time the function is called, and determine the current line number of code execution by reading the value of the calculator.
在确定了代码执行的当前行号后,将该当前行号带入到断点集合中遍历进行匹配,如果该行号存在与该集合中,就执行该中断事件函数,将代码的执行状态暂停在当前行;而如果该行号不存在与该集合中,就跳过该中断事件函数继续执行代码的下一行。After the current line number of code execution is determined, the current line number is brought into the breakpoint set for traversal for matching. If the line number exists in the set, the interrupt event function is executed to suspend the execution state of the code In the current line; and if the line number does not exist in the set, skip the interrupt event function and continue to execute the next line of code.
103、若当前行号为断点行号,则执行中断事件函数。103. If the current line number is the line number of the breakpoint, execute the interrupt event function.
当确定代码的当前行号为断点行号后,代码程序将执行所调用的中断事件函数,将代码的执行状态暂停在当前行。该中断事件函数的具体实现方式可以是一个有条件的循环函数,也可以是一个脚本函数,通过编辑脚本来实现暂停状态,本实施例对于该函数的表现方式不做具体限定。When the current line number of the code is determined to be the breakpoint line number, the code program will execute the interrupt event function called, and suspend the execution state of the code at the current line. The specific implementation of the interrupt event function may be a conditional loop function, or a script function, and the pause state is realized by editing the script. This embodiment does not specifically limit the performance of the function.
需要说明的是,代码在执行过程中暂停运行的目的在于可以让调试人员能够对已执行的程序所得到的结果进行判断,查看执行的代码中是否按照预计的结果在执行,如果有问题,则可以退出执行进行代码的修改,在修改后继续调试;而如果没有问题,则应该可以恢复代码程序的执行,继续调试后面的代码。而要恢复代码的执行状态就需要跳出正在运行中的中断事件函数,根据上述的中断事件函数实现方式,可以由用户在中断事件函数中给出停止运行的指令,来跳出循环函数的循环执行过程或跳出脚本函数的暂停状态。从而恢复代码的执行状态。It should be noted that the purpose of suspending the code during execution is to allow debuggers to judge the results obtained by the executed program and check whether the executed code is executing according to the expected results. If there is a problem, then You can exit the execution to modify the code, and continue debugging after the modification; if there is no problem, you should be able to resume the execution of the code program and continue to debug the following code. To restore the execution state of the code, it is necessary to jump out of the running interrupt event function. According to the implementation method of the above interrupt event function, the user can give an instruction to stop running in the interrupt event function to jump out of the loop execution process of the loop function Or break out of the paused state of a script function. This restores the execution state of the code.
结合上述的实现方式可以看出,本发明实施例所采用的代码调试方法,只需要用户确定需要暂停调试的代码行位置,代码程序在执行时就能够自动的识别出用户所选择的暂停位置,并将代码程序停止在该位置上,等待用户的下一步指示,在接收到用户取消暂停的指令后,恢复代码程序的执行,直至运行至下一个调试断点代码行。由于本发明实施例所采用的方法是实时地更新断点集合中的断点行号,因此,能够在代码程序的执行过程中随时的添加或删除用户所需的断点,为代码程序的调试提供了更加灵活的调试方式。相对于现有的代码程序调试方式,本发明实施例不需要用户进行频繁的修改代码,设置插入弹框来暂停代码程序的执行,而是由用户在代码的调试过程中动态的选择需要暂停的位置,并在用户的控制下恢复代码的运行状态。因此,本发明实施例所采用的代码调试方法能够更快速的确定问题代码的位置,从而提升Python代码的调试效率。In combination with the above-mentioned implementation methods, it can be seen that the code debugging method adopted in the embodiment of the present invention only needs the user to determine the position of the code line that needs to suspend debugging, and the code program can automatically recognize the suspend position selected by the user when it is executed. And stop the code program at this position, wait for the user's next instruction, and resume the execution of the code program after receiving the user's instruction to cancel the suspension until it runs to the next debugging breakpoint code line. Because the method adopted in the embodiment of the present invention is to update the breakpoint line number in the breakpoint set in real time, therefore, the breakpoint required by the user can be added or deleted at any time during the execution of the code program, which is helpful for the debugging of the code program. Provides a more flexible debugging method. Compared with the existing code program debugging method, the embodiment of the present invention does not require the user to modify the code frequently, and set the insertion bullet box to suspend the execution of the code program, but the user dynamically selects the program that needs to be suspended during the code debugging process. location, and restore the running state of the code under user control. Therefore, the code debugging method adopted in the embodiment of the present invention can more quickly determine the location of the problem code, thereby improving the debugging efficiency of the Python code.
为了更加详细地说明本发明提出的一种代码调试方法,本发明实施例以使用Python语言编辑代码程序,利用C#语言创建断点集合以及上述的中断事件函数为例进行具体说明,如图2所示,该方法在对代码调试时所包括步骤为:In order to illustrate a kind of code debugging method that the present invention proposes in more detail, the embodiment of the present invention uses Python language to edit the code program, utilizes C# language to create breakpoint set and above-mentioned interrupt event function as examples, as shown in Figure 2 As shown, the steps included in this method when debugging the code are:
201、获取用户在Python代码中设置的断点行号,得到断点集合。201. Obtain the line number of the breakpoint set by the user in the Python code, and obtain a set of breakpoints.
断点行号的设置方式有两种:一种是在调试Python代码前选择好需要中断位置的行号,另一种是在调试过程中,在代码执行当前行的后面选择需要中断位置的行号。在具体操作上,可以是用户通过鼠标左键在Python代码中的行号位置进行点击来设置断点,该断点的选择可以是一个或多个,例如,一个100行的Python代码,用户可以在代码编辑器中使用鼠标左键点击第30、60、90行代码,则该代码中的第30、60、90行的行号就被确定为断点行,代码在执行到该行时会暂定执行。There are two ways to set the breakpoint line number: one is to select the line number that needs to be interrupted before debugging the Python code, and the other is to select the line that needs to be interrupted after the current line of code execution during the debugging process No. In terms of specific operations, the user can set a breakpoint by clicking the line number position in the Python code with the left button of the mouse. The choice of the breakpoint can be one or more. For example, for a 100-line Python code, the user can In the code editor, click the 30th, 60th, and 90th line of code with the left button of the mouse, and the line number of the 30th, 60th, and 90th line in the code will be determined as the breakpoint line, and the code will be executed when it reaches this line. Tentative implementation.
此外,这些断点行号还会被添加到由C#语言创建的断点集合中。该集合是一个整型数据的集合,记录有代码的行号。将用户选择的代码行号添加到断点集合中还存在两种情况:一种是断点集合中没有该行号,则可以将该行号直接加入集合中,这种定义为断点行号的添加操作;另一种是断点集合中已经存在该行号,则将该行号从断点集合中清除掉,这种定义为断点行号的删除操作。In addition, these breakpoint line numbers will also be added to the set of breakpoints created by the C# language. This collection is a collection of integer data, which records the line number of the code. There are two cases of adding the code line number selected by the user to the breakpoint collection: one is that the line number does not exist in the breakpoint collection, then the line number can be directly added to the collection, which is defined as the breakpoint line number The other is that the line number already exists in the breakpoint set, then the line number is cleared from the breakpoint set, which is defined as the delete operation of the breakpoint line number.
202、根据Python代码执行的当前行号,判断该行号是否在断点集合中。202. According to the current line number executed by the Python code, determine whether the line number is in the breakpoint set.
要判断代码的执行行号是否为断点行号,还需要进行一系列的前期设置。其中,除了上述的获取断点集合外,还需要在调试之前再创建一个C#脚本调试类的实例scriptDebug,并且给该实例的脚本运行中断事件添加事件处理函数ScriptBreak,其中,C#脚本调试类scriptDebug的代码如下:To determine whether the execution line number of the code is a breakpoint line number, a series of preliminary settings are also required. Among them, in addition to the above-mentioned collection of breakpoints, it is also necessary to create an instance scriptDebug of the C# script debugging class before debugging, and add an event processing function ScriptBreak to the script running interruption event of this instance, wherein, the C# script debugging class scriptDebug code show as below:
之后创建该类的实例scriptDebug,并定义一个C#函数ScriptBreak,将实例scriptDebug的脚本运行中断事件处理函数设置为ScriptBreak,其代码如下:Then create an instance scriptDebug of this class, and define a C# function ScriptBreak, and set the script execution interruption event processing function of the instance scriptDebug as ScriptBreak, the code is as follows:
scriptDebug.ExecuteBreak=ScriptBreakscriptDebug.ExecuteBreak = ScriptBreak
如此,当实例scriptDebug被调用时,就会调用C#函数ScriptBreak。In this way, when the instance scriptDebug is called, the C# function ScriptBreak will be called.
之后,在原Python代码的每一行代码后添加代码“scriptDebug.Break()”,从而在Python代码在每运行一行时都会执行所添加的“scriptDebug.Break()”代码,进而调用上述的C#函数ScriptBreak,以实现Python代码的中断机制。After that, add the code "scriptDebug.Break()" after each line of the original Python code, so that the added "scriptDebug.Break()" code will be executed every time the Python code runs, and then call the above-mentioned C# function ScriptBreak , to implement the interrupt mechanism for Python code.
此外,除了上述的设置还需要在C#函数ScriptBreak内部定义一个静态局部变量currentLine=1,代表正在运行的Python代码行号,初始值为1。由于该Python代码的每行代码后面都被添加了代码“scirptDebug.Break()”,所以Python代码每执行一行,C#函数ScriptBreak都会被调用一次,每次ScriptBreak被调用时记录Python代码执行行号的变量currentLine值都会增加1。因此,Python代码执行的当前行号就是变量currentLine的值,要判断当前行号是否在断点集合中,只需要遍历断点集合中的是否有变量currentLine的值。In addition, in addition to the above settings, a static local variable currentLine=1 needs to be defined inside the C# function ScriptBreak, representing the line number of the running Python code, with an initial value of 1. Since the code "scirptDebug.Break()" is added after each line of the Python code, the C# function ScriptBreak will be called once every time the Python code is executed, and the Python code execution line number will be recorded every time ScriptBreak is called. The value of the variable currentLine will increase by 1. Therefore, the current line number of Python code execution is the value of the variable currentLine. To determine whether the current line number is in the breakpoint set, you only need to traverse the breakpoint set to see if there is the value of the variable currentLine.
203、利用IronPython作用域接口将中断事件函数添加到Python代码的作用域中。203. Using the IronPython scope interface to add the interrupt event function to the scope of the Python code.
由于scriptDebug是C#实例,如果要在IronPython中调用该scriptDebug的方法Break,则需要将C#实例scriptDebug通过IronPython作用域接口SetVariable(name,value)添加到Python代码运行的作用域中。Since scriptDebug is a C# instance, if you want to call the scriptDebug method Break in IronPython, you need to add the C# instance scriptDebug to the scope where the Python code runs through the IronPython scope interface SetVariable(name,value).
204、若当前行号为断点行号,则执行中断事件函数。204. If the current line number is the line number of the breakpoint, execute the interrupt event function.
当正在运行的Python代码行号存在于由C#创建的断点集合中时,就说明Python代码运行到了断点位置,需要暂停Python代码的运行,即行中断事件函数ScriptBreak。因为Python代码是在IronPython对象中执行的,而IronPython对象在C#程序的当前线程中运行,所以只需编写阻塞C#当前线程运行的代码让其运行即可,相关代码如下:When the line number of the running Python code exists in the breakpoint set created by C#, it means that the Python code has run to the breakpoint position, and the running of the Python code needs to be suspended, that is, the line break event function ScriptBreak. Because the Python code is executed in the IronPython object, and the IronPython object runs in the current thread of the C# program, you only need to write the code that blocks the running of the C# current thread to let it run. The relevant code is as follows:
while(!continue)while (! continue)
{{
}}
上述代码中变量continue初始值为false,所以循环while会一直执行下去,这样C#当前线程便被阻塞了,相应的运行在当前C#线程中的IronPython对象中的Python代码的运行也将被暂停。The initial value of the variable continue in the above code is false, so the while loop will continue to execute, so that the current C# thread is blocked, and the corresponding Python code running in the IronPython object in the current C# thread will also be suspended.
205、根据用户的指令终止中断事件函数的运行,恢复Python代码的执行。205. Terminate the execution of the interrupt event function according to the user's instruction, and resume the execution of the Python code.
当需要继续执行暂停中的Python代码时,只需要将C#函数内的变量continue值设置为true,则while(!continue){}循环条件便不再成立,循环会退出,这样C#当前线程将解除阻塞,运行在C#当前线程中的IronPython对象中的Python代码便可以继续运行。When you need to continue to execute the paused Python code, you only need to set the value of the variable continue in the C# function to true, then the while(!continue){} loop condition will no longer be true, and the loop will exit, so that the current C# thread will be released Blocking, the Python code running in the IronPython object in the current thread of C# can continue to run.
进一步的,作为对上述方法的实现,本发明实施例提供了一种代码调试装置,该装置实施例与前述方法实施例对应,为便于阅读,本装置实施例不再对前述方法实施例中的细节内容进行逐一赘述,但应当明确,本实施例中的装置能够对应实现前述方法实施例中的全部内容。该装置可设置在带有调试功能的代码编辑器中,如图3所示,该装置包括:Further, as the implementation of the above method, the embodiment of the present invention provides a code debugging device, the device embodiment corresponds to the foregoing method embodiment, for the convenience of reading, this device embodiment does not refer to the foregoing method embodiment The details will be described one by one, but it should be clear that the device in this embodiment can correspondingly implement all the content in the foregoing method embodiments. The device can be set in the code editor with debugging function, as shown in Figure 3, the device includes:
获取单元31,用于获取用户在代码中设置的断点行号,得到断点集合;An acquisition unit 31, configured to acquire the line number of the breakpoint set by the user in the code, to obtain a set of breakpoints;
判断单元32,用于根据所述代码执行的当前行号,判断所述当前行号是否在所述获取单元31得到的断点集合中;A judging unit 32, configured to judge whether the current line number is in the breakpoint set obtained by the acquiring unit 31 according to the current line number executed by the code;
执行单元33,用于当所述判断单元32判断所述当前行号为所述断点行号时,执行中断事件函数,以中断所述代码的执行。The execution unit 33 is configured to execute an interrupt event function to interrupt the execution of the code when the judging unit 32 judges that the current line number is the breakpoint line number.
进一步的,如图4所示,所述获取单元31包括:Further, as shown in FIG. 4, the acquisition unit 31 includes:
创建模块311,用于创建断点集合,所述断点集合中记录有用户在代码中设置的断点行号;Creating module 311, used to create a breakpoint set, the breakpoint line number set by the user in the code is recorded in the breakpoint set;
获取模块312,用于获取用户选择设置断点位置所在的代码行号;An acquisition module 312, configured to acquire the code line number where the user chooses to set the breakpoint position;
添加模块313,用于将所述获取模块312获取的代码行号添加到所述创建模块311创建的断点集合中;An adding module 313, configured to add the code line number obtained by the obtaining module 312 to the breakpoint set created by the creating module 311;
删除模块314,用于当所述获取模块312所获取的代码行号已存在于所述断点集合中时,在所述创建模块311创建的断点集合中删除所述代码行号。The deletion module 314 is configured to delete the code line number from the breakpoint set created by the creation module 311 when the code line number acquired by the acquisition module 312 already exists in the breakpoint set.
进一步的,如图4所示,所述判断单元32包括:Further, as shown in FIG. 4, the judging unit 32 includes:
调用模块321,用于根据在所述代码每一行之后添加的中断代码调用所述中断代码中的中断事件函数;A calling module 321, configured to call the interrupt event function in the interrupt code according to the interrupt code added after each line of the code;
判断模块322,用于在执行所述调用模块321调用的中断事件函数时,判断所述代码执行的当前行号是否在所述断点集合中。The judging module 322 is configured to judge whether the current line number of the code execution is in the breakpoint set when the interrupt event function called by the calling module 321 is executed.
进一步的,所述判断模块322还包括:Further, the judging module 322 also includes:
设置子模块,用于设置行号计数器,设置初始值为1;Set the submodule, which is used to set the line number counter, and set the initial value to 1;
计算子所述,用于在所述代码执行时,每调用一次所述中断事件函数,则为所述设置子模块设置的计数器的值加1,得到所述代码执行的当前行号;The calculation sub-module is used to add 1 to the value of the counter set by the setting sub-module every time the interrupt event function is called when the code is executed, so as to obtain the current line number of the code execution;
判断子模块,用于遍历所述断点集合中的断点行号,判断所述计算模块得到的当前行号是否为断点行号。The judging sub-module is used for traversing the breakpoint line numbers in the breakpoint set, and judging whether the current line number obtained by the calculation module is a breakpoint line number.
进一步的,如图4所示,所述执行单元33包括:Further, as shown in FIG. 4, the execution unit 33 includes:
第一执行模块331,用于当所述代码调用所述创建模块331设置的中断事件函数,且所述代码执行的当前行号为断点行号时,执行所述中断事件函数;The first execution module 331 is configured to execute the interrupt event function when the code calls the interrupt event function set by the creation module 331, and the current line number executed by the code is a breakpoint line number;
第二执行模块332,用于根据所述第一执行模块331执行的中断事件函数所调用的调试中断脚本,执行所述调试中断脚本,以中断所述代码的继续执行。The second execution module 332 is configured to execute the debugging interruption script according to the debugging interruption script called by the interruption event function executed by the first execution module 331, so as to interrupt the continuous execution of the code.
进一步的,如图4所示,所述装置还包括:Further, as shown in Figure 4, the device also includes:
终止单元34,用于根据用户的指令终止所述执行单元33所执行的中断事件函数的运行,恢复所述代码的执行。The termination unit 34 is configured to terminate the operation of the interrupt event function executed by the execution unit 33 according to the user's instruction, and resume the execution of the code.
进一步的,如图4所示,所述终止单元34包括:Further, as shown in FIG. 4, the termination unit 34 includes:
获取模块341,用于获取用户的终止指令;An acquisition module 341, configured to acquire a user termination instruction;
停止模块342,用于根据所述获取模块获取的终止指令停止所述中断事件函数的运行,以便所述代码继续执行。The stop module 342 is configured to stop the execution of the interrupt event function according to the termination instruction acquired by the acquisition module, so that the code can continue to execute.
进一步的,所述装置使用Python代码编辑所述代码,使用C#函数编辑所述中断事件函数。Further, the device uses Python code to edit the code, and uses C# function to edit the interrupt event function.
进一步的,如图4所示,所述装置还包括:Further, as shown in Figure 4, the device also includes:
添加单元35,用于在执行中断事件函数之前,利用IronPython作用域接口将所述中断事件函数添加到所述代码的作用域中,所述作用域用于确定函数名在所述代码中的作用范围。The adding unit 35 is used to add the interrupt event function to the scope of the code by using the IronPython scope interface before executing the interrupt event function, and the scope is used to determine the function of the function name in the code scope.
综上所述,本发明实施例所采用的代码调试方法及装置,只需要用户确定需要暂停调试的代码行位置,代码程序在执行时就能够自动的识别出用户所选择的暂停位置,并将代码程序停止在该位置上,等待用户的下一步指示,在接收到用户取消暂停的指令后,恢复代码程序的执行,直至运行至下一个调试断点代码行。由于本发明实施例所采用的方法是实时地更新断点集合中的断点行号,因此,能够在代码程序的执行过程中随时的添加或删除用户所需的断点,为代码程序的调试提供了更加灵活的调试方式。相对于现有的代码程序调试方式,本发明实施例不需要用户进行频繁的修改代码,设置插入弹框来暂停代码程序的执行,而是由用户在代码的调试过程中动态的选择需要暂停的位置,并在用户的控制下恢复代码的运行状态。因此,本发明实施例所采用的代码调试方法及装置能够更快速的确定问题代码的位置,从而提升Python代码的调试效率。In summary, the code debugging method and device adopted in the embodiments of the present invention only need the user to determine the position of the code line that needs to be suspended for debugging, and the code program can automatically recognize the pause position selected by the user when it is executed, and The code program stops at this position, waiting for the user's next instruction, and after receiving the user's instruction to cancel the suspension, resumes the execution of the code program until it runs to the next debugging breakpoint code line. Because the method adopted in the embodiment of the present invention is to update the breakpoint line number in the breakpoint set in real time, therefore, the breakpoint required by the user can be added or deleted at any time during the execution of the code program, which is helpful for the debugging of the code program. Provides a more flexible debugging method. Compared with the existing code program debugging method, the embodiment of the present invention does not require the user to modify the code frequently, and set the insertion bullet box to suspend the execution of the code program, but the user dynamically selects the program that needs to be suspended during the code debugging process. location, and restore the running state of the code under user control. Therefore, the code debugging method and device adopted in the embodiments of the present invention can more quickly determine the location of problem codes, thereby improving the debugging efficiency of Python codes.
所述代码调试装置包括处理器和存储器,上述获取单元、判断单元、执行单元和终止单元等均作为程序单元存储在存储器中,由处理器执行存储在存储器中的上述程序单元来实现相应的功能。The code debugging device includes a processor and a memory. The acquisition unit, judgment unit, execution unit, and termination unit are all stored in the memory as program units, and the processor executes the above program units stored in the memory to realize corresponding functions. .
处理器中包含内核,由内核去存储器中调取相应的程序单元。内核可以设置一个或以上,通过调整内核参数来简化Python代码的调试过程,通过在调试过程中实时调整代码中的断点位置来快速确定问题代码的位置,从而提升Python代码的调试效率。The processor includes a kernel, and the kernel fetches corresponding program units from the memory. One or more kernels can be set to simplify the debugging process of Python code by adjusting kernel parameters, and quickly determine the location of the problem code by adjusting the breakpoint position in the code in real time during the debugging process, thereby improving the debugging efficiency of Python code.
存储器可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flashRAM),存储器包括至少一个存储芯片。Memory may include non-permanent memory in computer-readable media, random access memory (RAM) and/or non-volatile memory, such as read-only memory (ROM) or flash memory (flashRAM), and memory includes at least one storage chip.
本申请还提供了一种计算机程序产品,当在数据处理设备上执行时,适于执行初始化有如下方法步骤的程序代码:获取用户在代码中设置的断点行号,得到断点集合;根据所述代码执行的当前行号,判断所述当前行号是否在所述断点集合中;若存在,则执行中断事件函数,以中断所述代码的执行;根据用户的指令终止所述中断事件函数的运行,恢复所述代码的执行。The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program code that is initialized with the following method steps: obtain the breakpoint line number set by the user in the code, and obtain a breakpoint set; The current line number of the code execution, judge whether the current line number is in the breakpoint set; if it exists, execute the interrupt event function to interrupt the execution of the code; terminate the interrupt event according to the user's instruction The execution of the function resumes execution of the code.
本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art should understand that the embodiments of the present application may be provided as methods, systems, or computer program products. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
本申请是参照根据本申请实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present application is described with reference to flowcharts and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present application. It should be understood that each procedure and/or block in the flowchart and/or block diagram, and a combination of procedures and/or blocks in the flowchart and/or block diagram can be realized by computer program instructions. These computer program instructions may be provided to a general purpose computer, special purpose computer, embedded processor, or processor of other programmable data processing equipment to produce a machine such that the instructions executed by the processor of the computer or other programmable data processing equipment produce a An apparatus for realizing the functions specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to operate in a specific manner, such that the instructions stored in the computer-readable memory produce an article of manufacture comprising instruction means, the instructions The device realizes the function specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded onto a computer or other programmable data processing device, causing a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process, thereby The instructions provide steps for implementing the functions specified in the flow chart or blocks of the flowchart and/or the block or blocks of the block diagrams.
在一个典型的配置中,计算设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
存储器可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flashRAM)。存储器是计算机可读介质的示例。Memory may include non-permanent storage in computer readable media, in the form of random access memory (RAM) and/or nonvolatile memory, such as read only memory (ROM) or flash RAM. The memory is an example of a computer readable medium.
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括暂存电脑可读媒体(transitory media),如调制的数据信号和载波。Computer-readable media, including both permanent and non-permanent, removable and non-removable media, can be implemented by any method or technology for storage of information. Information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory (ROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Flash memory or other memory technology, Compact Disc Read-Only Memory (CD-ROM), Digital Versatile Disc (DVD) or other optical storage, Magnetic tape cartridge, tape magnetic disk storage or other magnetic storage device or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media excludes transitory computer-readable media, such as modulated data signals and carrier waves.
还需要说明的是,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、商品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、商品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括要素的过程、方法、商品或者设备中还存在另外的相同要素。It should also be noted that the term "comprises", "comprises" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article, or apparatus comprising a set of elements includes not only those elements, but also includes Other elements not expressly listed, or elements inherent in the process, method, commodity, or apparatus are also included. Without further limitations, an element defined by the phrase "comprising a ..." does not preclude the presence of additional identical elements in the process, method, article, or apparatus that includes the element.
本领域技术人员应明白,本申请的实施例可提供为方法、系统或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art should understand that the embodiments of the present application may be provided as methods, systems or computer program products. Accordingly, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
以上仅为本申请的实施例而已,并不用于限制本申请。对于本领域技术人员来说,本申请可以有各种更改和变化。凡在本申请的精神和原理之内所作的任何修改、等同替换、改进等,均应包含在本申请的权利要求范围之内。The above are only examples of the present application, and are not intended to limit the present application. For those skilled in the art, various modifications and changes may occur in this application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included within the scope of the claims of the present application.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201510752641.7A CN106681897B (en) | 2015-11-06 | 2015-11-06 | Code debugging method and device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201510752641.7A CN106681897B (en) | 2015-11-06 | 2015-11-06 | Code debugging method and device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN106681897A true CN106681897A (en) | 2017-05-17 |
| CN106681897B CN106681897B (en) | 2020-10-16 |
Family
ID=58863192
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201510752641.7A Expired - Fee Related CN106681897B (en) | 2015-11-06 | 2015-11-06 | Code debugging method and device |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN106681897B (en) |
Cited By (10)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107463500A (en) * | 2017-08-09 | 2017-12-12 | 网易(杭州)网络有限公司 | Adjustment method, medium, system and the computing device of test script |
| CN107678974A (en) * | 2017-11-02 | 2018-02-09 | 郑州云海信息技术有限公司 | A kind of method and device of debugging Python scripts |
| CN107729242A (en) * | 2017-10-12 | 2018-02-23 | 郑州云海信息技术有限公司 | A kind of automated testing method, system, device and computer-readable storage medium |
| CN109783342A (en) * | 2017-11-10 | 2019-05-21 | 华为技术有限公司 | Script debugging method, equipment and computer storage medium |
| CN111240816A (en) * | 2020-01-03 | 2020-06-05 | 上海瀚之友信息技术服务有限公司 | Program interruptible operation system and method |
| CN112860362A (en) * | 2021-02-05 | 2021-05-28 | 达而观数据(成都)有限公司 | Visual debugging method and system for robot automation process |
| CN114489972A (en) * | 2021-12-30 | 2022-05-13 | 东莞市李群自动化技术有限公司 | Device commissioning method, device and storage medium |
| CN115543858A (en) * | 2022-12-02 | 2022-12-30 | 北京大学 | Method and device for debugging code file and nonvolatile storage medium |
| WO2023125768A1 (en) * | 2021-12-30 | 2023-07-06 | 东莞市李群自动化技术有限公司 | Device debugging method, device, and storage medium |
| CN118503138A (en) * | 2024-07-17 | 2024-08-16 | 杭州新中大科技股份有限公司 | Application program debugging method, device, equipment and storage medium |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20030106046A1 (en) * | 2001-11-30 | 2003-06-05 | International Business Machines Corporation | Inheritance breakpoints for use in debugging object-oriented computer programs |
| CN101021812A (en) * | 2006-12-21 | 2007-08-22 | 华为技术有限公司 | Interpreter language debugging method and device |
| CN101142560A (en) * | 2005-01-28 | 2008-03-12 | Nxp股份有限公司 | Means and method for debugging |
| CN102662847A (en) * | 2012-04-23 | 2012-09-12 | 中颖电子股份有限公司 | System and method for program debugging of embedded system based on flash memory application |
| CN104346274A (en) * | 2013-07-29 | 2015-02-11 | 国际商业机器公司 | Program debugger and program debugging method |
-
2015
- 2015-11-06 CN CN201510752641.7A patent/CN106681897B/en not_active Expired - Fee Related
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20030106046A1 (en) * | 2001-11-30 | 2003-06-05 | International Business Machines Corporation | Inheritance breakpoints for use in debugging object-oriented computer programs |
| CN101142560A (en) * | 2005-01-28 | 2008-03-12 | Nxp股份有限公司 | Means and method for debugging |
| CN101021812A (en) * | 2006-12-21 | 2007-08-22 | 华为技术有限公司 | Interpreter language debugging method and device |
| CN102662847A (en) * | 2012-04-23 | 2012-09-12 | 中颖电子股份有限公司 | System and method for program debugging of embedded system based on flash memory application |
| CN104346274A (en) * | 2013-07-29 | 2015-02-11 | 国际商业机器公司 | Program debugger and program debugging method |
Cited By (14)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107463500A (en) * | 2017-08-09 | 2017-12-12 | 网易(杭州)网络有限公司 | Adjustment method, medium, system and the computing device of test script |
| CN107729242A (en) * | 2017-10-12 | 2018-02-23 | 郑州云海信息技术有限公司 | A kind of automated testing method, system, device and computer-readable storage medium |
| CN107678974A (en) * | 2017-11-02 | 2018-02-09 | 郑州云海信息技术有限公司 | A kind of method and device of debugging Python scripts |
| CN109783342A (en) * | 2017-11-10 | 2019-05-21 | 华为技术有限公司 | Script debugging method, equipment and computer storage medium |
| US11360879B2 (en) | 2017-11-10 | 2022-06-14 | Huawei Technologies Co., Ltd. | Script debugging method, device, and computer storage medium |
| CN111240816A (en) * | 2020-01-03 | 2020-06-05 | 上海瀚之友信息技术服务有限公司 | Program interruptible operation system and method |
| CN112860362B (en) * | 2021-02-05 | 2022-10-04 | 达而观数据(成都)有限公司 | Visual debugging method and system for robot automation process |
| CN112860362A (en) * | 2021-02-05 | 2021-05-28 | 达而观数据(成都)有限公司 | Visual debugging method and system for robot automation process |
| CN114489972A (en) * | 2021-12-30 | 2022-05-13 | 东莞市李群自动化技术有限公司 | Device commissioning method, device and storage medium |
| WO2023125768A1 (en) * | 2021-12-30 | 2023-07-06 | 东莞市李群自动化技术有限公司 | Device debugging method, device, and storage medium |
| CN114489972B (en) * | 2021-12-30 | 2025-07-04 | 东莞市李群自动化技术有限公司 | Device debugging method, device and storage medium |
| CN115543858A (en) * | 2022-12-02 | 2022-12-30 | 北京大学 | Method and device for debugging code file and nonvolatile storage medium |
| CN118503138A (en) * | 2024-07-17 | 2024-08-16 | 杭州新中大科技股份有限公司 | Application program debugging method, device, equipment and storage medium |
| CN118503138B (en) * | 2024-07-17 | 2024-09-24 | 杭州新中大科技股份有限公司 | Application debugging method, device, equipment and storage medium |
Also Published As
| Publication number | Publication date |
|---|---|
| CN106681897B (en) | 2020-10-16 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN106681897B (en) | Code debugging method and device | |
| CN112041823B (en) | Selective tracing of portions of computer process execution | |
| CN112074817B (en) | Execution control with cross-level trace mapping | |
| US10698726B2 (en) | Techniques for switching threads within routes | |
| US8849753B2 (en) | Automating asynchronous programming in single threaded systems | |
| CN112041824B (en) | Selective tracing of portions of computer process execution | |
| CN111708655A (en) | Application crash processing method, device and system | |
| US7530056B1 (en) | Method and system for detecting runtime defects in a program by comparing correct and incorrect runs | |
| KR102184436B1 (en) | Javascript debugging using just my code | |
| US20150006961A1 (en) | Capturing trace information using annotated trace output | |
| US9424163B2 (en) | Exception and debugging behaviors for JavaScript debugging using just my code | |
| CN101482845A (en) | Method and system for calling instant debugger | |
| US10216609B2 (en) | Exception prediction before an actual exception during debugging | |
| US9626281B2 (en) | Call stack display with program flow indication | |
| US9117020B2 (en) | Determining control flow divergence due to variable value difference | |
| CN104252402A (en) | Program debugging method and device | |
| WO2019134223A1 (en) | Log generation method and apparatus, computer device and storage medium | |
| US8966068B2 (en) | Selective logging of network requests based on subsets of the program that were executed | |
| US8898625B2 (en) | Optimized storage of function variables | |
| US20110202903A1 (en) | Apparatus and method for debugging a shared library | |
| CN113678110B (en) | Memory value exposure in time travel debug traces | |
| CN111881212A (en) | Method, device, equipment and storage medium for executing check point operation | |
| CN108197005B (en) | Low-level running performance monitoring method, medium, device and system of IOS application | |
| US10061604B2 (en) | Program execution recording and playback | |
| CN111651194B (en) | iOS-based adaptation method and 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 | ||
| CB02 | Change of applicant information |
Address after: 100083 No. 401, 4th Floor, Haitai Building, 229 North Fourth Ring Road, Haidian District, Beijing Applicant after: BEIJING GRIDSUM TECHNOLOGY Co.,Ltd. Address before: 100086 Cuigong Hotel, 76 Zhichun Road, Shuangyushu District, Haidian District, Beijing Applicant before: BEIJING GRIDSUM TECHNOLOGY Co.,Ltd. |
|
| CB02 | Change of applicant information | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant | ||
| CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20201016 |
|
| CF01 | Termination of patent right due to non-payment of annual fee |