mcstreetguy / fusion-debugger Goto Github PK
View Code? Open in Web Editor NEWA debugger plugin for Neos.Fusion.
Home Page: https://packagist.org/packages/mcstreetguy/fusion-debugger
License: MIT License
A debugger plugin for Neos.Fusion.
Home Page: https://packagist.org/packages/mcstreetguy/fusion-debugger
License: MIT License
Describe the bug
Currently, if the debugger encounters a nested prototype definition it cannot handle it properly. Instead, the meta key containing these definitions remains in the otherwise flattened debug-view. This is no real issue as the overview is still correct, but as the information is unstyled it looks really messy...
We have not found a clear remedy to this problem currently. See our thoughts on this below:
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Nested definitions should not be ignored totally.
Environment (please complete the following information):
Describe the bug
In some cases the library interprets the number 0
as the null
constant, resulting in the overview showing <empty>
for the property, even if it should actually be a numeric value.
To Reproduce
Steps to reproduce the behavior:
0
0
-property in the tree view, it will say <empty>
Expected behavior
This exceptional case should be considered in the processing of the prototype definitions so that 0
is recognized as this value and not as a missing value.
Screenshots
The elementIndex
property is initialized with the value 0
, but see the output below:
(sensitive information has been censored in the image.)
Environment (please complete the following information):
Currently, when unsetting a path in Fusion through my.path >
the engine sets a meta-key for that path, named __stopInheritanceChain
, to identify such "emptied" values. That key is currently not flattened by the plugin. Would be better if it could be parsed too.
Verified with neos/fusion v5.3.0
Describe the bug
Currently, if a syntax error is present in one of the Fusion files and you make the plugin lint them, it reports multiple errors in several files if the corresponding errorneous file is included somewhere (e.g. in Root.fusion
)
To Reproduce
Steps to reproduce the behavior:
fusion:lint
commandExpected behavior
The linter should only report the error in the actual source file, not in a file that actually includes the problematic code and does not actually contain it. This can be very confusing if you want to fix a syntax error that's simply not present.
Screenshots
(as you can see, it's the same error and message in both files.)
Environment (please complete the following information):
Is your feature request related to a problem? Please describe.
Currently you need to define the namespace mappings for the plugin manually in the Settings.yaml
. This is kind of obsolete as the plugin could also read all namespace declarations from the fusion code it need's to parse either way.
Describe the solution you'd like
The plugin could collect namespace definitions during runtime directly from the loaded fusion code instead of loading these mapping from the config.
Is your feature request related to a problem? Please describe.
Currently, the colored output of the fusion:debugprototype
command appears badly readable in several terminals, depending on their individual color scheme.
Describe the solution you'd like
It would be great, if some could configure the used colors to fit their personal environment.
Such that in e.g. the Settings.yaml
one could change some color codes to be more readable.
Describe alternatives you've considered
Alternatively we could provide a "color scheme" setting with several predefined schemes the user can choose from. This could be even an addition to the override-approach, where the user can first select a theme but still override single colors if needed.
Additional context
See this screenshot as an example:
The example in my case may be particularly extreme and possibly not representative, but I find that a single counter-example is sufficient to justify this function meaningfully. Debugging should work well in any environment, regardless of the shell, terminal program, or color scheme. Of course you can also switch off coloring completely with the `--no-color' option, but I think this is no real alternative because the results are so much harder to read.
Is your feature request related to a problem? Please describe.
This improvement only targets convenience.
Describe the solution you'd like
It would be a huge improvement to the debugger if one could see the prototype information directly from within the backend, just like the "Configuration" backend module but for Fusion definitions respectively.
Maybe with this api one would need less to rewrite. I just saw that youre not using it...
https://github.com/neos/neos-development-collection/blob/master/Neos.Neos/Classes/Domain/Service/FusionService.php#L136
But then one couldn't use this package outside of neos...
Is your feature request related to a problem? Please describe.
Currently, the output of the debugger lists all nested prototypes used, but their contents are not visible. This means I have to execute the command several times and put the results together myself to be able to reconstruct my prototype in detail. It would be much more practical for this case if the debugger could already merge this information itself.
Describe the solution you'd like
There should be an option added to fusion:debugprototype
, that forces the Debugger to recursively resolve all used prototypes, instead of only merging the root inheritance chain. I propose to name it --resolve-all
in coherence with it's functionality.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.