View Issue Details

IDProjectCategoryView StatusLast Update
0002084XdebugStep Debuggingpublic2022-04-28 19:45
Reporterverticon Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionno change required 
Product Version3.0.4 
Summary0002084: Breakpoints not triggering (under certain conditions)
Description

In order to explore why my breakpoints are not being triggered I configured xdebug to produce a log with a level of 10. Studying the logs revealed that breakpoint matching does not occur when the file in which the breakpoint is set contains a path component with a space in its name.

I am attaching two log files: xdebugBreakpoiintSuccess.log and xdebugBreakpointFailure.log. Into each of these files I have added a comment that begins with Dear XDebug team. When You look you will see what I am talking about.

The space in the directory name is a consequence of me having my files on my iCloud Drive. Right now my only option is to move them to a different place. :-(

Steps To Reproduce

Create a host whose document root has a space in the name of one of its directories.

Additional Information

xdebug 3.0.4

PHP 8.0.8 (cli) (built: Oct 1 2021 11:21:06) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.8, Copyright (c) Zend Technologies

TagsNo tags attached.
Operating SystemMac OS Monterey 12.2.1
PHP Version8.0.10-8.0.19

Activities

derick

2022-04-26 16:27

administrator   ~0006278

Hi,

I think it is your IDE that is doing this wrong. It is setting a breakpoint with the extra % in line 10:

breakpoint_set -t line -f file:///Users/robertvaessen/Library/Mobile%%20Documents/com~apple~CloudDocs/Wordpress/Learn/php/functions.php -n 4 -i 1

But then later, it uses the correct file name when running the "source" command in line 19:

source -f file:///Users/robertvaessen/Library/Mobile%20Documents/com%7Eapple%7ECloudDocs/Wordpress/Learn/php/index.php -i 4

Where you have added "Dear XDebug", you see Xdebug comparing againt the breakpoint that was actually set (with the extra %, and the %20 correctly converted into a space):

Checking whether to break on /Users/robertvaessen/Library/Mobile% Documents/com~apple~CloudDocs/Wordpress/Learn/php/functions.php:4.

You didn't say which IDE you're using, so can't point you to the right issue tracker for them.

cheers,
Derick

verticon

2022-04-28 16:09

reporter   ~0006283

Thank you, Derick, for the quick response. I've switched to another UI (the php-debug package for Atom) but am still going through the initial "get it working' phase. I'll report back. The difficulty with the space character occurred with MacGDBp - I'll be submitting a report to those folks.

verticon

2022-04-28 18:38

reporter   ~0006284

Okay.

I got Atom's php-debug package working and thus established that xdebug does not have a problem handling paths with a space in the name of one of the path's components.

I've also submitted a problem report to macGDBp.

Thank you xdebug team for the excellent support.

derick

2022-04-28 19:37

administrator   ~0006285

Okay. Glad that we found the actual problem (and that it wasn't in Xdebug :-)).

I'll close this out then. And the team is really just me. ;-)

If you can pop in the link in a comment to the macdbgp issue, that'd be good as a reference.

verticon

2022-04-28 19:45

reporter   ~0006286

A team unto himself! :-)

Here is the macGDBp bug report link: https://www.bluestatic.org/bugs/showreport.php?bugid=267