pugdebug icon indicating copy to clipboard operation
pugdebug copied to clipboard

Unable to use it at all

Open ashnur opened this issue 10 years ago • 16 comments
trafficstars

My setup:

  • using linux binary
  • host machine Arch linux
  • guest is a vagrant ubuntu box, xdebug chrome app (from host) is able to connect to xdebug on it with the same settings

Usually nothing happens, just sits there waiting for connection. No errors or anything. Sometimes, I am able to get these errors (I run pugdebug from terminal):

Traceback (most recent call last):
  File "/home/robert/pugdebug/pugdebug/server.py", line 42, in run
  File "/home/robert/pugdebug/pugdebug/server.py", line 88, in __listen
  File "/home/robert/pugdebug/pugdebug/server.py", line 166, in init_connection
KeyError: 'idekey'

The idekey is the same for sure obviously.

Because there are not logs to see what pugdebug does (or at least I was unable to find them), I have no idea what else could I check to see what's the issue.

ashnur avatar Nov 11 '15 15:11 ashnur

Also, I don't understand what I see on the guest, in the xdebug.log either:

Log opened at 2015-11-11 15:51:26
I: Checking remote connect back address.
I: Remote address found, connecting to 192.168.56.1:8081.
E: Could not connect to client. :-(
Log closed at 2015-11-11 15:51:26

The host ip is 192.168.56.1 (the port is changed because of php-fpm), but when the xdebug chrome app connects, xdebug logs the IP 127.0.0.1 and not 192.168.56.1 (with the same settings remote host/port 0.0.0.0:8081) And I never set 192.168.56.1 neither in pugdebug nor in xdebug config.

ashnur avatar Nov 11 '15 15:11 ashnur

Thanks for the report, I'll look into it!

robertbasic avatar Nov 14 '15 10:11 robertbasic

Would be great if I could use this, the chrome app I mentioned is not very polished :). Let me know if you need more data or have some idea I could try out to give a better description of what's happening.

ashnur avatar Nov 15 '15 11:11 ashnur

Well the traceback shows paths to /home/robert/... which is my home path (except if your home folder is also named robert, which is a coincidence then :D), and that makes me believe I'm not building the binaries correctly. Will look into that first.

robertbasic avatar Nov 16 '15 13:11 robertbasic

Hey @ashnur could you write me down your xdebug settings and the setting inside pugdebug? thanks!

robertbasic avatar Nov 27 '15 10:11 robertbasic

I will, but only after monday, I have no access to that machine until then.

On Fri, 27 Nov 2015 at 11:43, Robert Basic [email protected] wrote:

Hey @ashnur https://github.com/ashnur could you write me down your xdebug settings and the setting inside pugdebug? thanks!

— Reply to this email directly or view it on GitHub https://github.com/robertbasic/pugdebug/issues/160#issuecomment-160110669 .

ashnur avatar Nov 27 '15 10:11 ashnur

I'm afraid to report, I'm in the same boat. Tried both local and remote debug, local works first few clicks, remote - unable to establish mappings. File named tab pops up in the middle, but content is empty. If I force click the same named file in the browser, it opens new tab with same name. At the same time the File Browser shows correct root directory, and if I click on any file there, it'll load just all right.

AnrDaemon avatar Feb 28 '16 05:02 AnrDaemon

CRY

AnrDaemon avatar Jun 06 '16 14:06 AnrDaemon

I haven't had to deal with PHP since, so I never got to write down the exact xdebug and pugdebug settings. Maybe you could do that @AnrDaemon ?

ashnur avatar Jun 06 '16 14:06 ashnur

I've tried many combinations, but no matter how hard I try, the thing just doesn't work. At all. Local or remote files. Any combination of settings for xdebug and pugdebug. Just… No result. Hangs. Empty windows. So sad. If it stays like this, I'll have no choice but to write my own crutch :(

AnrDaemon avatar Jun 06 '16 14:06 AnrDaemon

@AnrDaemon I think it would be very useful if you would share at least known combination from the many you have tried that is not working. You must realize that if it would be trivial to debug this, it would be solved already, so something must be out of place, maybe there is a hidden assumption that breaks or something. Also, you could share some logs too, same way I did...

ashnur avatar Jun 06 '16 15:06 ashnur

https://github.com/robertbasic/pugdebug/issues/168

AnrDaemon avatar Jun 06 '16 15:06 AnrDaemon

I'm having what I think is the same problem. pugdebug doesn't get a connection from the debug engine, it just sits there "Waiting for connection". The program debugclient included with the xdebug package does get the connection and starts a debug session, so I know xdebug works. I tried executing php both from the command line and from the browser, neither worked. The remote code is on a web server on the same machine pugdebug is running on.

It would be good to be able to get more information about what pugdebug is doing. Nothing is appearing in the terminal window that I started pugdebug from.

I'm using the pugdebug 1.0.0 binary package on Fedora 25. Here are my xdebug settings:

[xdebug] zend_extension=/usr/lib64/php/modules/xdebug.so xdebug.remote_enable=1 xdebug.remote_connect_back=0 xdebug.remote_host=localhost xdebug.remote_port=9000 xdebug.show_local_vars=0 xdebug.var_display_max_data=10000 xdebug.var_display_max_depth=20 xdebug.show_exception_trace=0 xdebug.idekey=pugdebug

My pugdebug settings:

Root: /home/jlownie/www/ Host: localhost Port: 9000 IDE Key: pugdebug

jlownie avatar Dec 06 '17 01:12 jlownie

Disregard my previous message, the issue was the ide key which wasn't what I thought it was. When I removed the ide key from pugdebug and started it listening, it picked up the session OK.

jlownie avatar Dec 06 '17 03:12 jlownie

Not sure if this is a help to anyone but I had a similar issue. Running on Mint, pugdebug never caught a connection. I got it working by changing "Host" under settings from 127.0.0.1 to a blank field. Then bang everything worked.

gmarkow avatar Aug 27 '18 18:08 gmarkow

At this point, VSCode won the day by a VERY large margin.

AnrDaemon avatar Aug 27 '18 23:08 AnrDaemon