diff --git a/docs/src/debug.md b/docs/src/debug.md index 46ab4327c4..9310facc34 100644 --- a/docs/src/debug.md +++ b/docs/src/debug.md @@ -111,26 +111,6 @@ configures Playwright for debugging and opens the inspector. Additional useful d - Browsers launch in headed mode - Default timeout is set to 0 (= no timeout) - -```bash tab=bash-bash lang=java -# Source directories in the list are separated by : on macos and linux and by ; on win. -PWDEBUG=1 PLAYWRIGHT_JAVA_SRC= mvn test -``` - -```batch tab=bash-batch lang=java -# Source directories in the list are separated by : on macos and linux and by ; on win. -set PLAYWRIGHT_JAVA_SRC= -set PWDEBUG=1 -mvn test -``` - -```powershell tab=bash-powershell lang=java -# Source directories in the list are separated by : on macos and linux and by ; on win. -$env:PLAYWRIGHT_JAVA_SRC="" -$env:PWDEBUG=1 -mvn test -``` - ```bash tab=bash-bash lang=python PWDEBUG=1 pytest -s ``` @@ -159,6 +139,32 @@ $env:PWDEBUG=1 dotnet test ``` +#### Configure source location +* langs: java + +To tell Playwright where to look for the source code that you are debugging, pass +a list of the source directories via `PLAYWRIGHT_JAVA_SRC` environment variable. Paths in +the list should be separated by : on macOS and Linux, and by ; on Windows. + +```bash tab=bash-bash lang=java +# Source directories in the list are separated by : on macos and linux and by ; on win. +PWDEBUG=1 PLAYWRIGHT_JAVA_SRC= mvn test +``` + +```batch tab=bash-batch lang=java +# Source directories in the list are separated by : on macos and linux and by ; on win. +set PLAYWRIGHT_JAVA_SRC= +set PWDEBUG=1 +mvn test +``` + +```powershell tab=bash-powershell lang=java +# Source directories in the list are separated by : on macos and linux and by ; on win. +$env:PLAYWRIGHT_JAVA_SRC="" +$env:PWDEBUG=1 +mvn test +``` + ### Stepping through your tests You can play, pause or step through each action of your test using the toolbar at the top of the Inspector. You can see the current action highlighted in the test code, and matching elements highlighted in the browser window.