Git Product home page Git Product logo

flow-debugproxy's Introduction

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

flow-debugproxy's People

Contributors

andrehoffmann30 avatar dfeyer avatar dlubitz avatar fteuber avatar hlubek avatar vertexvaar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

flow-debugproxy's Issues

Wrong paths when working with flow subcontexts

When working with subcontexts, the Umpa Lumpa turns out the wrong mapping.
Example with a Development/Docker subcontext:
classes with break points are mapped to
/application/Data/Temporary/Development/Cache/Code/Flow_Object_Classes/
while the actual classes are actually generated in
Data/Temporary/Development/SubContextDocker/Cache/Code/Flow_Object_Classes/

Breakpoint in vendor package crash the proxy

The proxy crash is a breakpoint is set in a Vendor package (Library folder). As Flow exclude those package by default in recent version, we can improve the situation by skipping the proxy mapping.

Filtering Variables in PhpStorm crashes the debugging session

Foreword: I am debugging flow:core:compile directly in a docker-compose setup via

docker exec -e PHP_IDE_CONFIG='serverName=app' -u application -ti $(docker-compose ps -q app) php -dxdebug.remote_autostart=On ./flow flow:core:compile

When debugging in PhpStorm i can filter values and variables by simply typing in the Variables view of the Debug tab in PhpStorm. In case a value does not exist the "Search for: xxx" text turns red. Normally nothing else would happen but when using the debug proxy (via the offiical image) the xdebug session will break and the console will print There was a problem sending 25250 bytes on socket 4: Connection reset by peer foloowed by a lot of There was a problem sending 519 bytes on socket 4: Broken pipe messages with different byte sizes each.

Full output when typing "a" follow by "a" (formatted with line breaks for better readability):

There was a problem sending 25250 bytes on socket 4: Connection reset by peer
There was a problem sending 519 bytes on socket 4: Broken pipe
There was a problem sending 2902 bytes on socket 4: Broken pipe
There was a problem sending 5094 bytes on socket 4: Broken pipe
There was a problem sending 4021 bytes on socket 4: Broken pipe
There was a problem sending 2594 bytes on socket 4: Broken pipe
There was a problem sending 1035 bytes on socket 4: Broken pipe
There was a problem sending 4841 bytes on socket 4: Broken pipe
There was a problem sending 2470 bytes on socket 4: Broken pipe
There was a problem sending 560 bytes on socket 4: Broken pipe
There was a problem sending 31361 bytes on socket 4: Broken pipe
There was a problem sending 8893 bytes on socket 4: Broken pipe
There was a problem sending 950 bytes on socket 4: Broken pipe
There was a problem sending 1748 bytes on socket 4: Broken pipe
There was a problem sending 23135 bytes on socket 4: Broken pipe
There was a problem sending 575 bytes on socket 4: Broken pipe
There was a problem sending 599 bytes on socket 4: Broken pipe
There was a problem sending 1009 bytes on socket 4: Broken pipe
There was a problem sending 983 bytes on socket 4: Broken pipe
There was a problem sending 631 bytes on socket 4: Broken pipe
There was a problem sending 631 bytes on socket 4: Broken pipe
There was a problem sending 11565 bytes on socket 4: Broken pipe
There was a problem sending 1748 bytes on socket 4: Broken pipe
There was a problem sending 4023 bytes on socket 4: Broken pipe
There was a problem sending 362 bytes on socket 4: Broken pipe

strconv.Atoi: parsing [...] invalid syntax

In my code i have an assoc array with 78 entries (for writing data to a CSV file) and every time i try to step over initializing the array the flow-debugproxy quits with the following (vendor and package name edited) error Message

strconv.Atoi: parsing "del\\Transaction\" children=\"1\" numchildren=\"13\"></property><property name=\"78\" fullname=\"$transactions[78]\" type=\"object\" classname=\"Company\\HugeNeosFlowAppl\\Domain\\Model\\Transaction\" children=\"1\" numchildren=\"13\"></property><property name=\"79\" fullname=\"$transactions[79]\" type=\"object\" classname=\"Company\\HugeNeosFlowAppl\\Domain\\Model\\Transaction\" children=\"1\" numchildren=\"13\"></property><property name=\"80\" fullname=\"$transactions[80]\" type=\"object\" classname=\"Company\\HugeNeosFlowAppl\\Domain\\Model\\Transaction\" children=\"1\" numchildren=\"13\"></property><property name=\"81\" fullname=\"$transactions[81]\" type=\"object\" classname=\"Company\\HugeNeosFlowAppl\\Domain\\Model\\Transaction\" children=\"1\" numchildren=\"13\"></property><property name=\"82\" fullname=\"$transactions[82]\" type=\"object\" classname=\"Company\\HugeNeosFlowAppl\\Domain\\Model\\Transaction\" children=\"1\" numchildren=\"13\"></property><property name=\"83\" fullname=\"$transactions[83]\" type=\"object\" classname=\"Company\\HugeNeosFlowAppl\\Domain\\Model\\Transaction\" children=\"1\" numchildren=\"13\"></property><property name=\"84\" fullname=\"$transactions[84]\" type=\"object\" classname=\"Company\\HugeNeosFlowAppl\\Domain\\Model\\Transaction\" children=\"1\" numchildren=\"13\"></property><property name=\"85\" fullname=\"$transactions[85]\" type=\"object\" classname=\"Company\\HugeNeosFlowAppl\\Domain\\Model\\Transaction\" children=\"1\" numchildren=\"13\"></property><property name=\"86\" fullname=\"$transactions[86]\" type=\"object\" classname=\"Company\\HugeNeosFlowAppl\\Domain\\Model\\Transaction\" children=\"1\" numchildren=\"13\"></property><property name=\"87\" fullname=\"$transactions[87]\" type=\"object\" classname=\"Company\\HugeNeosFlowAppl\\Domain\\Model\\Transaction\" children=\"1\" numchildren=\"13\"></property><property name=\"88\" fullname=\"$transactions[88]\" type=\"object\" classname=\"Company\\HugeNeosFlowAppl\\Domain\\Model\\Transaction\" children=\"1\" numchildren=\"13\"></property><property name=\"89\" fullname=\"$transactions[89]\" type=\"object\" classname=\"Company\\HugeNeosFlowAppl\\Domain\\Model\\Transaction\" children=\"1\" numchildren=\"13\"></property><property name=\"90\" fullname=\"$transactions[90]\" type=\"object\" classname=\"Company\\HugeNeosFlowAppl\\Domain\\Model\\Transaction\" children=\"1\" numchildren=\"13\"></property><property name=\"91\" fullname=\"$transactions[91]\" type=\"object\" classname=\"Company\\HugeNeosFlowAppl\\Domain\\Model\\Transaction\" children=\"1\" numchildren=\"13\"></property><property name=\"92\" fullname=\"$transactions[92]\" type=\"object\" classname=\"Company\\HugeNeosFlowAppl\\Domain\\Model\\Transaction\" children=\"1\" numchildren=\"13\"></property><property name=\"93\" fullname=\"$transactions[93]\" type=\"object\" classname=\"Company\\HugeNeosFlowAppl\\Domain\\Model\\Transaction\" children=\"1\" numchildren=\"13\"></property><property name=\"94\" fullname=\"$transactions[94]\" type=\"object\" classname=\"Company\\HugeNeosFlowAppl\\Domain\\Model\\Transaction\" children=\"1\" numchildren=\"13\"></property><property name=\"95\" fullname=\"$transactions[95]\" type=\"object\" classname=\"Company\\HugeNeosFlowAppl\\Domain\\Model\\Transaction\" children=\"1\" numchildren=\"13\"></property><property name=\"96\" fullname=\"$transactions[96]\" type=\"object\" classname=\"Company\\HugeNeosFlowAppl\\Domain\\Model\\Transaction\" children=\"1\" numchildren=\"13\"></property><property name=\"97\" fullname=\"$transactions[97]\" type=\"object\" classname=\"Company\\HugeNeosFlowAppl\\Domain\\Model\\Transaction\" children=\"1\" numchildren=\"13\"></property><property name=\"98\" fullname=\"$transactions[98]\" type=\"object\" classname=\"Company\\HugeNeosFlowAppl\\Domain\\Model\\Transaction\" children=\"1\" numchildren=\"13\"></property><property name=\"99\" fullname=\"$transactions[99]\" type=\"object\" classname=\"Company\\HugeNeosFlowAppl\\Domain\\Model\\Transaction\" children=\"1\" numchildren=\"13\"></property></property><property name=\"$zip\" fullname=\"$zip\" type=\"uninitialized\"></property><property name=\"$this\" fullname=\"$this\" type=\"object\" classname=\"Company\\HugeNeosFlowAppl\\Command\\ReportCommandController\" children=\"1\" numchildren=\"10\" page=\"0\" pagesize=\"100\"><property name=\"config\" fullname=\"$this-&gt;config\" facet=\"protected\" type=\"array\" children=\"1\" numchildren=\"7\"></pstrconv.Atoi: parsing "del\\Transaction\" children=\"1\" numchildren=\"13\"></property><property name=\"78\" fullname=\"$transactions[78]\" type=\"object\" classname=\"Onedrop\\CyzouMarketplace\\Domain\\Model\\Transaction\" children=\"1\" numchildren=\"13\"></property><property name=\"79\" fullname=\"$transactions[79]\" type=\"object\" classname=\"Onedrop\\CyzouMarketplace\\Domain\\Model\\Transaction\" children=\"1\" numchildren=\"13\"></property><property name=\"80\" fullname=\"$transactions[80]\" type=\"object\" classname=\"Onedrop\\CyzouMarketplace\\Domain\\Model\\Transaction\" children=\"1\" numchildren=\"13\"></property><property name=\"81\" fullname=\"$transactions[81]\" type=\"object\" classname=\"Onedrop\\CyzouMarketplace\\Domain\\Model\\Transaction\" children=\"1\" numchildren=\"13\"></property><property name=\"82\" fullname=\"$transactions[82]\" type=\"object\" classname=\"Onedrop\\CyzouMarketplace\\Domain\\Model\\Transaction\" children=\"1\" numchildren=\"13\"></property><property name=\"83\" fullname=\"$transactions[83]\" type=\"object\" classname=\"Onedrop\\CyzouMarketplace\\Domain\\Model\\Transaction\" children=\"1\" numchildren=\"13\"></property><property name=\"84\" fullname=\"$transactions[84]\" type=\"object\" classname=\"Onedrop\\CyzouMarketplace\\Domain\\Model\\Transaction\" children=\"1\" numchildren=\"13\"></property><property name=\"85\" fullname=\"$transactions[85]\" type=\"object\" classname=\"Onedrop\\CyzouMarketplace\\Domain\\Model\\Transaction\" children=\"1\" numchildren=\"13\"></property><property name=\"86\" fullname=\"$transactions[86]\" type=\"object\" classname=\"Onedrop\\CyzouMarketplace\\Domain\\Model\\Transaction\" children=\"1\" numchildren=\"13\"></property><property name=\"87\" fullname=\"$transactions[87]\" type=\"object\" classname=\"Onedrop\\CyzouMarketplace\\Domain\\Model\\Transaction\" children=\"1\" numchildren=\"13\"></property><property name=\"88\" fullname=\"$transactions[88]\" type=\"object\" classname=\"Onedrop\\CyzouMarketplace\\Domain\\Model\\Transaction\" children=\"1\" numchildren=\"13\"></property><property name=\"89\" fullname=\"$transactions[89]\" type=\"object\" classname=\"Onedrop\\CyzouMarketplace\\Domain\\Model\\Transaction\" children=\"1\" numchildren=\"13\"></property><property name=\"90\" fullname=\"$transactions[90]\" type=\"object\" classname=\"Onedrop\\CyzouMarketplace\\Domain\\Model\\Transaction\" children=\"1\" numchildren=\"13\"></property><property name=\"91\" fullname=\"$transactions[91]\" type=\"object\" classname=\"Onedrop\\CyzouMarketplace\\Domain\\Model\\Transaction\" children=\"1\" numchildren=\"13\"></property><property name=\"92\" fullname=\"$transactions[92]\" type=\"object\" classname=\"Onedrop\\CyzouMarketplace\\Domain\\Model\\Transaction\" children=\"1\" numchildren=\"13\"></property><property name=\"93\" fullname=\"$transactions[93]\" type=\"object\" classname=\"Onedrop\\CyzouMarketplace\\Domain\\Model\\Transaction\" children=\"1\" numchildren=\"13\"></property><property name=\"94\" fullname=\"$transactions[94]\" type=\"object\" classname=\"Onedrop\\CyzouMarketplace\\Domain\\Model\\Transaction\" children=\"1\" numchildren=\"13\"></property><property name=\"95\" fullname=\"$transactions[95]\" type=\"object\" classname=\"Onedrop\\CyzouMarketplace\\Domain\\Model\\Transaction\" children=\"1\" numchildren=\"13\"></property><property name=\"96\" fullname=\"$transactions[96]\" type=\"object\" classname=\"Onedrop\\CyzouMarketplace\\Domain\\Model\\Transaction\" children=\"1\" numchildren=\"13\"></property><property name=\"97\" fullname=\"$transactions[97]\" type=\"object\" classname=\"Onedrop\\CyzouMarketplace\\Domain\\Model\\Transaction\" children=\"1\" numchildren=\"13\"></property><property name=\"98\" fullname=\"$transactions[98]\" type=\"object\" classname=\"Onedrop\\CyzouMarketplace\\Domain\\Model\\Transaction\" children=\"1\" numchildren=\"13\"></property><property name=\"99\" fullname=\"$transactions[99]\" type=\"object\" classname=\"Onedrop\\CyzouMarketplace\\Domain\\Model\\Transaction\" children=\"1\" numchildren=\"13\"></property></property><property name=\"$zip\" fullname=\"$zip\" type=\"uninitialized\"></property><property name=\"$this\" fullname=\"$this\" type=\"object\" classname=\"Onedrop\\CyzouMarketplace\\Command\\ReportCommandController\" children=\"1\" numchildren=\"10\" page=\"0\" pagesize=\"100\"><property name=\"config\" fullname=\"$this-&gt;config\" facet=\"protected\" type=\"array\" children=\"1\" numchildren=\"7\"></property><property name=\"marketplaceFactory\" fullname=\"$this-&gt;marketplaceFactory\" facet=\"protected\" type=\"object\" classname=\"Onedrop\\CyzouMarketplace\\Domain\\Factory\\MarketplaceFactory\" children=\"1\" numchildren=\"3\"></property><property name=\"request\" fullname=\"$this-&gt;request\" facet=\"protected\" type=\"object\" classname=\"Neos\\Flow\\Cli\\Request\" children=\"1\" numchildren=\"7\"></property><property name=\"response\" fullname=\"$this-&gt;response\" facet=\"protected\" type=\"object\" classname=\"Neos\\Flow\\Cli\\Response\" children=\"1\" numchildren=\"4\"></property><property name=\"arguments\" fullname=\"$this-&gt;arguments\" facet=\"protected\" type=\"object\" classname=\"Neos\\Flow\\Mvc\\Controller\\Arguments\" children=\"1\" numchildren=\"2\"></property><property name=\"commandMethodName\" fullname=\"$this-&gt;commandMethodName\" facet=\"protected\" type=\"string\" size=\"15\" encoding=\"base64\"><![CDATA[Z2VuZXJhdGVDb21tYW5k]]></property><property name=\"objectManager\" fullname=\"$this-&gt;objectManager\" facet=\"protected\" type=\"object\" classname=\"Neos\\Flow\\ObjectManagement\\ObjectManager\" children=\"1\" numchildren=\"9\"></property><property name=\"commandManager\" fullname=\"$this-&gt;commandManager\" facet=\"protected\" type=\"object\" classname=\"Neos\\Flow\\Cli\\CommandManager\" children=\"1\" numchildren=\"5\"></property><property name=\"output\" fullname=\"$this-&gt;output\" facet=\"protected\" type=\"object\" classname=\"Neos\\Flow\\Cli\\ConsoleOutput\" children=\"1\" numchildren=\"5\"></property><property name=\"Flow_Injected_Properties\" fullname=\"$this-&gt;Flow_Injected_Properties\" facet=\"public\" type=\"array\" children=\"1\" numchildren=\"4\"></property></property></response>": invalid syntaxroperty><property name=\"marketplaceFactory\" fullname=\"$this-&gt;marketplaceFactory\" facet=\"protected\" type=\"object\" classname=\"Company\\HugeNeosFlowAppl\\Domain\\Factory\\MarketplaceFactory\" children=\"1\" numchildren=\"3\"></property><property name=\"request\" fullname=\"$this-&gt;request\" facet=\"protected\" type=\"object\" classname=\"Neos\\Flow\\Cli\\Request\" children=\"1\" numchildren=\"7\"></property><property name=\"response\" fullname=\"$this-&gt;response\" facet=\"protected\" type=\"object\" classname=\"Neos\\Flow\\Cli\\Response\" children=\"1\" numchildren=\"4\"></property><property name=\"arguments\" fullname=\"$this-&gt;arguments\" facet=\"protected\" type=\"object\" classname=\"Neos\\Flow\\Mvc\\Controller\\Arguments\" children=\"1\" numchildren=\"2\"></property><property name=\"commandMethodName\" fullname=\"$this-&gt;commandMethodName\" facet=\"protected\" type=\"string\" size=\"15\" encoding=\"base64\"><![CDATA[Z2VuZXJhdGVDb21tYW5k]]></property><property name=\"objectManager\" fullname=\"$this-&gt;objectManager\" facet=\"protected\" type=\"object\" classname=\"Neos\\Flow\\ObjectManagement\\ObjectManager\" children=\"1\" numchildren=\"9\"></property><property name=\"commandManager\" fullname=\"$this-&gt;commandManager\" facet=\"protected\" type=\"object\" classname=\"Neos\\Flow\\Cli\\CommandManager\" children=\"1\" numchildren=\"5\"></property><property name=\"output\" fullname=\"$this-&gt;output\" facet=\"protected\" type=\"object\" classname=\"Neos\\Flow\\Cli\\ConsoleOutput\" children=\"1\" numchildren=\"5\"></property><property name=\"Flow_Injected_Properties\" fullname=\"$this-&gt;Flow_Injected_Properties\" facet=\"public\" type=\"array\" children=\"1\" numchildren=\"4\"></property></property></response>": invalid syntax

trconv.Atoi: parsing ]]></stream>": invalid syntax

I know there is already a solved issue here that mentions the issue with trconv.Atoi: parsing is fixed.
but i now tried for quite a while to get this running.
But i always get these errors in the debug output of the container running the debugproxy:

trconv.Atoi: parsing "zZXIvZm9yZ290cGFzc3dvcmQiPlBhc3N3b3J0IHZlcmdlc3Nlbj88L2E+CiAgICAgICAgICAgICAgICA8L3A+CgogICAgICAgICAgICAgICAgPGlucHV0IHR5cGU9InN1Ym1pdCIgdmFsdWU9IkxvZ2luIiBjbGFzcz0iYnRuIGJ0bi1wcmltYXJ5IiAvPgogICAgICAgICAgICA8L2Zvcm0+CiAgICAgICAgCgogICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9zZWN0aW9uPgogICAgICAgICAgICAgICAgICAgICAgICAKCiAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICA8L21haW4+CiAgICAgICAgICAgIDwvZGl2PgogICAgICAgIDwvZGl2PgoKICAgICAgICA8c2NyaXB0IHNyYz0iaHR0cHM6Ly9jZG4uanNkZWxpdnIubmV0L25wbS9AcG9wcGVyanMvY29yZUAyLjkuMS9kaXN0L3VtZC9wb3BwZXIubWluLmpzIiBpbnRlZ3JpdHk9InNoYTM4NC1TUjFzeDQ5cGN1TG5xWlVublB3eDZGQ3ltMHdMc2s1Slp1TngyYlBQRU56c3dUTkZhUVUxUkR2dDN3VDRnV0ZHIiBjcm9zc29yaWdpbj0iYW5vbnltb3VzIj48L3NjcmlwdD4KICAgICAgICA8c2NyaXB0IHNyYz0iaHR0cHM6Ly9jZG4uanNkZWxpdnIubmV0L25wbS9ib290c3RyYXBANS4wLjAtYmV0YTMvZGlzdC9qcy9ib290c3RyYXAubWluLmpzIiBpbnRlZ3JpdHk9InNoYTM4NC1qMENOTFVlaXF0eWFSbWx6VUhDUForR3k1ZlF1MGRRNmVaL3hBd3c5NDFBaTFTeFNZKzBFUXFOWE5FNkRaaVZjIiBjcm9zc29yaWdpbj0iYW5vbnltb3VzIj48L3NjcmlwdD4KICAgICAgICA8c2NyaXB0IHNyYz0iaHR0cDovL2xvY2FsLmF3by1laHJlbmFtdC5kZS9fUmVzb3VyY2VzL1N0YXRpYy9QYWNrYWdlcy9Bd28uRWhyZW5hbXQvYXNzZXRzL2pzL2FkbWluL3Rvb2x0aXAuanMiIHR5cGU9InRleHQvamF2YXNjcmlwdCI+PC9zY3JpcHQ+CiAgICA8L2JvZHk+CjwvaHRtbD4K]]></stream>": invalid syntax

which comes right after a line with this content:

Processed protocol:
debugproxy_1_679f7c439e19 | <stream xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" type="stdout" encoding="base64">DQo=</stream>

and just now i got the error (with an extremely long gibberish value) after this line:

Processed protocol:
debugproxy_1_679f7c439e19 | <stream xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" type="stdout" encoding="base64">Q29udGVudC10eXBlOiB0ZXh0L2h0bWw7IGNoYXJzZXQ9VVRGLTg=</stream>

when i base64 decode the line of my first logged line, i get something like a linebreak or similar.

if i decode the second logged line i get Content-type: text/html; charset=UTF-8 But i don't know if these are even lines that are supposed to appear in these base64 values. So not sure if i still have some wrong configuration or if anything else is wrong here.

Using PHP v7.3.27
xdebug v2.8.0
in a docker environment

Please update docker image

Hi @dfeyer

i've pulled the latest dfeyer/flow-debugproxy image from hub.docker.com but the binary version is still 1.0.1 whilst the most recent released version is 1.1.0. Could you please trigger a new docker image build? (Or make it run automatic ^^).
Thx

flowpathmapper requires cache path to include "Data/Temporary" which can be omitted

Hi there,

i'm currently trying to use your great package in a docker environment and finally got it working.

One of the stumbling stone was that the path to the temporary files is expected to contain "Data/Temporary".
In fact, if the environment variable (rather php const) FLOW_PATH_TEMPORARY_BASE is defined it will be used as absolute path to the temporary files without having "Data/Temporary" appended.
In my case the provider of the Dockerfile set FLOW_PATH_TEMPORARY_BASE=/opt/tmp which resulted in the flow-debugproxy not finding any proxies.

Settings cachePathPattern in flowpathmapper.go#L26 to "@base@/@context@/Cache/Code/Flow_Object_Classes/@[email protected]" should remedy this exact problem.

Breakpoint in Eel Helpers

Breakpoints apparently don't work in an Eel Helper context.

Steps to reproduce:

  • use a Neos Base installation with the Demo Site Package (2.0-beta-5)
  • set a Breakpoint at Packages/Application/TYPO3.Neos/Classes/TYPO3/Neos/TypoScript/Helper/NodeHelper.php line 34 and/or 35

The Demo Site Package has, for example, a teaser that is a ContentCollection. The ContentCollection uses Neos.Node.nearestContentCollection(node, this.nodePath).

Path to original file seems to be wrong when develop with windows

My environment:

PhpStorm 10, Windows 8.1, local apache

The proxy runs fine and it breaks at the first line. When it comes into a controller the proxy writes this:

open /C:/Development/dev_php/flow_test/Data/Temporary/Development/Cache/Code/Flow_Object_Classes/Acme_Demo_Controller_StandardController.php: Die Syntax für den Dateinamen, Verzeichnisnamen oder die Datenträgerbezeichnung ist falsch.

The break point in the controller is ignored.

It seems the proxy searches the original file under the wrong root (/C:...).
The cache file has the correct path appended.

I'm not familiar with Go so I cannot make a fix and a pull request.

Can you check this please?

Add support for Path mapping in Vendor package

Because the proxy is based on Flow convention, we can not support path mapping in Vendor package (stored in the Library folder). If Flow is configured to build proxy class for those packages, the path mapping will not work.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.