| Summary: | Debugger does not stop at breakpoints added after starting "Debug as PHP Script" | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Jacek Pospychala <jacek.pospychala> | ||||||
| Component: | PDT | Assignee: | PHP Core <php.core-inbox> | ||||||
| Status: | CLOSED FIXED | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | gadi | ||||||
| Version: | unspecified | ||||||||
| Target Milestone: | --- | ||||||||
| Hardware: | PC | ||||||||
| OS: | Linux | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
Jacek Pospychala
[... session is starting. adding initial breakpoints:] Sending syncrhonic request: AddBreakpointRequest [breakPoint=id: 1 type: 1 file name: /var/www/xx/newfile.php line: 5] Received response: AddBreakpointResponse [breakPointID=1] [...session is started. adding dynamic breakpoints:] PHPDebugTarget: Setting Breakpoint - File /xx/newfile.php Line Number 6 Sending asynchronic request: AddBreakpointRequest [breakPoint=id: -1 type: 0 file name: /xx/newfile.php line: 6] New message received: AddBreakpointResponse [breakPointID=2] PHPDebugTarget: Setting Breakpoint - File /xx/newfile.php Line Number 7 Sending asynchronic request: AddBreakpointRequest [breakPoint=id: -1 type: 0 file name: /xx/newfile.php line: 7] New message received: AddBreakpointResponse [breakPointID=3] PHPDebugTarget: Setting Breakpoint - File /xx/newfile.php Line Number 8 Sending asynchronic request: AddBreakpointRequest [breakPoint=id: -1 type: 0 file name: /xx/newfile.php line: 8] New message received: AddBreakpointResponse [breakPointID=4] so the cause is that during the debug breakpoints are added to local path (/xx/newfile.php) instead to absolute path (/var/www/xx/newfile.php) Apparently, when running as web page breakpoints are added using absolute path (correctly), so the local path is used only when running "as script". Created attachment 176368 [details]
patch
solution is to add PathMapper for "Debug as Script"-based launches.
And on first launch properly configure mapper to resolve absolute paths of workspace files
patch applied. Created attachment 176452 [details]
patch v2
there seems an easier solution :-)
So it turned out that problem was caused by my earlier fix to bug 306834. In that case we were hitting the IAE when trying to get workspace files for some remote paths, without checking first if they are valid workspace paths. A valid workspace file path has at least 2 segments (project/file). If file was found in workspace, then it's absolute path was used. Unfortunately my check was requiring at least 3 segments so workspace with 2segment paths were not translated to absolute paths. Verified fixed. Kalin Yanev kalin.a@zend.com |