gwomacks / php-debug

Atom Text Editor package for PHP debugging
MIT License
119 stars 31 forks source link

Breakpoints are not detected #309

Open angjelkom opened 5 years ago

angjelkom commented 5 years ago

I have a symfony project, in console I get:

screen shot 2018-09-02 at 8 02 28 am

When I do the call where it should hit the breakpoint, at first it asks me for the path and I've set it correctly, but the breakpoint never gets triggered, i keep getting session initialized and session terminated, in VSCode and PHPStorm the breakpoints work fine

cchamplin commented 5 years ago

Can you enable protocol debugging and then provide a copy of the log messages from the Atom Debugger?

vritme commented 5 years ago

I have had the same problem. Disabling "Allow for multiple debug sessions at once" helped. image

vritme commented 5 years ago

I also use "PHP Server" extension to open project, with port any, but not 80, because in 80 port it doesn't open it browser... And while using the real Apache (some of it's russian bundle - https://ospanel.io/) - i have no debugging at all, while apache open http in 80 port, as recommended for debugging... image

The Great Creator of this extension - why doest it work so strange??

artfulrobot commented 5 years ago

I have the OP's problem, too. It doesn't stop at breakpoints. @vritme's suggestion of turning off multiple sessions did not make a difference.

However if I hard-code xdebug_break(); into my php, it does stop, and then it does stop at other breakpoitns.

lkraav commented 5 years ago

I just figured out there are indeed multiple breakpoint systems apparently available in parallel.

Alt-F9 sets the "right" breakpoint in gutter right hand side, while I guess atom-debug-ui has reserved gutter left hand side.

Breakpoints set w/ Alt-F9 work correctly.

artfulrobot commented 5 years ago

@lkraav oh yeah! That works! and that makes sense wrt @cchamplin's suggestion to disable the other debugger thing.

bugz8unny69 commented 5 years ago

Hi @lkraav @artfulrobot

That works! and that makes sense wrt @cchamplin's suggestion to disable the other debugger thing.

Does either of you by any chance know how to disable the other debugger thing ?

Because I can't seem to find this:

It sounds like what you're describing is the Debugger recently added to atom-ide-ui, unfortunately this is not used by and not compatible with PHP-Debug. I think you can turn it off entirely via Settings->atom-ide-ui->Enabled Features->Enable Debugger->Never enabled.

Thanks

bugz8unny69 commented 5 years ago

Also, @lkraav

Alt-F9 sets the "right" breakpoint in gutter right hand side, while I guess atom-debug-ui has reserved gutter left hand side.

Pressing Alt-F9 doesn't seem to have any indication on the UX that is active? You mention gutter, is there suppose to be a right gutter?

deepinscreenshot_select-area_20190116144843

I manager to fix that:

deepinscreenshot_select-area_20190116145112

deepinscreenshot_select-area_20190116145205

artfulrobot commented 5 years ago

@lhorace sorry, no. I gave up on atom when I realised how poor the debugging facilities were (for PHP / XDEBUG), and the fact that it was taking up over a GB of my disk! Went back to (neo)vim + Vdebug.

RayHollister commented 4 years ago

Does either of you by any chance know how to disable the other debugger thing ?

Because I can't seem to find this:

It sounds like what you're describing is the Debugger recently added to atom-ide-ui, unfortunately this is not used by and not compatible with PHP-Debug. I think you can turn it off entirely via Settings->atom-ide-ui->Enabled Features->Enable Debugger->Never enabled.

I know it's been seven months later, but I am going through this right now and I wanted to note this for the next poor soul that tries.

You get to the Settings menu by opening the Preferences menu. In Windows and *nix it's Ctrl-Comma. In MacOS it's Command(⌘)-Comma.

Then it's Packages > atom-ide-ui > Enabled Features > Enable Debugger > Never enabled

lkraav commented 4 years ago

In the meanwhile, I migrated to IntelliJ PhpStorm, never looked back.

kirenpillay commented 2 years ago

Its Jan 2022, and this issue still exists. I have the gutters on the right and enabled breakpoints using Alt-F9; removed the other debugger but still the php-debugger won't stop at the expected breakpoint. I noticed the debugger waiting for 3seconds then it terminates the connection Screenshot from 2022-01-04 00-18-09 .