I must say I've not spent enough time de-mystifying how XDebug actually works, so I think my issue must be with a configuration of some sort, but...
I am using Codeigniter and the built in redirect() function to go from one part of my application to other on occasion like logging in and out. I currently have Phpstorm setup with debug where if I click the phone icon to turn debuggin on it will find breakpoints throughout my application. As a side note, if I try to access any page on the server it will bring up Phpstorm and ask me if I want to connect and debug, which is kind of annoying.
However if my script hits a breakpoint before a redirect, then goes through a redirect, and I have a breakpoint in the code where we are redirected to its like the server drops the connection. I get the same result as if I click the stop debug button in the middle of debugging. It doesn't matter if I have a breakpoint in the code we are being redirected to, anytime a redirect is hit in debug mode I get a similar result as to the debugger just stopping. If I turn the debugger off my code runs fine.
Are there some headers I need to make sure are being passed along in my redirects or something? Any help would be greatly appreciated. Thanks for taking the time to look.