How do I troubleshoot unit tests using xdebug? I have xdebug in a Vagrant box, based on VDD, set up and working correctly. Breakpoints trigger phpstorm and mostly works just fine. But when I enable the testing module and try to run a single test on admin/config/development/testing  where a breakpoint in the test source code has been setup, nothing gets triggered. I am assuming that's because PHPUnit is using a separate process. I went though this but it's not helping much.
I was unable to figure out why the debugger would not initially trigger for tests while it's triggered for other normal requests. Then I changed the xdebug.remote_autostart = 0 to xdebug.remote_autostart = 1 and it started working. I even changed it back to xdebug.remote_autostart = 0 and it kept working.   

I also found out that one can also temporarily enable the phpstorm break at first line by xdebug settings:


I presume there is not one answer fit all but hope this helps others.