With, async awaityou can set a breakpoint in the line of code and go to the function call.
node inspect testscript.js
testscript.js
...
await page.focus('#outer-container > nav > span.right > span.search-notification-wrapper > span > form > input[type="text"]');
await page.type("Some text");
debugger;
await page.click('#outer-container > nav > span.right > span.search-notification-wrapper > span > form'); // I am clicking on the form because it did work in the other script
...
This will break on the call page.click, and then we can enter the command stepor sin the debugger.
This, of course, is very convenient for IDEs such as Visual Studio Code.
source
share