Debugging for integrated scripting applications
Abstract
Methods, systems, and apparatus, including computer programs encoded on computer storage media, for implementing a debugger for integrated scripting applications. One of the methods includes generating a modified script from an original script, the modified script being written in a scripting language and having a respective breakpoint inquiry command for a plurality of original commands from the original script, wherein each breakpoint inquiry command calls a breakpoint inquiry function with a unique identifier assigned to a corresponding original command. The modified script is executed including calling the breakpoint inquiry function before the plurality of original commands from the original script. If a particular call to the breakpoint inquiry function corresponds to a set breakpoint, execution of the modified script is stopped and updated debugging information is provided to a debug client configured to generate a user interface presentation of the updated debugging information.
Claims
exact text as granted — not AI-modifiedWhat is claimed is:
1. A computer-implemented method comprising:
receiving an original script written in a scripting language for execution by a script interpreter that is integrated with an application, wherein the script interpreter is configured to execute script commands using values read from objects generated by the application;
generating a modified script from the original script, the modified script being also written in the scripting language and having a breakpoint inquiry command before each of a plurality of original commands from the original script, wherein each breakpoint inquiry command calls a breakpoint inquiry function with a unique identifier assigned to a corresponding original command;
executing the modified script including calling the breakpoint inquiry function before each of the plurality of original commands from the original script;
determining that a particular call to the breakpoint inquiry function corresponds to a set breakpoint; and
upon determining the particular call corresponds to the set breakpoint, stopping execution of the modified script and providing updated debugging information to a debug client configured to generate a user interface presentation of the updated debugging information.
2. The method of claim 1 , wherein stopping execution of the modified script comprises executing a variable wait function that pauses script execution until a value of a particular variable is modified.
3. The method of claim 2 , further comprising:
receiving an indication that execution should resume; and
in response, modifying the value of the particular variable to cause the variable wait function to stop waiting.
4. The method of claim 1 , wherein the application is written in a different programming language than the original script and the modified script.
5. The method of claim 1 , wherein determining that a particular call to the breakpoint inquiry function corresponds to the set breakpoint comprises:
maintaining a set of unique identifiers that correspond to breakpoint locations;
receiving, as a parameter to the particular call to the breakpoint inquiry function, a particular unique identifier assigned to an original command in the original script; and
determining that the unique identifier assigned to the original command in the original script occurs in the set of unique identifiers that correspond to set breakpoints.
6. The method of claim 1 , wherein generating the modified script comprises assigning a unique identifier to a plurality of commands in the original script.
7. The method of claim 1 , further comprising:
receiving a request for status of a particular variable as of a time that execution of the modified script was stopped;
querying the script interpreter for a status of the particular variable; and
providing the status of the particular variable to the debug client for display to a user.
8. The method of claim 1 , further comprising:
receiving a request to execute a custom script command that corresponds to functionality provided by the application; and
in response, providing the custom script command to the script interpreter for execution and showing the status or result of the executed command.
9. The method of claim 8 , wherein the custom script command creates, modifies, or deletes an object that can be used by the application.
10. The method of claim 8 , wherein the objects correspond to elements of an integrated circuit design.
11. The method of claim 1 , wherein the application does not have integrated debugging functionality.
12. A system comprising:
one or more computers and one or more storage devices storing instructions that are operable, when executed by the one or more computers, to cause the one or more computers to perform operations comprising:
receiving an original script written in a scripting language for execution by a script interpreter that is integrated with an application, wherein the script interpreter is configured to execute script commands using values read from objects generated by the application;
generating a modified script from the original script, the modified script being also written in the scripting language and having a breakpoint inquiry command before each of a plurality of original commands from the original script, wherein each breakpoint inquiry command calls a breakpoint inquiry function with a unique identifier assigned to a corresponding original command;
executing the modified script including calling the breakpoint inquiry function before each of the plurality of original commands from the original script;
determining that a particular call to the breakpoint inquiry function corresponds to a set breakpoint; and
in response, stopping execution of the modified script and providing updated debugging information to a debug client configured to generate a user interface presentation of the updated debugging information.
13. The system of claim 12 , wherein stopping execution of the modified script comprises executing a variable wait function that pauses script execution until a value of a particular variable is modified.
14. The system of claim 13 , wherein the operations further comprise:
receiving an indication that execution should resume; and
in response, modifying the value of the particular variable to cause the variable wait function to stop waiting.
15. The system of claim 12 , wherein the application is written in a different programming language than the original script and the modified script.
16. The system of claim 12 , wherein determining that a particular call to the breakpoint inquiry function corresponds to the set breakpoint comprises:
maintaining a set of unique identifiers that correspond to breakpoint locations;
receiving, as a parameter to the particular call to the breakpoint inquiry function, a particular unique identifier assigned to an original command in the original script; and
determining that the unique identifier assigned to the original command in the original script occurs in the set of unique identifiers that correspond to set breakpoints.
17. The system of claim 12 , wherein generating the modified script comprises assigning a unique identifier to a plurality of commands in the original script.
18. The system of claim 12 , wherein the operations further comprise:
receiving a request for status of a particular variable as of a time that execution of the modified script was stopped;
querying the script interpreter for a status of the particular variable; and
providing the status of the particular variable to the debug client for display to a user.
19. The system of claim 12 , wherein the script interpreter is only compatible with the system.
20. A computer program product, encoded on one or more non-transitory computer storage media, comprising instructions that when executed by one or more computers cause the one or more computers to perform operations comprising:
receiving an original script written in a scripting language for execution by a script interpreter that is integrated with an application, wherein the script interpreter is configured to execute script commands using values read from objects generated by the application;
generating a modified script from the original script, the modified script being also written in the scripting language and having a breakpoint inquiry command before each of a plurality of original commands from the original script, wherein each breakpoint inquiry command calls a breakpoint inquiry function with a unique identifier assigned to a corresponding original command;
executing the modified script including calling the breakpoint inquiry function before each of the plurality of original commands from the original script;
determining that a particular call to the breakpoint inquiry function corresponds to a set breakpoint; and
upon determining the particular call corresponds to the set breakpoint, stopping execution of the modified script and providing updated debugging information to a debug client configured to generate a user interface presentation of the updated debugging information.Cited by (0)
No later patents cite this yet.
References (0)
No backward citations on record.