MantisBT

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001603XdebugFeature/Change requestpublic2019-01-09 08:302019-01-16 14:52
Reporterkshlomi 
Assigned Toderick 
PrioritynormalSeveritytweakReproducibilityalways
StatusresolvedResolutionno change required 
PlatformOSOS Version
Product Version2.6.1 
Target VersionFixed in Version 
Summary0001603: Debugging user defined constants should be configurable
DescriptionCertain web applications can have many user-defined constants (1000s or more, potentially). This can make debugging, stepping via IDE especially, very slow. In our application I can see around 2MB of network data passed to the debugger on each step.

Following https://bugs.xdebug.org/view.php?id=406 [^] - I think that inclusion of defines data should be configurable by a flag in the ini file.

For now I have a locally patched version the disables the feature entirely (by reverting the commit https://github.com/xdebug/xdebug/commit/6ff33fcd4d452a06d4a80b995a5630abd9c11158 [^]) but thats obviously a temporary solution.

Please let me know if I can contribute here.
Steps To Reproduce1. Debug with an IDE (e.g. PhpStorm) and have xdebug connect to it over a TCP port (e.g. 9000)
2. Debug a script with 1000s of defined constants
3. Each step will be visibly slow
TagsNo tags attached.
Operating System
PHP Version7.2.0-7.2.4
Attached Files

- Relationships

-  Notes
(0004797)
derick (administrator)
2019-01-09 12:41

This is only a feature in the protocol, and an IDE is free to request the User Defined Constants, or not. It's entirely up to the IDE to request this information, so why can't this be an option on the IDE side?

I am not keen adding more INI settings to Xdebug, as there are already way too many.
(0004798)
kshlomi (reporter)
2019-01-09 13:14

Hi Derick,
Thanks for responding so fast.
Are you referring to the context_get command ? If so - which call would fetch only the user-defined constants or, alternatively, omit them ?

If this is indeed a protocol feature I could try and get in touch with the PHPStorm developers.
(0004799)
derick (administrator)
2019-01-09 16:52

Yes indeed. The "-c 2" in context_get is a selector for which context to return. The context_names command can be used to find out which contexts there are, and "2" is the index for User Defined Constants:

https://github.com/xdebug/xdebug/commit/6ff33fcd4d452a06d4a80b995a5630abd9c11158#diff-07a70c2afd727f925169e8b30f1c72dcR1787 [^]

An IDE can choose not to fetch the User Defined Constants, by just not running "context_get -c 2".
(0004803)
kshlomi (reporter)
2019-01-15 10:20

Opened a ticket for PHPStorm : https://youtrack.jetbrains.com/issue/WI-44962 [^]
Would appreciate your upvote, thanks!
(0004807)
derick (administrator)
2019-01-16 14:52

I've added a comment to the PhpStorm ticket. As there is nothing more to do here, I will close the ticket. I'll keep an eye on what the PhpStorm team says.

- Issue History
Date Modified Username Field Change
2019-01-09 08:30 kshlomi New Issue
2019-01-09 12:41 derick Note Added: 0004797
2019-01-09 12:41 derick Assigned To => derick
2019-01-09 12:41 derick Status new => feedback
2019-01-09 13:14 kshlomi Note Added: 0004798
2019-01-09 13:14 kshlomi Status feedback => assigned
2019-01-09 16:52 derick Note Added: 0004799
2019-01-15 10:20 kshlomi Note Added: 0004803
2019-01-16 14:52 derick Note Added: 0004807
2019-01-16 14:52 derick Status assigned => resolved
2019-01-16 14:52 derick Resolution open => no change required


Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker