@@ -5,6 +5,7 @@ const common = require('../common');
5
5
common . skipIfInspectorDisabled ( ) ;
6
6
7
7
const assert = require ( 'assert' ) ;
8
+ const { resolve : UrlResolve } = require ( 'url' ) ;
8
9
const fixtures = require ( '../common/fixtures' ) ;
9
10
const { NodeInstance } = require ( '../common/inspector-helper.js' ) ;
10
11
@@ -43,14 +44,15 @@ async function testBreakpointOnStart(session) {
43
44
] ;
44
45
45
46
await session . send ( commands ) ;
46
- await session . waitForBreakOnLine ( 0 , session . scriptURL ( ) ) ;
47
+ await session . waitForBreakOnLine (
48
+ 0 , UrlResolve ( session . scriptURL ( ) . toString ( ) , 'message.mjs' ) ) ;
47
49
}
48
50
49
51
async function testBreakpoint ( session ) {
50
52
console . log ( '[test]' , 'Setting a breakpoint and verifying it is hit' ) ;
51
53
const commands = [
52
54
{ 'method' : 'Debugger.setBreakpointByUrl' ,
53
- 'params' : { 'lineNumber' : 5 ,
55
+ 'params' : { 'lineNumber' : 7 ,
54
56
'url' : session . scriptURL ( ) ,
55
57
'columnNumber' : 0 ,
56
58
'condition' : ''
@@ -66,7 +68,7 @@ async function testBreakpoint(session) {
66
68
`Script source is wrong: ${ scriptSource } ` ) ;
67
69
68
70
await session . waitForConsoleOutput ( 'log' , [ 'A message' , 5 ] ) ;
69
- const paused = await session . waitForBreakOnLine ( 5 , session . scriptURL ( ) ) ;
71
+ const paused = await session . waitForBreakOnLine ( 7 , session . scriptURL ( ) ) ;
70
72
const scopeId = paused . params . callFrames [ 0 ] . scopeChain [ 0 ] . object . objectId ;
71
73
72
74
console . log ( '[test]' , 'Verify we can read current application state' ) ;
@@ -79,7 +81,7 @@ async function testBreakpoint(session) {
79
81
'generatePreview' : true
80
82
}
81
83
} ) ;
82
- assertScopeValues ( response , { t : 1001 , k : 1 } ) ;
84
+ assertScopeValues ( response , { t : 1001 , k : 1 , message : 'A message' } ) ;
83
85
84
86
let { result } = await session . send ( {
85
87
'method' : 'Debugger.evaluateOnCallFrame' , 'params' : {
0 commit comments