2

I am running Homestead on Windows 10 machine with Virtual Box. I have VSCode running on the Windows machine and I want to be able to debug code in the VM.

I have followed this setup:

https://tighten.co/blog/debugging-configure-xdebug-and-laravel-homestead-and-vs-code-and-phpunit

Once I am listening for Xdebug I run my code in the VM using phpunit test/Feature/AdminTest.php and this fails with

Unable to open 'BaseTestRunner.php': File not found (file:///c:/g/Sites/Laravel/everyone-in-mind/vendor/phpunit/phpunit/src/Runner/BaseTestRunner.php).

Which is obviously showing me the Windows path.

If I stop the debugger and run again the test runs fine.

Do I need to install something extra to get BaseTestRunner?

1 Answer 1

0

When you are debuging a PHPUnittest with xDebug in VSCode with the PHPUnit plugin from Elon Mallin, check that you have disable the option Breakpoints/Everything.

It seems as if PHPUnittest, running from the PHPUnit-plugin, could not find the BaseTestRunner.php file and raised an exection. When you ignore this exception, you can run and debug your test.

see the same question PHpUnit with xdebug Breaks at BaseTestRunner instead of the actual test

It works for me and can now debug the Unittest.

Sign up to request clarification or add additional context in comments.

1 Comment

Welcome to stackoverflow. Could you please elaborate your answer including relevant information from the link?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.