View Issue Details

IDProjectCategoryView StatusLast Update
0002382XdebugStep Debuggingpublic2025-11-06 16:10
Reportermaglnet Assigned Toderick  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Version3.5.0alpha2 
Fixed in Version3.4dev 
Summary0002382: LazyProxyObject causes PHPStorm to drop out of debugging
Description

Hi,

when having a lazyProxyObject the resulting xml structure has a double "type" property which then causes the PHPStorm debugger to drop out of the debugging session and makes it impossible to debug anything after that xml is sent to PHPStorm.

Attached you'll find a branch that has a failing test of the described problem.

Best regards
Matthias

TagsNo tags attached.
Operating System
PHP Version8.4.10-8.4.19

Activities

maglnet

2025-11-06 09:45

reporter   ~0007389

I'm sorry, I thought i could edit the created report and add the branch after i got the correct bug ID, but now here the steps to reproduce:

User this branch:
https://github.com/maglnet/xdebug/tree/bug/02382-multiple-type-properties

Run:
php run-xdebug-tests.php tests/debugger/bug02382.phpt

You'll then get the diff that shows the double "type" property, causing the following error in phpStorm:

2025-11-05 12:46:15,141 [ 604468]   WARN - #c.j.p.d.x.d.DbgpUtil - Could not parse packet
org.jdom.JDOMException: Duplicate attributes "type" (index 3), "type" (index 4)
 at [row,col {unknown-source}]: [2,3483]
    at com.intellij.openapi.util.JDOMUtil.load(JDOMUtil.java:298)
    at com.intellij.openapi.util.JDOMUtil.load(JDOMUtil.java:248)
    at com.jetbrains.php.debug.xdebug.dbgp.DbgpUtil.parseDocument(DbgpUtil.java:191)
    at com.jetbrains.php.debug.xdebug.dbgp.DbgpUtil.getDocument(DbgpUtil.java:164)
    at com.jetbrains.php.debug.xdebug.dbgp.DbgpUtil.readDocument(DbgpUtil.java:141)
    at com.jetbrains.php.debug.xdebug.dbgp.DbgpUtil.readMessage(DbgpUtil.java:300)
    at com.jetbrains.php.debug.xdebug.connection.XdebugConnection$MyInputReader.read(XdebugConnection.java:162)
    at com.jetbrains.php.debug.xdebug.connection.XdebugConnection$MyInputReader.read(XdebugConnection.java:152)
    at com.jetbrains.php.debug.connection.PhpDebugConnection.lambda$startReading$2(PhpDebugConnection.java:293)
    at com.intellij.openapi.application.impl.ApplicationImpl$4.run(ApplicationImpl.java:326)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
    at com.intellij.util.concurrency.ContextCallable.lambda$call$1(ContextCallable.java:86)
    at com.intellij.util.concurrency.ContextCallable.call(ContextCallable.java:95)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
    at com.intellij.util.concurrency.ChildContext$runInChildContext$1.invoke(propagation.kt:167)
    at com.intellij.util.concurrency.ChildContext$runInChildContext$1.invoke(propagation.kt:167)
    at com.intellij.util.concurrency.ChildContext.runInChildContext(propagation.kt:173)
    at com.intellij.util.concurrency.ChildContext.runInChildContext(propagation.kt:167)
    at com.intellij.util.concurrency.ContextRunnable.run(ContextRunnable.java:27)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:735)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:732)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:732)
    at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: com.fasterxml.aalto.WFCException: Duplicate attributes "type" (index 3), "type" (index 4)
 at [row,col {unknown-source}]: [2,3483]
    at com.fasterxml.aalto.in.XmlScanner.reportInputProblem(XmlScanner.java:1333)
    at com.fasterxml.aalto.in.ReaderScanner.handleStartElement(ReaderScanner.java:802)
    at com.fasterxml.aalto.in.ReaderScanner.nextFromTree(ReaderScanner.java:297)
    at com.fasterxml.aalto.stax.StreamReaderImpl.next(StreamReaderImpl.java:760)
    at com.intellij.openapi.util.SafeStAXStreamBuilderKt.processElementFragment(SafeStAXStreamBuilder.kt:153)
    at com.intellij.openapi.util.SafeStAXStreamBuilderKt.buildJdom(SafeStAXStreamBuilder.kt:124)
    at com.intellij.openapi.util.JDOMUtil.load(JDOMUtil.java:291)
    ... 25 more

derick

2025-11-06 14:50

administrator   ~0007392

https://github.com/xdebug/xdebug/pull/1047

derick

2025-11-06 15:07

administrator   ~0007393

Fixed in GIT. Thanks for your excellent and short reproducible case as an actual test case!

maglnet

2025-11-06 16:10

reporter   ~0007395

Thank you for your kind feedback and for your excellent and quick fix :)

Issue History

Date Modified Username Field Change
2025-11-06 09:36 maglnet New Issue
2025-11-06 09:45 maglnet Note Added: 0007389
2025-11-06 14:50 derick Note Added: 0007392
2025-11-06 15:07 derick Assigned To => derick
2025-11-06 15:07 derick Status new => closed
2025-11-06 15:07 derick Resolution open => fixed
2025-11-06 15:07 derick Fixed in Version => 3.4dev
2025-11-06 15:07 derick Note Added: 0007393
2025-11-06 16:10 maglnet Note Added: 0007395