|
97 | 97 | Debug.setBreakPoint = function(func, line, column) { |
98 | 98 | Logger.LogAPI(`Debug.setBreakPoint(${func},${line},${column})`); |
99 | 99 | var funcInfo = CallHostFunction(chakraDebug.JsDiagGetFunctionPosition, |
100 | | - func); |
| 100 | + func); |
101 | 101 | var bpId = -1; |
102 | 102 |
|
103 | 103 | if (funcInfo.scriptId >= 0) { |
|
150 | 150 | var objectHandle = obj['handle']; |
151 | 151 |
|
152 | 152 | var childProperties = CallHostFunction(chakraDebug.JsDiagGetProperties, |
153 | | - objectHandle, 0, 1000); |
| 153 | + objectHandle, 0, 1000); |
154 | 154 |
|
155 | 155 | var propertiesArray = []; |
156 | 156 | ['properties', 'debuggerOnlyProperties'].forEach( |
|
288 | 288 | } |
289 | 289 | } catch (ex) { |
290 | 290 | Logger.LogError('ProcessPendingBreakpoints exception: ' + |
291 | | - ex.message, |
292 | | - ex.stack); |
| 291 | + ex.message, |
| 292 | + ex.stack); |
293 | 293 | } |
294 | 294 | } |
295 | 295 | Array.prototype.push.apply(_pendingBreakpoints, unResolvedBreakpoints); |
|
417 | 417 | ExecutionState.prototype.GetObjectProtoEvalHandle = function() { |
418 | 418 | if (!this.objectProtoEval) { |
419 | 419 | var objEval = CallHostFunction(chakraDebug.JsDiagEvaluate, |
420 | | - 'Object.__proto__', 0); |
| 420 | + 'Object.__proto__', 0); |
421 | 421 | if (!objEval[0]) { |
422 | 422 | Logger.LogError('Evaluating Object.__proto__ failed'); |
423 | 423 | } |
|
429 | 429 | ExecutionState.prototype.GetObjectPrototypeEvalHandle = function() { |
430 | 430 | if (!this.objectPrototypeEval) { |
431 | 431 | var objEval = CallHostFunction(chakraDebug.JsDiagEvaluate, |
432 | | - 'Object.prototype', 0); |
| 432 | + 'Object.prototype', 0); |
433 | 433 | if (!objEval[0]) { |
434 | 434 | Logger.LogError('Evaluating Object.prototype failed'); |
435 | 435 | } |
|
539 | 539 |
|
540 | 540 | V8Frame.prototype.Evaluate = function(expression) { |
541 | 541 | return CallHostFunction(chakraDebug.JsDiagEvaluate, expression, |
542 | | - this.frame.index); |
| 542 | + this.frame.index); |
543 | 543 | }; |
544 | 544 |
|
545 | 545 |
|
|
564 | 564 | V8Breakpoint.prototype.Set = function() { |
565 | 565 | // {"breakpointId":1,"line":2,"column":4,"scriptId":1,"parentScriptId":2} |
566 | 566 | var bpObject = CallHostFunction(chakraDebug.JsDiagSetBreakpoint, |
567 | | - this.scriptObject.GetId(), this.line, this.column); |
| 567 | + this.scriptObject.GetId(), |
| 568 | + this.line, this.column); |
568 | 569 | if (!bpObject) { |
569 | 570 | return false; |
570 | 571 | } |
|
680 | 681 | }; |
681 | 682 |
|
682 | 683 | V8CommandProcessor.prototype.source = function(request, response) { |
683 | | - var chakraSourceObj = CallHostFunctionNoLog(chakraDebug.JsDiagGetSource, |
| 684 | + var chakraSourceObj = CallHostFunctionNoLog( |
| 685 | + chakraDebug.JsDiagGetSource, |
684 | 686 | globalExecutionState.GetBreakScriptId()); |
685 | 687 | response.success = true; |
686 | 688 | response.body = {}; |
|
724 | 726 | } |
725 | 727 |
|
726 | 728 | if (!CallHostFunction(chakraDebug.JsDiagSetStepType, |
727 | | - jsDiagSetStepType)) { |
| 729 | + jsDiagSetStepType)) { |
728 | 730 | success = false; |
729 | 731 | } |
730 | 732 | } |
|
858 | 860 | } |
859 | 861 | } else { |
860 | 862 | handleObject = CallHostFunction(chakraDebug.JsDiagGetObjectFromHandle, |
861 | | - handle); |
| 863 | + handle); |
862 | 864 | if (handleObject) { |
863 | 865 | AddChildrens(handleObject); |
864 | 866 | } |
|
952 | 954 | } |
953 | 955 |
|
954 | 956 | var success = CallHostFunction(chakraDebug.JsDiagSetBreakOnException, |
955 | | - breakOnExceptionAttribute); |
| 957 | + breakOnExceptionAttribute); |
956 | 958 | response.success = success ? true : false; |
957 | 959 |
|
958 | 960 | response.body = {}; |
|
996 | 998 |
|
997 | 999 | //var scopesMap = { 'locals': 1, 'globals': 0, 'scopes': 3 }; |
998 | 1000 | if (locals.length > 0) { |
999 | | - var scopeAndRef = DebugManager.Utility.CreateScopeAndRef(1, locals, |
1000 | | - frameIndex, request.arguments.frame_index); |
| 1001 | + var scopeAndRef = |
| 1002 | + DebugManager.Utility.CreateScopeAndRef( |
| 1003 | + 1, locals, |
| 1004 | + frameIndex, request.arguments.frame_index); |
1001 | 1005 | scopes.push(scopeAndRef.scope); |
1002 | 1006 | refs.push(scopeAndRef.ref); |
1003 | 1007 | } |
|
1019 | 1023 | }); |
1020 | 1024 |
|
1021 | 1025 | if (allScopeProperties.length > 0) { |
1022 | | - var allScopeAndRef = DebugManager.Utility.CreateScopeAndRef(3, |
1023 | | - allScopeProperties, frameIndex, request.arguments.frame_index); |
| 1026 | + var allScopeAndRef = |
| 1027 | + DebugManager.Utility.CreateScopeAndRef( |
| 1028 | + 3, allScopeProperties, frameIndex, request.arguments.frame_index); |
1024 | 1029 | scopes.push(allScopeAndRef.scope); |
1025 | 1030 | refs.push(allScopeAndRef.ref); |
1026 | 1031 | } |
1027 | 1032 | } |
1028 | 1033 |
|
1029 | 1034 | if (props['globals'] && props['globals'].handle) { |
1030 | 1035 | var globalsProps = CallHostFunction(chakraDebug.JsDiagGetProperties, |
1031 | | - props['globals'].handle, 0, 5000); |
| 1036 | + props['globals'].handle, 0, 5000); |
1032 | 1037 |
|
1033 | 1038 | var globalProperties = []; |
1034 | 1039 | globalsProps['properties'].map(function(glbProperty) { |
|
1038 | 1043 | globalProperties.push(glbDbgProp); |
1039 | 1044 | }); |
1040 | 1045 | if (globalProperties.length > 0) { |
1041 | | - var glbScopeAndRef = DebugManager.Utility.CreateScopeAndRef(0, |
1042 | | - globalProperties, frameIndex, request.arguments.frame_index); |
| 1046 | + var glbScopeAndRef = |
| 1047 | + DebugManager.Utility.CreateScopeAndRef( |
| 1048 | + 0, globalProperties, frameIndex, request.arguments.frame_index); |
1043 | 1049 | scopes.push(glbScopeAndRef.scope); |
1044 | 1050 | refs.push(glbScopeAndRef.ref); |
1045 | 1051 | } |
|
0 commit comments