NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Using DBG in a custom IDE or Windows console?


Joined: 17 Apr 2006
Posts: 3
Reply with quote
I've downloaded and configured the free DBG server and client parts. However, the Windows DBG listener doesn't seem to do anything. It sits in my system tray, and the log reads "4/17/2006 11:24:34 AM Listener is started". Even when I run a PHP script with an error in it, I get nothing new in the DBG client's log. If it matters, I'm running Apache 2.0 with PHP 5.0.5 on port 8080.

At any rate, if that's normal, how do I interact with DBG from a console or from C++/C#/whatever code? There doesn't seem to be any available Windows console client, or I could simply redirect the standard I/O. Am I supposed to listen on port 7869 for messages from the debugger? How do I tell the debugger to set a breakpoing or to eval() something for me? How can I tell if the PHP debugger is actually running and usable (aside from phpinfo(), which indicates it's loaded)?

Sorry if I sound totally helpless. I can't seem to find any documentation on this module anywhere. I very much appreciate it being released under the LGPL, but I need some direction on how to utilize it.

_________________
~BenDilts( void );
View user's profileFind all posts by beandogSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
DBG listener is a proxy between IDE (possibly 3rd party) and debugger module running on the server.
I'd recommend you to try NuSphere PhpED as an IDE. It's where you'll be able to run debug sessions, set breakpoints, see errors etc.
Quote:
If it matters, I'm running Apache 2.0 with PHP 5.0.5 on port 8080

it matters. You have create project and to set run mode to 3rd party web server. Don't forget to install debugger module that comes with IDE.
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 17 Apr 2006
Posts: 3
Reply with quote
I'm sorry if I didn't make myself clear in my original post. I mean to create a custom tool that includes the use of the DBG extension to PHP. Is there a published specification for DBG's message protocol? There are many third-party products that use DBG for their PHP debugging backend. Where did those vendors find information on how to use DBG in their products?

_________________
~BenDilts( void );
View user's profileFind all posts by beandogSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
dbglistener exposes its API through number of COM interfaces and it's what make it that easy to use DBG without learning message protocol which by the way may vary from version to version. All COM interfaces are listed in IDL file that is available with listener, isn't it?
If you don't want it under Windows or don't want to deal with COM, you can use dbg listener classes directly. See sample console that is avilable as dbg-cli.
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 17 Apr 2006
Posts: 3
Reply with quote
Thanks again for the speedy reply!

I'm a bit confused about what to do with this .IDL file. Where is the DLL that implements these interfaces? I assumed it was the PHPDbgPS.dll, since it's supposed to be regsvr32'ed, but Visual Studio doesn't see any COM interfaces in that dll. Or am I supposed to implement these interfaces myself?

I first created an MFC console application to use the DBG API. I attempted to add an MFC class from an existing TypeLib. As I said, the PHPDbgPS.dll had no exposed interfaces. So I then added the IDL file to my project and compiled (to produce the .tlb). I then attempted to add an MFC class to my project from that .tlb file, but Visual Studio 2003 showed no exposed interfaces in that .tlb file that it produced from the .IDL file. I noticed that Visual Studio also created a few .c and .h files when it process the .idl file. However, these don't seem to give me any way to access the underlying COM objects.

I tried then to do it with C#. I tried to add a COM reference to the PHPDbgPS.dll file, but it said that it was not a valid COM DLL. Just for kicks, I tried adding a reference to DbgListener.exe, in case that was hiding the COM objects, but of course that didn't work.

I'm missing something really fundamental here. What do I need to do?

_________________
~BenDilts( void );
View user's profileFind all posts by beandogSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
DbgListener implements some interfaces. One of them (the site) should be implemented by IDE.
Dll you mentioned is a COM proxy/stub dll and should not implement any interfaces Smile
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Using DBG in a custom IDE or Windows console?
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic