The JavaScript debugger of Google Chrome has a sort of command line where you can enter commands to instruct the debugger to perform certain actions. Below is the list of commands that are available, do note that some commands need arguments whereas arguments surrounded by [] are optional and commands surrounded by <> are obligated.
Commands when the page is running normally (so it has not encountered any breakpoint yet):
break [condition]Set a break point where the location is <function> or
<script:function> or <script:line> or
<script:line:pos> break_info [breakpoint #]List the current breakpoints [or the details of the breakpoint that is specified
clear <breakpoint #>Remove a specified breakpoint
help [command]Display the help information for the current status [or the specified command]
print <expression>Output the expression specified which can be string, object, function, variable, etc.
scriptsList all of the scripts attached to the page.
exitThis command does work but it is unclear what it does, when performed the debugging doesn't work anymore.
The following commands are available when you are in debug mode (so the debugger has encountered a breakpoint):
argsSummerize the arguments to the current function. Does not display anything if there are no arguments.
break [condition]
Set a break point where the location is <function> or
<script:function> or <script:line> or
<script:line:pos>
break_info [breakpoint #]List the current breakpoints [or the details of the breakpoint that is specified]
backtrace [<from frame #> <to frame #>]Look at all the frames specified in the
range.
clear Remove a specified breakpoint
continueContinues the execution of the script.
frame [frame #]Shows the current frame [or shows the specified frame]
help [command]Display the help information for the current status [or the specified command]
localsSummarize the local variables for current frame. Displays the variables and their values.
nextMoves to the next line in the code. Acts the same as performing a step.
print <expression>
Output the expression specified which can be string, object, function, variable, etc.
scriptsList all of the scripts attached to the page.
source [from line] | [<from line> <num lines>]Show the current functions source code [or see a specified line or range of lines]
stepStep through the code line by line when paused in debug mode. stepoutThis does not seem to work, it should step out of the current method back to the calling method.
exit
This command does work but it is unclear what it does, when performed the debugging doesn't work anymore.
|