This suggestion is not inside VSCode, but an alternative is using UI mode: npx playwright test --ui
npx playwright test --ui
In the Locator tab, locator expressions will be evaluated and highlighted on the page as you type: