FLEX & PHP debugging

Hi, first of all greeting for the cool project

I saw the "Php & .Net debugging" tutorial and my question is : is it possible to debug at the same time a flex application ( with eclipse ) and an amfphp service ?
In other words is it possible to detect when flash request a php page so visual studio can start the debug session ?

thanks
Teo

Comments

    ok, a little step on :) I

    ok, a little step on :)

    I discovered i can debug a simple page with flex, the problem was i used multitab in firefox so the debug session was terminated.

    I still have 2 problems:

    1 - The Debug Session id changes for each debug so it's a problem to manage it in flex with constants, is there a way to use a constant debug session id?

    2 - for amf php i use something like that to declare the services

    <?php
    //-- XML CONFIGURATION FORM AMF PHP
    <services-config>
        <
    services>
            <
    service
                id
    ="amfphp-flashremoting-service"
               
    class="flex.messaging.services.RemotingService"
               
    messageTypes="flex.messaging.messages.RemotingMessage"
               
    >
                <
    destination id="amfphp">
                    <
    channels>
                        <
    channel ref="my-amfphp"/>
                    </
    channels>
                    <
    properties>
                        <
    source>*</source>
                    </
    properties>
                </
    destination>
            </
    service>
        </
    services>
        <
    channels>
            <
    channel-definition id="my-amfphp" class="mx.messaging.channels.AMFChannel">
               
               
                <
    endpoint
                    uri
    ="http://127.0.0.1:8080/myProject/gateway.php"
                   
    class="flex.messaging.endpoints.AMFEndpoint"
                   
    />
                   
            </
    channel-definition>
        </
    channels>
    </
    services-config>
    ?>

    and the remote object is declared as

    <?php
    //-- MXML
    <mx:RemoteObject
            id
    ="productService"
           
    source="packageName.ProductService"
           
    destination="amfphp"
           
    requestTimeout="120000"
           
    showBusyCursor="true"
           
    />
    ?>

    so i can call the functions inside the php class in this way:
    productService.myFakeFunction ()

    any idea where to pass the debug session id?

    Thanks
    Teo

    Are you using your own web

    Are you using your own web server or the built-in one?

    If you are using your own web server, set this parameter in your php.ini file:

    xdebug.remote_autostart = 1

    That will debug all request coming to the web server.

    If that's not a good option, then you need to add the following to your url's querystring

    XDEBUG_START=1

    Let me know if that solves your problem.

    yes, i solved putting

    yes, i solved putting

    http://localhost:8080/amfphp/gateway.php?XDEBUG_SESSION_START=24

    server don't seems to take care of the number so it works. in this way i can debug other amf php services.

    thanks a lot

    I tried the above, but it

    I tried the above, but it didnt break inside VS.PHP. Is there something I have to setup in VS.PHP to make it break when an request comes in externally?

    I tried http://localhost:8080/myapp/main.php?XDEBUG_START=1 and did not break in VS.PHP (VS.PHP is open and the project is open)

    Am I missing something?

    Thanks

    Are you having this issue

    Are you having this issue with a particular project or any project?

    See my other commenthow I

    See my other commenthow I got it figured out. I have to first run the debugger in and then run myFlex. Seems to work most of the time. Maybe there is a simpler way.