Variables and stacktrace are not shown
See original GitHub issueI recently observed, that php-debug for atom stopped showing variables and stacktrace, though working. It successfully connects to xdebug server, and breakpoints are working. But I can’t see any useful output. I tested xdebug with another client - and it worked fine, showing everything I needed. An error appears in the developer console in Atom at the moment, when the actual trace should be displayed. Here it is:
dbgp-instance.coffee:66 Error: Invalid attribute name
Line: 1
Column: 306672
Char: "
at error (/home/eugen/.atom/packages/php-debug/node_modules/sax/lib/sax.js:667:10)
at strictFail (/home/eugen/.atom/packages/php-debug/node_modules/sax/lib/sax.js:693:7)
at Object.write (/home/eugen/.atom/packages/php-debug/node_modules/sax/lib/sax.js:1413:13)
at Parser.exports.Parser.Parser.parseString (/home/eugen/.atom/packages/php-debug/node_modules/xml2js/lib/xml2js.js:508:31)
at Parser.parseString (/home/eugen/.atom/packages/php-debug/node_modules/xml2js/lib/xml2js.js:7:59)
at exports.parseString (/home/eugen/.atom/packages/php-debug/node_modules/xml2js/lib/xml2js.js:540:19)
at DbgpInstance.module.exports.DbgpInstance.parse (/home/eugen/.atom/packages/php-debug/lib/engines/dbgp/dbgp-instance.coffee:64:15)
at DbgpInstance.parse (/home/eugen/.atom/packages/php-debug/lib/engines/dbgp/dbgp-instance.coffee:1:1)
at DbgpInstance.module.exports.DbgpInstance.stuff (/home/eugen/.atom/packages/php-debug/lib/engines/dbgp/dbgp-instance.coffee:89:26)
at Socket.<anonymous> (/home/eugen/.atom/packages/php-debug/lib/engines/dbgp/dbgp-instance.coffee:1:1)
at emitOne (events.js:90:13)
at Socket.emit (events.js:182:7)
at readableAddChunk (_stream_readable.js:153:18)
at Socket.Readable.push (_stream_readable.js:111:10)
at TCP.onread (net.js:531:20)
(anonymous function) @ dbgp-instance.coffee:66
(anonymous function) @ /home/eugen/.atom/packages/php-debug/node_modules/xml2js/lib/xml2js.js:493
emitOne @ events.js:90
emit @ events.js:182
(anonymous function) @ /home/eugen/.atom/packages/php-debug/node_modules/xml2js/lib/xml2js.js:311
emit @ /home/eugen/.atom/packages/php-debug/node_modules/sax/lib/sax.js:640
error @ /home/eugen/.atom/packages/php-debug/node_modules/sax/lib/sax.js:669
strictFail @ /home/eugen/.atom/packages/php-debug/node_modules/sax/lib/sax.js:693
write @ /home/eugen/.atom/packages/php-debug/node_modules/sax/lib/sax.js:1413
exports.Parser.Parser.parseString @ /home/eugen/.atom/packages/php-debug/node_modules/xml2js/lib/xml2js.js:508
(anonymous function) @ /home/eugen/.atom/packages/php-debug/node_modules/xml2js/lib/xml2js.js:7
exports.parseString @ /home/eugen/.atom/packages/php-debug/node_modules/xml2js/lib/xml2js.js:540
module.exports.DbgpInstance.parse @ dbgp-instance.coffee:64
(anonymous function) @ dbgp-instance.coffee:1
module.exports.DbgpInstance.stuff @ dbgp-instance.coffee:89
(anonymous function) @ dbgp-instance.coffee:1
emitOne @ events.js:90
emit @ events.js:182
readableAddChunk @ _stream_readable.js:153
Readable.push @ _stream_readable.js:111
onread @ net.js:531
Also, here is my xdebug config:
zend_extension=xdebug.so
xdebug.remote_enable=1
xdebug.remote_host=127.0.0.1
xdebug.remote_connect_back=1
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_autostart=true
Everything else in xdebug is set by default.
Issue Analytics
- State:
- Created 7 years ago
- Comments:10 (1 by maintainers)
Top Results From Across the Web
Eclipse prints stack trace but doesn't show variables. Bug?
In Eclipse, when having set a breakpoint at that exception, I only get a stack trace in console, but no variables are seen...
Read more >Variables and stack trace panes disappeared
I'm running 10.5.2. When running JUnit tests, with the Debug button pressed I have only Watches and Debugger tabs.
Read more >Stacktrace is not shown when errors in module level variables
Due to design constraints, source files of module level variables could not be retrieved from generated classes (module level variables are ...
Read more >Documentation » Stack Traces - Xdebug
Variables in Stack Traces ... By default Xdebug will now show variable information in the stack traces that it produces. Variable information can...
Read more >Showing Variables Using the Windows Debugging API
If we compile the example program with no optimising and with debug symbols ("/Zi") from the command line then, with the stackTrace function...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
SOLVED
The problem is due to case sensitivity.
Mac OS X 10.11.6 (15G1212) 1.13.0 x64 php-debug 0.2.4
The issue seems to be that php-debug isn’t recognizing paths like Public/index.php but is recognizing paths like public/index.php. These paths are the same on both my local Mac OS X and remote Vagrant Debian Jessie so I don’t know why it’s not recognizing them. I also don’t know why it can map Public to public but not Http to http.
This problem has cost me countless hours of frustration, but I’m not pointing any fingers, I’m just glad it’s over. My personal preference is that case-insensitivity is a very good thing in the daily workflow of humans but that developers almost never check if the filesystem is case-sensitive as they do their string comparisons. Hope this helps you get this fixed.
Currently still experiencing this bug with a fresh install of Atom 1.26.1 and php-debug 0.3.4. php-debug will work for about half a dozen runs, then will stop working for a while. Removing and reinstalling fixes the issue for a time, as does restarting my entire machine (but not closing Atom and restarting my VM)
NB: Working on a windows machine, and path names definitely have uppercase letters in them