Koozali.org formerly Contribs.org

Xdebug installation guide/contrib

Online ReetP

  • *
  • 1,951
Re: Xdebug installation guide/contrib
« Reply #15 on: April 13, 2019, 05:49:26 PM »
I have read it to begin with and setting remote host does not improve on the situation.

BTW: I do not understand why xdebug not just use the client IP if started?


Because xdebug doesn't really 'start'. It sits there waiting for something to happen and then passes that along to the IP specified.

Quote
This is the reason that I like to make a guide - it is not so simple.

Well, it is. Once you understand it ;-)

Quote
I have now tried to set it up with Atom that I use as a editor - no luck so far ;-)

Yup - it doesn't look that easy to set up remote debugging.....

OK - having had a quick look around try using Brackets and the following:

https://github.com/spocke/php-debugger

That has quite a good setup guide. Remember to have the right ports open on your desktop if you have it firewalled....

...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline beast

  • *
  • 171
Re: Xdebug installation guide/contrib
« Reply #16 on: April 14, 2019, 09:02:14 AM »
Strange.....

I seam unable to make it work anywhere on my Ubuntu client system :-(

I have also tried to test the connection between the server and the client and this works fine:

Code: [Select]
benny@benny-desktop:~$ nc -l 9000
506<?xml version="1.0" encoding="iso-8859-1"?>
<init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" fileuri="file:///home/e-smith/files/ibays/passdev_ibay/html/lib/info.php" language="PHP" xdebug:language_version="7.1.28" protocol_version="1.0" appid="16170"><engine version="2.7.1"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[https://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2019 by Derick Rethans]]></copyright></init>^C

Have tried with the following clients:
  • Atom (seam as if I am unable to install it in the right way and PHP need to be local)
  • Pugdebug (standalone but does not detect the connection)
  • Xdebug client for Chrome (does not detect the connection)

Offline beast

  • *
  • 171
Re: Xdebug installation guide/contrib
« Reply #17 on: April 14, 2019, 09:18:30 AM »
Atom now begin to work after a lot of testing and seaching for solutions ;-)

At least I have a connection now - but still unable to debug ;-)
« Last Edit: April 14, 2019, 09:23:49 AM by beast »

Online ReetP

  • *
  • 1,951
Re: Xdebug installation guide/contrib
« Reply #18 on: April 14, 2019, 09:47:56 AM »
Atom now begin to work after a lot of testing and seaching for solutions ;-)

At least I have a connection now - but still unable to debug ;-)

Sounds a contradiction in terms. If you have a connection you should be able to debug. I use xubuntu.. without any problems.

If you follow that guide for brackets it should work. It's exactly the setup I would use.

I haven't got time to look today.

Can you post your latest php.ini debug section again and I'll look tomorrow.
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline beast

  • *
  • 171
Re: Xdebug installation guide/contrib
« Reply #19 on: April 14, 2019, 09:56:48 AM »
If you follow that guide for brackets it should work. It's exactly the setup I would use.

I think xdebug is running fine. My current problem is that atom ask for path maps when connecting.
I have not a clear understanding of this concept so I am unable to provide correct remote and local settings as it pops up again and again or do not stop on breakpoints.

If I was running everything local I think it would work. But I am running against a server and have problems.

Maybe I shall try with another IDE. But Komodo Edit do not support debugging and then I have to pay a monthly fee etc.
« Last Edit: April 14, 2019, 09:58:30 AM by beast »

Offline beast

  • *
  • 171
Re: Xdebug installation guide/contrib
« Reply #20 on: April 14, 2019, 10:22:16 AM »
It is working now in Atom - a bit unpolished in my view.

Also tried to download Komodo IDE but was unable to make it work in my setup right out of the box (to begin with I had 2 clients listening at the same time - stupid me)

Must also admit that I prefer Atom.

There is really a need for a better developer experience in my view (setup/use etc)

I will try to write a guide based on this experience - not easy

Online ReetP

  • *
  • 1,951
Re: Xdebug installation guide/contrib
« Reply #21 on: April 14, 2019, 10:35:42 AM »
Ahhhhh you didn't explain that..... little things make a big difference.

To be able to debug you have to tell the debugger where the 'real' code is.

Remember, the remote debugger is not actually running code on your desktop.

When you edit on your desktop you are using say smb to connect to the server and edit the file.

So you have to equate the http url to a 'local' url reference for the file.

On Komodo I actually have a scp:// type reference.

So for instance:

http://some.server/ibay/test.php

Is the same as:

scp://home/e-smith/files/ibay/html/test.php

You might need to mess around a bit, but that is where your problem lies.

Might mention it here... not sure (and can't read on my mobile)

http://docs.komodoide.com/Manual/debugphp

Now you know where the issue is you can probably search it on the interwebs.

I'll have a look at my brackets setup tomorrow and see what I have set there.
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Online ReetP

  • *
  • 1,951
Re: Xdebug installation guide/contrib
« Reply #22 on: April 14, 2019, 10:39:13 AM »
Quote
There is really a need for a better developer experience in my view (setup/use etc)

That is more down to the IDE than the server.

On the server you just need to add xdebug rpm, add the couple of lines in php.ini and off you go.

The rest of it is down to the particular IDE.
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline beast

  • *
  • 171
Re: Xdebug installation guide/contrib
« Reply #23 on: April 14, 2019, 10:40:25 AM »
That is more down to the IDE than the server.

On the server you just need to add xdebug rpm, add the couple of lines in php.ini and off you go.

The rest of it is down to the particular IDE.

I totally agree ;-)

Online ReetP

  • *
  • 1,951
Re: Xdebug installation guide/contrib
« Reply #24 on: April 14, 2019, 10:42:49 AM »
LOL.

I'll try and tidy up the wiki.

I slapped the notes in roughly ages ago as I had to figure it all out myself.

I'll try & do that this week.

Be good if you added some Atom specific ones.
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline beast

  • *
  • 171
Re: Xdebug installation guide/contrib
« Reply #25 on: April 14, 2019, 10:45:36 AM »
I will add atom details and maybe for Sublime text that I try to setup now

Online ReetP

  • *
  • 1,951
Re: Xdebug installation guide/contrib
« Reply #26 on: April 14, 2019, 10:52:07 AM »
Cool. I think when I first did it pre 'SCL' there was no xdebug rpm so I used the files that Komodo supplied.

Wiki needs something like:

Server setup

Ensure SCL installed
Enable PHP version
Install xdebug
Add php.ini template for version phpxx
signal-event php-update

Client setup

Atom
Brackets
Komodo
Etc
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline beast

  • *
  • 171
Re: Xdebug installation guide/contrib
« Reply #27 on: April 14, 2019, 10:56:09 AM »
Yes, something like that :-)

Online ReetP

  • *
  • 1,951
Re: Xdebug installation guide/contrib
« Reply #28 on: April 14, 2019, 11:02:35 AM »
Yes, something like that :-)

:-)

:thumbsup:
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline beast

  • *
  • 171
Re: Xdebug installation guide/contrib
« Reply #29 on: April 18, 2019, 12:16:13 AM »
I do not have it working for remote debugging without errors :-(

The main problem is still how to set up the local and remote path logic as far as I can see.

With these settings:

{"remotePath":"/home/e-smith/files/ibays/passdev_ibay/html/lib","localPath":"/run/user/1000/gvfs/smb-share:server=beastserver,share=passdev_ibay/html/lib"}

It actually looks as if the code stops - but I am unable to see where and continue execution (run/step etc.)

So something is wrong with the paths (unable to see the source files)

I have also tried with SCP etc. but I do not know for sure how to set it up.

PS: Local debugging is no problem
NB: Client is running on Ubuntu 18.10

Help will be appreciated ;-)

/Benny