OLD | NEW |
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 the V8 project 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 "use strict"; | 5 "use strict"; |
6 | 6 |
7 // If true, prints all messages sent and received by inspector. | 7 // If true, prints all messages sent and received by inspector. |
8 const printProtocolMessages = false; | 8 const printProtocolMessages = false; |
9 | 9 |
10 // The active wrapper instance. | 10 // The active wrapper instance. |
(...skipping 20 matching lines...) Expand all Loading... |
31 this.DebugEvent = { Break: 1, | 31 this.DebugEvent = { Break: 1, |
32 Exception: 2, | 32 Exception: 2, |
33 AfterCompile: 3, | 33 AfterCompile: 3, |
34 CompileError: 4, | 34 CompileError: 4, |
35 }; | 35 }; |
36 | 36 |
37 // The different types of steps. | 37 // The different types of steps. |
38 this.StepAction = { StepOut: 0, | 38 this.StepAction = { StepOut: 0, |
39 StepNext: 1, | 39 StepNext: 1, |
40 StepIn: 2, | 40 StepIn: 2, |
41 StepFrame: 3, | |
42 }; | 41 }; |
43 | 42 |
44 // The different types of scripts matching enum ScriptType in objects.h. | 43 // The different types of scripts matching enum ScriptType in objects.h. |
45 this.ScriptType = { Native: 0, | 44 this.ScriptType = { Native: 0, |
46 Extension: 1, | 45 Extension: 1, |
47 Normal: 2, | 46 Normal: 2, |
48 Wasm: 3, | 47 Wasm: 3, |
49 Inspector: 4, | 48 Inspector: 4, |
50 }; | 49 }; |
51 | 50 |
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
411 | 410 |
412 this.breakpoints.add(breakpoint); | 411 this.breakpoints.add(breakpoint); |
413 return breakpoint; | 412 return breakpoint; |
414 } | 413 } |
415 | 414 |
416 execStatePrepareStep(action) { | 415 execStatePrepareStep(action) { |
417 switch(action) { | 416 switch(action) { |
418 case this.StepAction.StepOut: this.stepOut(); break; | 417 case this.StepAction.StepOut: this.stepOut(); break; |
419 case this.StepAction.StepNext: this.stepOver(); break; | 418 case this.StepAction.StepNext: this.stepOver(); break; |
420 case this.StepAction.StepIn: this.stepInto(); break; | 419 case this.StepAction.StepIn: this.stepInto(); break; |
421 case this.StepAction.StepFrame: %PrepareStepFrame(); break; | |
422 default: %AbortJS("Unsupported StepAction"); break; | 420 default: %AbortJS("Unsupported StepAction"); break; |
423 } | 421 } |
424 } | 422 } |
425 | 423 |
426 execStateScopeType(type) { | 424 execStateScopeType(type) { |
427 switch (type) { | 425 switch (type) { |
428 case "global": return this.ScopeType.Global; | 426 case "global": return this.ScopeType.Global; |
429 case "local": return this.ScopeType.Local; | 427 case "local": return this.ScopeType.Local; |
430 case "with": return this.ScopeType.With; | 428 case "with": return this.ScopeType.With; |
431 case "closure": return this.ScopeType.Closure; | 429 case "closure": return this.ScopeType.Closure; |
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
890 debug.instance = new DebugWrapper(); | 888 debug.instance = new DebugWrapper(); |
891 debug.instance.enable(); | 889 debug.instance.enable(); |
892 } | 890 } |
893 return debug.instance; | 891 return debug.instance; |
894 }}); | 892 }}); |
895 | 893 |
896 Object.defineProperty(debug, 'ScopeType', { get: function() { | 894 Object.defineProperty(debug, 'ScopeType', { get: function() { |
897 const instance = debug.Debug; | 895 const instance = debug.Debug; |
898 return instance.ScopeType; | 896 return instance.ScopeType; |
899 }}); | 897 }}); |
OLD | NEW |