All Projects → dfeyer → flow-debugproxy

dfeyer / flow-debugproxy

Licence: MIT license
A Flow Framework Debug proxy for xDebug, written in Go

Programming Languages

go
31211 projects - #10 most used programming language
Dockerfile
14818 projects

Projects that are alternatives of or similar to flow-debugproxy

graphql
Flow Package to add graphql APIs to Neos and Flow that also supports some advanced features
Stars: ✭ 14 (-41.67%)
Mutual labels:  neoscms, flowframework
Yeebase.Fusion.ContentCacheDebug
Helper package to debug fusions content cache
Stars: ✭ 13 (-45.83%)
Mutual labels:  neoscms, flowframework
neos-debug
Adds a debug panel to your Neos CMS website
Stars: ✭ 31 (+29.17%)
Mutual labels:  neoscms, flowframework
EelShell
A shell for EEL expressions
Stars: ✭ 17 (-29.17%)
Mutual labels:  neoscms, flowframework
neos-blog
A simple blog plugin for Neos CMS
Stars: ✭ 17 (-29.17%)
Mutual labels:  neoscms
Wysiwyg.ABTesting
A/B Testing Package for Neos
Stars: ✭ 16 (-33.33%)
Mutual labels:  neoscms
Newsletter
Neos Newsletter Sending Package
Stars: ✭ 19 (-20.83%)
Mutual labels:  neoscms
form-builder
Flow Form Framework integration into Neos CMS
Stars: ✭ 17 (-29.17%)
Mutual labels:  neoscms
intellij-neos
Support for the Neos CMS in Intellij IDEA / PhpStorm
Stars: ✭ 37 (+54.17%)
Mutual labels:  neoscms
Networkteam.Neos.MailObfuscator
Email address obfuscation for Neos CMS
Stars: ✭ 13 (-45.83%)
Mutual labels:  neoscms
Sitegeist.Kaleidoscope
Responsive Images for Neos CMS
Stars: ✭ 27 (+12.5%)
Mutual labels:  neoscms
Carbon.Gulp
Carbon/Gulp is a delicious blend of tasks and build tools poured into Gulp to form a full-featured modern asset pipeline for Flow Framework and Neos CMS.
Stars: ✭ 15 (-37.5%)
Mutual labels:  neoscms
Sitegeist.Monocle
An fusion based styleguide implementation for Neos
Stars: ✭ 46 (+91.67%)
Mutual labels:  neoscms
Flowpack.SearchPlugin
A simple search plugin for Neos
Stars: ✭ 23 (-4.17%)
Mutual labels:  neoscms
varnish
Varnish integration for Neos CMS
Stars: ✭ 19 (-20.83%)
Mutual labels:  neoscms
Psmb.Newsletter
Render email newsletters with Fusion in Neos CMS
Stars: ✭ 12 (-50%)
Mutual labels:  neoscms
KaufmannDigital.GDPR.CookieConsent
A ready-to-run package, that integrates an advanced cookie consent banner into your Neos CMS site.
Stars: ✭ 21 (-12.5%)
Mutual labels:  neoscms
Flowpack.SimpleSearch.ContentRepositoryAdaptor
Adaptor for the Neos CR, based on the SimpleSearch package
Stars: ✭ 23 (-4.17%)
Mutual labels:  neoscms
Sitegeist.MagicWand
Tools that make the Flow/Neos development easier
Stars: ✭ 47 (+95.83%)
Mutual labels:  neoscms
fusion-form
No description or website provided.
Stars: ✭ 16 (-33.33%)
Mutual labels:  neoscms

Flow Framework Debug Proxy for xDebug

Flow Framework is a web application platform enabling developers creating excellent web solutions and bring back the joy of coding. It gives you fast results. It is a reliable foundation for complex applications.

The biggest pain with Flow Framework come from the the proxy class, the framework do not execute your own code, but a precompiled version. This is required for advanced feature, like AOP and the security framework. So working with Flow is a real pleasure, but adding xDebug in the setup can be a pain.

This project is an xDebug proxy, written in Go, to take care of the mapping between your PHP file and the proxy class.

Build your own

# Get the dependecies
go get
# Build
go build

Run the proxy

# Don't forget to change the configuration of your IDE to use port 9010
flow-debugproxy -vv --framework flow

How to debug the proxy class directly

You can disable to path mapping, in this case the proxy do not process xDebug protocol:

./flow-debugproxy --framework dummy

Show help

./flow-debugproxy help

Use with Docker

Use the official docker image and follow the instruction for the configuration.

PHP configuration
[Xdebug]
zend_extension=/.../xdebug.so
xdebug.remote_enable=1
xdebug.idekey=PHPSTORM
; The IP or name of the proxy container
xdebug.remote_host=debugproxy
; The proxy port (9010 by default, to not have issue is you use PHP FPM, already on port 9000)
xdebug.remote_port=9010
;xdebug.remote_log=/tmp/xdebug.log

You can use the xdebug.remote_log to debug the protocol between your container and the proxy, it's useful to catch network issues.

Docker Compose

This is an incomplete Docker Compose configuration:

services:
  debugproxy:
    image: dfeyer/flow-debugproxy:latest
    volumes:
      - .:/data
    environment:
      # This MUST be the IP address of the IDE (your computer)
      - "IDE_IP=192.168.1.130"
      # This is the default value, need to match the xdebug.remote_port on your php.ini
      - "XDEBUG_PORT=9010"
      # Use this to enable verbose debugging on the proxy
      # - "ADDITIONAL_ARGS=-vv --debug"
    networks:
      - backend

  # This is your application containers, you need to link it to the proxy
  app:
    # The proxy need an access to the project files, to be able to do the path mapping
    volumes:
      - .:/data
    links:
      - debugproxy

Options summary:

  • IDE_IP The primary local W-/LAN IP of your machine where your IDE runs on
  • IDE_PORT The Port your IDE is listening for incoming xdebug connections. (The port the debug proxy will try to connect to)
  • XDEBUG_PORT The port on which xdebug will try to establish a connection (to this container)
  • FRAMEWORK Currently supported values: flow and dummy
  • ADDITIONAL_ARGS For any additional argument like verbosity flags (-vv) or debug mode (--debug) (or both)

Debugging the debugger

Start the debug proxy with verbose flags if it does not connect to your IDE. The debug proxy does not quit after stopping the process that started it. You have to kill it in the container manually.

Hint:

If you use the env variable FLOW_PATH_TEMPORARY_BASE, please be sure to keep Data/Temporary inside the path, without this the mapper will not detect the proxy classes.

FLOW_PATH_TEMPORARY_BASE=/tmp/flow/Data/Temporary

Using with --framework dummy

If your debugging target is the code generated by Flow's AOP Framework then you can start the debugging proxy with --framework dummy.

In that case it won't remap from the generated code to your source but "pass through" the debugger steps. To see what's going on you have to have the generated code in a folder visible to your IDE (in your project). You can either abstain from FLOW_PATH_TEMPORARY_BASE or set it to a path that is in your IDE's project.

Acknowledgments

Development sponsored by ttree ltd - neos solution provider.

This project is highly inspired by the PHP based Debug proxy: https://github.com/sandstorm/debugproxy thanks to the Sandstorm team. The goal of the Go version of the proxy is to solve the performance issue that the PHP version has.

We try our best to craft this package with a lots of love, we are open to sponsoring, support request, ... just contact us.

License

Licensed under MIT, see LICENSE

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].