OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 /** | 5 /** |
6 * @fileoverview Provides communication interface to remote v8 debugger. See | 6 * @fileoverview Provides communication interface to remote v8 debugger. See |
7 * protocol decription at http://code.google.com/p/v8/wiki/DebuggerProtocol | 7 * protocol decription at http://code.google.com/p/v8/wiki/DebuggerProtocol |
8 */ | 8 */ |
9 goog.provide('devtools.DebuggerAgent'); | 9 goog.provide('devtools.DebuggerAgent'); |
10 | 10 |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 } | 216 } |
217 if (!breakpoints) { | 217 if (!breakpoints) { |
218 breakpoints = {}; | 218 breakpoints = {}; |
219 this.urlToBreakpoints_[script.getUrl()] = breakpoints; | 219 this.urlToBreakpoints_[script.getUrl()] = breakpoints; |
220 } | 220 } |
221 | 221 |
222 var breakpointInfo = new devtools.BreakpointInfo(line); | 222 var breakpointInfo = new devtools.BreakpointInfo(line); |
223 breakpoints[line] = breakpointInfo; | 223 breakpoints[line] = breakpointInfo; |
224 | 224 |
225 commandArguments = { | 225 commandArguments = { |
| 226 'groupId': this.contextId_, |
226 'type': 'script', | 227 'type': 'script', |
227 'target': script.getUrl(), | 228 'target': script.getUrl(), |
228 'line': line | 229 'line': line |
229 }; | 230 }; |
230 } else { | 231 } else { |
231 var breakpointInfo = script.getBreakpointInfo(line); | 232 var breakpointInfo = script.getBreakpointInfo(line); |
232 if (breakpointInfo) { | 233 if (breakpointInfo) { |
233 return; | 234 return; |
234 } | 235 } |
235 | 236 |
236 breakpointInfo = new devtools.BreakpointInfo(line); | 237 breakpointInfo = new devtools.BreakpointInfo(line); |
237 script.addBreakpointInfo(breakpointInfo); | 238 script.addBreakpointInfo(breakpointInfo); |
238 | 239 |
239 commandArguments = { | 240 commandArguments = { |
| 241 'groupId': this.contextId_, |
240 'type': 'scriptId', | 242 'type': 'scriptId', |
241 'target': sourceId, | 243 'target': sourceId, |
242 'line': line | 244 'line': line |
243 }; | 245 }; |
244 } | 246 } |
245 | 247 |
246 var cmd = new devtools.DebugCommand('setbreakpoint', commandArguments); | 248 var cmd = new devtools.DebugCommand('setbreakpoint', commandArguments); |
247 | 249 |
248 this.requestNumberToBreakpointInfo_[cmd.getSequenceNumber()] = breakpointInfo; | 250 this.requestNumberToBreakpointInfo_[cmd.getSequenceNumber()] = breakpointInfo; |
249 | 251 |
(...skipping 1074 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1324 | 1326 |
1325 | 1327 |
1326 /** | 1328 /** |
1327 * @param {number} handle Object handle. | 1329 * @param {number} handle Object handle. |
1328 * @return {?Object} Returns the object with the handle if it was sent in this | 1330 * @return {?Object} Returns the object with the handle if it was sent in this |
1329 * message(some objects referenced by handles may be missing in the message). | 1331 * message(some objects referenced by handles may be missing in the message). |
1330 */ | 1332 */ |
1331 devtools.DebuggerMessage.prototype.lookup = function(handle) { | 1333 devtools.DebuggerMessage.prototype.lookup = function(handle) { |
1332 return this.refs_[handle]; | 1334 return this.refs_[handle]; |
1333 }; | 1335 }; |
OLD | NEW |