Debugging - "waiting for connection"

I have problems with NetBeans connecting to Xdebug.
Not very experienced on this part.

image

image

url:
image

image

I can’t connect with telnet. (I think I should do…)


└──| telnet -d farmos 9003
Trying 192.168.10.142...
setsockopt (SO_DEBUG): Ikke tilgang
telnet: Unable to connect to remote host: Oppkobling nektes

I’m lost again… :cry:

Which web browser you are using.

Brave

I was debugged using vscode(code editor, debugger with xdebug extention), xampp(php, MySQL only), nginx(as server) and Mozilla Firefox (browser) in windows.still It’s working.

I am using https://addons.mozilla.org/en-US/firefox/addon/xdebug-helper-for-firefox/ this extention in browser.

1 Like

I haven’t used NetBeans, but for PHPStorm I have to add these additional environment variables to my docker-compose.yml:

XDEBUG_SESSION: PHPSTORM
PHP_IDE_CONFIG: serverName=localhost

This documentation page outlines everything that’s necessary for PHPStorm: Debugging | farmOS

… I have to imagine NetBeans would work similar? Maybe just need to figure out the correct value for XDEBUG_SESSION? :thinking:

For what it’s worth, with the setup documented in the link above, I do not need to add ?XDEBUG_SESSION_START to my URL strings. It “just works” automatically.

1 Like

Ok, you were trying from terminal. in your screenshot ports ‘84:80’ but, your url it is 84[farmos:84]. If anything this causing problem.

1 Like

Port 84 is mapped to port 80, so I don’t think that’s the problem

Ah… crap. Now I understand that host is the NetBeans pc… :man_facepalming:

image

I think that was the only missing part.
Now I just have to figure out how the debugging works.

2 Likes

Ah! Does that mean you got it working @pat?? Are you able to set a breakpoint and stop execution?

Yes :upside_down_face:
Had to put the host IP in the XDEBUG_CONFIG. Just didn’t realize the host was the coumputer with NetBeans installed.

2 Likes