View Issue Details

IDProjectCategoryView StatusLast Update
0002302XdebugStep Debuggingpublic2025-05-15 19:57
ReporterKraftsman Assigned Toderick  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionunable to reproduce 
PlatformLinuxOSPop OS OS Version22.04
Product Version3.3.2 
Summary0002302: "Unknown sourceReference 0" when setting conditional breakpoints
Description

I'm setting up Xdebug with appwrite running in docker locally. I have followed all the docs and set up the configurations appropriately and can confirm Xdebug works.
However, when I try to set conditional breakpoints of any kind, VScode returns an "Unknown sourceReference 0".

I am unsure if this is a bug or if it's just my dummy self-doing something wrong.

Any help/assistance will be appreciated.

NB: I am new to Xdebug/Debuggers in general.

Steps To Reproduce
  • Start the debugger extension to listen for Xdebug.
  • Start the appwrite containers to establish a connection to the client host and port
  • Proceed to set a conditional breakpoint.
  • VScode returns Unknown sourceReference 0
Tagsbreakpoint, debug, vscode
Operating SystemPop OS 22.04
PHP Version8.3.0-8.3.4

Activities

derick

2024-11-27 15:52

administrator   ~0007087

Hi,

I don't know what "appwrite" is.

Could you perhaps create a dump of the protocol communications? For Xdebug you can create that by setting xdebug.log=/tmp/xdebug.log (make sure you can read it outside the Docker container) and xdebug.log_level=11. For VS Code, you can do that by setting "log": true in your launch.json and observe Debug Console panel.

cheers,
Derick

alystarr

2025-02-05 13:25

reporter   ~0007171

Last edited: 2025-02-10 10:30

Hi derik, I'm not the OP but I'm having the same issue as of this morning (previously working in vs code with no issues) (also running in docker locally)

My output is:

Listening on { address: '::', family: 'IPv6', port: 9003 }
<- launchResponse
Response { seq: 0, type: 'response', request_seq: 2, command: 'launch', success: true }
<- initializedEvent
InitializedEvent { seq: 0, type: 'event', event: 'initialized' }
-> setBreakpointsRequest
{ command: 'setBreakpoints',
  arguments:
   { source:
      { name: 'Actions.php',
        path: '/Users/***/Actions.php' }, (this has been edited as contains my company name)
     lines: [ 52, 55 ],
     breakpoints: [ { line: 52 }, { line: 55 } ],
     sourceModified: false },
  type: 'request',
  seq: 3 }
<- setBreakpointsResponse
Response {
  seq: 0,
  type: 'response',
  request_seq: 3,
  command: 'setBreakpoints',
  success: true,
  body:
   { breakpoints:
      [ { verified: true,
          line: 52,
          source:
           { name: 'Actions.php',
             path: '/Users/***/Actions.php' },
          id: 1 },
        { verified: true,
          line: 55,
          source:
           { name: 'Actions.php',
             path: '/Users/***/Actions.php' },
          id: 2 } ] } }
-> setBreakpointsRequest
{ command: 'setBreakpoints',
  arguments:
   { source:
      { name: 'APIv1.php', path: '/Users/***/APIv1.php' },
     lines: [ 91, 112 ],
     breakpoints: [ { line: 91 }, { line: 112 } ],
     sourceModified: false },
  type: 'request',
  seq: 4 }
<- setBreakpointsResponse
Response {
  seq: 0,
  type: 'response',
  request_seq: 4,
  command: 'setBreakpoints',
  success: true,
  body:
   { breakpoints:
      [ { verified: true,
          line: 91,
          source:
           { name: 'APIv1.php', path: '/Users/***/APIv1.php' },
          id: 3 },
        { verified: true,
          line: 112,
          source:
           { name: 'APIv1.php', path: '/Users/***/APIv1.php' },
          id: 4 } ] } }
-> setBreakpointsRequest
{ command: 'setBreakpoints',
  arguments:
   { source:
      { name: 'Controller.php',
        path: '/Users/***/Controller.php' },
     lines: [ 95 ],
     breakpoints: [ { line: 95 } ],
     sourceModified: false },
  type: 'request',
  seq: 5 }
<- setBreakpointsResponse
Response {
  seq: 0,
  type: 'response',
  request_seq: 5,
  command: 'setBreakpoints',
  success: true,
  body:
   { breakpoints:
      [ { verified: true,
          line: 95,
          source:
           { name: 'Controller.php',
             path: '/Users/***/Controller.php' },
          id: 5 } ] } }
-> setBreakpointsRequest
{ command: 'setBreakpoints',
  arguments:
   { source:
      { name: 'CsvExport.php',
        path: '/Users/***/CsvExport.php' },
     lines: [ 242 ],
     breakpoints: [ { line: 242 } ],
     sourceModified: false },
  type: 'request',
  seq: 6 }
<- setBreakpointsResponse
Response {
  seq: 0,
  type: 'response',
  request_seq: 6,
  command: 'setBreakpoints',
  success: true,
  body:
   { breakpoints:
      [ { verified: true,
          line: 242,
          source:
           { name: 'CsvExport.php',
             path: '/Users/***/CsvExport.php' },
          id: 6 } ] } }
-> setBreakpointsRequest
{ command: 'setBreakpoints',
  arguments:
   { source:
      { name: 'CSVExportTest.php',
        path:
         '/Users/***/CSVExportTest.php' },
     lines: [],
     breakpoints: [],
     sourceModified: false },
  type: 'request',
  seq: 7 }
<- setBreakpointsResponse
Response {
  seq: 0,
  type: 'response',
  request_seq: 7,
  command: 'setBreakpoints',
  success: true,
  body: { breakpoints: [] } }
-> setBreakpointsRequest
{ command: 'setBreakpoints',
  arguments:
   { source:
      { name: 'Report.php',
        path: '/Users/***/Report.php' },
     lines: [],
     breakpoints: [],
     sourceModified: false },
  type: 'request',
  seq: 8 }
<- setBreakpointsResponse
Response {
  seq: 0,
  type: 'response',
  request_seq: 8,
  command: 'setBreakpoints',
  success: true,
  body: { breakpoints: [] } }
-> setFunctionBreakpointsRequest
{ command: 'setFunctionBreakpoints',
  arguments: { breakpoints: [] },
  type: 'request',
  seq: 9 }
<- setFunctionBreakpointsResponse
Response {
  seq: 0,
  type: 'response',
  request_seq: 9,
  command: 'setFunctionBreakpoints',
  success: true,
  body: { breakpoints: [] } }
-> setExceptionBreakpointsRequest
{ command: 'setExceptionBreakpoints',
  arguments: { filters: [] },
  type: 'request',
  seq: 10 }
<- setExceptionBreakpointsResponse
Response {
  seq: 0,
  type: 'response',
  request_seq: 10,
  command: 'setExceptionBreakpoints',
  success: true,
  body: { breakpoints: [] } }
-> configurationDoneRequest
{ command: 'configurationDone', type: 'request', seq: 11 }
<- configurationDoneResponse
Response {
  seq: 0,
  type: 'response',
  request_seq: 11,
  command: 'configurationDone',
  success: true }
-> threadsRequest
{ command: 'threads', type: 'request', seq: 12 }
<- threadsResponse
Response {
  seq: 0,
  type: 'response',
  request_seq: 12,
  command: 'threads',
  success: true,
  body: { threads: [] } }

derick

2025-02-10 10:31

administrator   ~0007172

@alystarr Your output does not contain Unknown sourceReference 0, so I am not sure how this is related?

derick

2025-04-08 12:53

administrator   ~0007239

@Alystarr ?

derick

2025-04-24 16:31

administrator   ~0007255

I can't reproduce this, and the requested feedback was never provided.

If you run into this again, feel free to open a new report.

Unradelic

2025-05-15 19:54

reporter   ~0007285

I am also puzzled by a super similar issue where "" is shown as a response from communication between PHP Debug VSCode extension (from xdebug)... I tried virtually everything for more than 9 hours straight. What is going on?

Listening on { address: '::', family: 'IPv6', port: 9003 }
<- launchResponse
Response { seq: 0, type: 'response', request_seq: 2, command: 'launch', success: true }

<- initializedEvent
InitializedEvent { seq: 0, type: 'event', event: 'initialized' }

-> setBreakpointsRequest
{ command: 'setBreakpoints',
  arguments:
   { source: { name: 'autoload.php', path: '/home/sergio/code/nai/remote/autoload.php' },
     lines: [ 3 ],
     breakpoints: [ { line: 3 } ],
     sourceModified: false },
  type: 'request',
  seq: 3 }

<- setBreakpointsResponse
Response {
  seq: 0,
  type: 'response',
  request_seq: 3,
  command: 'setBreakpoints',
  success: true,
  body:
   { breakpoints:
      [ { verified: true,
          line: 3,
          source: { name: 'autoload.php', path: '/home/sergio/code/nai/remote/autoload.php' },
          id: 1 } ] } }

-> setFunctionBreakpointsRequest
{ command: 'setFunctionBreakpoints',
  arguments: { breakpoints: [] },
  type: 'request',
  seq: 4 }

<- setFunctionBreakpointsResponse
Response {
  seq: 0,
  type: 'response',
  request_seq: 4,
  command: 'setFunctionBreakpoints',
  success: true,
  body: { breakpoints: [] } }

-> setExceptionBreakpointsRequest
{ command: 'setExceptionBreakpoints',
  arguments: { filters: [ 'Notice', 'Warning', 'Error', 'Exception', '*' ] },
  type: 'request',
  seq: 5 }

<- setExceptionBreakpointsResponse
Response {
  seq: 0,
  type: 'response',
  request_seq: 5,
  command: 'setExceptionBreakpoints',
  success: true,
  body:
   { breakpoints:
      [ { verified: true, id: 2 },
        { verified: true, id: 3 },
        { verified: true, id: 4 },
        { verified: true, id: 5 },
        { verified: true, id: 6 } ] } }

-> sourceRequest
{ command: 'source',
  arguments: { sourceReference: 0, source: { path: 'replinput' } },
  type: 'request',
  seq: 6 }

<- sourceResponse
Response {
  seq: 0,
  type: 'response',
  request_seq: 6,
  command: 'source',
  success: false,
  message: 'Unknown sourceReference 0',
  body: { error: { id: 0, format: 'Unknown sourceReference 0', showUser: true } } }

-> configurationDoneRequest
{ command: 'configurationDone', type: 'request', seq: 7 }

<- configurationDoneResponse
Response {
  seq: 0,
  type: 'response',
  request_seq: 7,
  command: 'configurationDone',
  success: true }

-> threadsRequest
{ command: 'threads', type: 'request', seq: 8 }

<- threadsResponse
Response {
  seq: 0,
  type: 'response',
  request_seq: 8,
  command: 'threads',
  success: true,
  body: { threads: [] } }

Unradelic

2025-05-15 19:57

reporter   ~0007286

Apologies, in my note I left "" blank. I had the intention to copy and paste "Unknown sourceReference 0".

If anyone has any directions into making this behave xD I'll be in debt

Issue History

Date Modified Username Field Change
2024-10-29 14:08 Kraftsman New Issue
2024-10-29 14:08 Kraftsman Tag Attached: breakpoint
2024-10-29 14:08 Kraftsman Tag Attached: debug
2024-10-29 14:08 Kraftsman Tag Attached: vscode
2024-11-27 15:52 derick Assigned To => derick
2024-11-27 15:52 derick Status new => feedback
2024-11-27 15:52 derick Note Added: 0007087
2025-02-05 13:25 alystarr Note Added: 0007171
2025-02-10 10:30 derick Note Edited: 0007171
2025-02-10 10:31 derick Note Added: 0007172
2025-04-08 12:53 derick Note Added: 0007239
2025-04-24 16:31 derick Status feedback => resolved
2025-04-24 16:31 derick Resolution open => unable to reproduce
2025-04-24 16:31 derick Note Added: 0007255
2025-05-15 19:54 Unradelic Note Added: 0007285
2025-05-15 19:57 Unradelic Note Added: 0007286