5f8c0a1396
With flag we can debug injected-script-source in inspector-test or from DevTools frontend as regular user code. We need this when working on new features or debugging issues, it's for internal purpose only and doesn't provide any benefits for end users. Flag: --expose-inspector-scripts BUG=none R=yangguo@chromium.org Review-Url: https://codereview.chromium.org/2767873002 Cr-Commit-Position: refs/heads/master@{#44039}
21 lines
773 B
JavaScript
21 lines
773 B
JavaScript
// Copyright 2017 the V8 project authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
// Flags: --expose-inspector-scripts
|
|
|
|
Protocol.Debugger.onPaused(message => {
|
|
let url = InspectorTest._scriptMap.get(message.params.callFrames[0].location.scriptId).url;
|
|
if (url !== 'test.js') {
|
|
InspectorTest.log('InjectedSciptSource on stack.');
|
|
InspectorTest.completeTest();
|
|
}
|
|
Protocol.Debugger.stepInto();
|
|
});
|
|
|
|
InspectorTest.setupScriptMap();
|
|
Protocol.Debugger.enable();
|
|
Protocol.Debugger.pause();
|
|
Protocol.Runtime.evaluate({expression: 'console.log(42)//# sourceURL=test.js'})
|
|
.then(() => InspectorTest.log('InjectedSciptSource was not reached'))
|
|
.then(InspectorTest.completeTest);
|