I really like using the php built in server, and I really like the look of phpdbg. It reminds me of pry in Ruby land. But I've been having trouble getting it to work. Is it possible to run user phpdbg
with the build in web server?
E.g., how I would like this to work:
- placing
phpdbg_break();
in the code - running
php -S localhost:8000
in the CLI - loading the page/making the request that executes the code containing the
phpdbg_break();
in the browser or through curl - breaking out into a the phpdbg REPL most likely in the same terminal/CLI instance that the built in server was started on
When I try this, I get an error that phpdbg_break();
is an undefined function.
Or else (if the above simply isn't possible), how do you use the "webmocking" that the docs talk about (at the bottom)? How to you make a specific request with a specific URI?