vscode-php-debug: Error message "Source XY is not available"
Hi Felix,
I installed the extension as you suggested. When calling the page, the VS debugger is called, so the connection is established. Nevertheless I face the problem, that instead of displaying the php page, an error is displayed: “Source c:/xampp/htdocs/launchpad/index.php is not available.”. I fiddled around with the settings for serverSourceRoot and localSourceRoot but the message never changes. I therefore don’t understand where this directory comes from.
Log output (I assume that you are looking for these two request / responses, right?):
-> setBreakpointsRequest
{ type: 'request',
seq: 12,
command: 'setBreakpoints',
arguments:
{ source: { path: '/Users/XXXXX/coreplatformlaunchpad/index.php' },
lines: [ 3 ],
breakpoints: [ { line: 3 } ] } }
<- setBreakpointsResponse
Response {
seq: 0,
type: 'response',
request_seq: 12,
command: 'setBreakpoints',
success: true,
body: { breakpoints: [ { verified: true, line: 3 } ] } }
-> stackTraceRequest
{ type: 'request',
seq: 16,
command: 'stackTrace',
arguments: { threadId: 2, levels: 20 } }
<- stackTraceResponse
Response {
seq: 0,
type: 'response',
request_seq: 16,
command: 'stackTrace',
success: true,
body:
{ stackFrames:
[ StackFrame {
id: 2,
source:
Source {
name: 'index.php',
path: '/C:/xampp/htdocs/launchpad/index.php',
sourceReference: 0 },
line: 3,
column: 1,
name: '{main}' } ] } }
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 15 (9 by maintainers)
I will try this out when I have more time. I don’t have a setup for remote host debugging (and it’s not possible to unit-test). You may want to try to debug it yourself (clone repo and step through the source to find where the path is mapped wrong).