source: branches/4.5.1/src/scripttools/debugging/scripts/commands/advance.qs@ 559

Last change on this file since 559 was 2, checked in by Dmitry A. Kuminov, 16 years ago

Initially imported qt-all-opensource-src-4.5.1 from Trolltech.

File size: 1.1 KB
Line 
1name = "advance";
2
3group = "running";
4
5shortDescription = "Continue the program up to the given location";
6
7longDescription = "This command has the same syntax as the \"break\" command.";
8
9seeAlso = [ "break", "tbreak" ];
10
11argumentTypes = [ "script-filename" ];
12
13function execute() {
14 if (arguments.length == 0) {
15 message("Missing argument(s).");
16 return;
17 }
18 var arg = arguments[0];
19 var colonIndex = arg.lastIndexOf(':');
20 if (colonIndex == -1) {
21 lineNumber = parseInt(arg);
22 if (isNaN(lineNumber)) {
23 message("Location must be of the form <file>:<line> or <line>.");
24 return;
25 }
26 var sid = getCurrentScriptId();
27 if (sid == -1) {
28 message("No script.");
29 return;
30 }
31 scheduleRunToLocation(sid, lineNumber);
32 } else {
33 fileName = arg.slice(0, colonIndex);
34 lineNumber = parseInt(arg.slice(colonIndex+1));
35 // ### resolve the script to see if it's loaded or not? (e.g. so we can issue a warning)
36 scheduleRunToLocation(fileName, lineNumber);
37 }
38}
39
40function handleResponse(resp) {
41}
Note: See TracBrowser for help on using the repository browser.