This is one of those entries where I've spent several frustrating days fighting with a problem, solved it finally, and want this solution to be googleable for future generations. Let me set the scene: a PHP website,
developed in Visual Studio Code with the "PHP Debug" extension, run under PHP 8.4 under Apache under Debian Linux 13 ("Trixie") with XDebug 3. You set a breakpoint, you start your project in the "Listen for XDebug" mode, you browse to the URL that will hit the breakpoint. The Visual Studio Code window flashes briefly as if the breakpoint was hit, but before you can do anything, Visual Studio loses the connection to the debuggee process, the Call Stack window is empty, and the page comes up empty in the browser.The culprit: some of the expressions in the Watch window would error out if evaluated, and that somehow kills the debug session. Hard to tell whether the client or the server is to blame, but there we are. Clear your Watch list.
No comments:
Post a Comment