-
Notifications
You must be signed in to change notification settings - Fork 309
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possible to debug state of a running application being requested via HTTP #39
Comments
In PHP 5.4+ you can run your application using the built-in CLI SAPI web-server. PsySH works great with that :) |
Django has one cool feature that I think we can create with psysh. In error pages ther's an interctive console. The same than psysh but in the browser instead of server's console. I think if instead of read/write from stdin, if we use a websocket connection (for example with Rachet) we can move the interactive console to the browser. Maybe I need to think about it a little bit more, but it should be possible. |
The same request in symfony/symfony#10094 and experimental implementation for the Tracy nette/tracy@59d9c81 - see in action http://vimeo.com/72138480 |
@bobthecow please can you tell exactly how to make it work? i have a simple php file with just autoloading and \Psy\Shell::debug call.
|
@kor3k that seems like a different issue... can you run psysh normally? |
@bobthecow yes, in cli it works like a charm. php version is 5.5.10-win64-ts |
@kor3k do you mind opening a new issue for this with as much information as you can? |
One way would be making psysh launch a simple TCP server just listening of any random port. Then as part of Monolog, you can write a psysh handler that pipes the logs to psysh, allowing you to see the logs in real time but also not affecting your application (unlike Tracy). Kind of like how Firebug currently works, but in this case, no need for a browser. A simple Curl/HTTPie is good enough to trigger requests. |
@bobthecow It works with the built-in web server, however when hitting ctrl-d the request doesn't continue (the browser is still waiting for answer from the server). When launched from the command line it works as expected (the PHP script is resumed when hitting ctrl-d) |
@gpoulin2 Hmm. That's either a regression or an issue with PHP versions or something. Do you mind opening another issue for that? |
Hi, i saw an open issue on the symfony component for this, would be nice to have a web debugger with stack trace. Is there any PR started on this, should i start from scratch? is there anyone who had tried something with that? thanks |
Closing this one in favor of #505 since they're substantially similar. |
I am curious if there is a way or plans to support the ability to use the Debug functionality and have it triggered from an HTTP request to your application.
For example I want to be able to visit http://www.myapp.com in my browser (or event via a curl request/wget from the terminal would be fine) and still take advantage of the Debug functionality where I can explore he state of my app.
This would be similar to xdebug functionality minus the step debugging.
The text was updated successfully, but these errors were encountered: