OLD | NEW |
1 // Copyright 2008 the V8 project authors. All rights reserved. | 1 // Copyright 2008 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 931 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
942 | 942 |
943 // Get the running state. | 943 // Get the running state. |
944 details.running = response.running(); | 944 details.running = response.running(); |
945 | 945 |
946 var body = response.body(); | 946 var body = response.body(); |
947 var result = ''; | 947 var result = ''; |
948 switch (response.command()) { | 948 switch (response.command()) { |
949 case 'suspend': | 949 case 'suspend': |
950 details.text = 'stopped'; | 950 details.text = 'stopped'; |
951 break; | 951 break; |
952 | 952 |
953 case 'setbreakpoint': | 953 case 'setbreakpoint': |
954 result = 'set breakpoint #'; | 954 result = 'set breakpoint #'; |
955 result += body.breakpoint; | 955 result += body.breakpoint; |
956 details.text = result; | 956 details.text = result; |
957 break; | 957 break; |
958 | 958 |
959 case 'clearbreakpoint': | 959 case 'clearbreakpoint': |
960 result = 'cleared breakpoint #'; | 960 result = 'cleared breakpoint #'; |
961 result += body.breakpoint; | 961 result += body.breakpoint; |
962 details.text = result; | 962 details.text = result; |
963 break; | 963 break; |
964 | 964 |
965 case 'listbreakpoints': | 965 case 'listbreakpoints': |
966 result = 'breakpoints: (' + body.breakpoints.length + ')'; | 966 result = 'breakpoints: (' + body.breakpoints.length + ')'; |
967 for (var i = 0; i < body.breakpoints.length; i++) { | 967 for (var i = 0; i < body.breakpoints.length; i++) { |
968 var breakpoint = body.breakpoints[i]; | 968 var breakpoint = body.breakpoints[i]; |
969 result += '\n id=' + breakpoint.number; | 969 result += '\n id=' + breakpoint.number; |
970 result += ' type=' + breakpoint.type; | 970 result += ' type=' + breakpoint.type; |
971 if (breakpoint.script_id) { | 971 if (breakpoint.script_id) { |
972 result += ' script_id=' + breakpoint.script_id; | 972 result += ' script_id=' + breakpoint.script_id; |
973 } | 973 } |
974 if (breakpoint.script_name) { | 974 if (breakpoint.script_name) { |
(...skipping 699 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1674 json += NumberToJSON_(elem); | 1674 json += NumberToJSON_(elem); |
1675 } else if (typeof(elem) === 'string') { | 1675 } else if (typeof(elem) === 'string') { |
1676 json += StringToJSON_(elem); | 1676 json += StringToJSON_(elem); |
1677 } else { | 1677 } else { |
1678 json += elem; | 1678 json += elem; |
1679 } | 1679 } |
1680 } | 1680 } |
1681 json += ']'; | 1681 json += ']'; |
1682 return json; | 1682 return json; |
1683 } | 1683 } |
OLD | NEW |