2

I am new to xdebug and would like to know if this is possible to debug a php script from Windows command line (applying breakpoints). I have gone through various examples of using xdebug but all they talk about debugging through IDE (Eclipse or Netbeans).

So i am wondering if this is possible to debug scripts using command line (Windows). If this is possible then can someone provide link/URL that provides step by step guidance to achieve this?

asked Nov 30, 2012 at 9:34
1
  • Just out of interest: why would one want to do that? Even if you succeed in manually handling the protocol, that would be a really really tough task. Following such debug conversation is more than just a few commands. BTW: kdevelop with its php plugin contains an excellent frontend to xdebug. Just to mention a further alternative. Commented Nov 30, 2012 at 9:40

2 Answers 2

2

The xdebug project page mentions some client implementations, it mentions:

Xdebug 2 is bundled with a simple command line client for the DBGp protocol.

Did you try that one?

answered Nov 30, 2012 at 9:42

6 Comments

Thanks for your suggestion but i didn't try any client (either bundled or can be installed separately) so far but was just trying to find a way to debug through command line standalone. If this is the only option then i will surely use something like that
Sorry, can't follow there... what is mentioned above is a command line client.
If i am using php 5.3.x and just set xdebug properties in php.ini then after that what will i have to do to access that command line client.
Take a look at this reply: stackoverflow.com/questions/13284795/… It uses Linux (as most people here do), but you should be able to adapt that, I guess, though you might have to compile the client first.
That link talks about using command line in Linux but i am using windows. There might be different steps to configure command line client. BTW what is the name of the command line client for Windows?
|
2

Xdebug's DBGp protocol is fairly simple. There is a debugging client "debugclient" available for Windows, which used to be linked from the downloads page (http://xdebug.org/download.php) but it seems I had forgotten to add that back. It is still downloadable through http://xdebug.org/files/debugclient-0.9.0.exe

In order to use this, you do need to write DBGp commands. The reference for this is at http://xdebug.org/docs-dbgp.php - this is not an easy thing to do, but it does work.

answered Dec 15, 2012 at 16:27

1 Comment

SE is awesome! It's not the first time i see the author answering for his creation. The other one was for phpMyAdmin. And, btw, thank you very much for the extension!

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.