View Issue Details

IDProjectCategoryView StatusLast Update
0002302XdebugStep Debuggingpublic2025-02-10 10:31
ReporterKraftsman Assigned Toderick  
PrioritynormalSeverityminorReproducibilityalways
Status feedbackResolutionopen 
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?

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