gwomacks / php-debug

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

php-debug 0.3.3 with atom-ide-debug 1.0.1 no longer works at all #283

Closed rotorboy closed 6 years ago

rotorboy commented 6 years ago

php-debug recently updated itself to 0.3.3 and said that atom-debug-ui 1.0.1 was necessary. I installed both, and now php-debug no longer functions properly. I'm running Atom 1.26.1

Specifically, While I can set a breakpoint, and execution stops when a breakpoint is hit, "stepping over" essentially causes execution to start to "run", but no other stopping occurs, and more annoyingly, the executing script never terminates. Its as if execution has stopped, as if at the next "breakpoint" (i.e the following line of code), but Atom is showing as if "continue" was clicked.

Detaching sometimes allows execution to resume, but sometimes not, and I must quit atom/Chrome.

Any ideas or help would be appreciated, as I'm unable to do any debugging...

Thanks

PS cross posting this to php-debug as well

cchamplin commented 6 years ago

@rotorboy Can you enable Xdebug DBGP Protocol Debugging in the settings and then send me a copy of your atom debug log with logging set to verbose and all console lines expanded?

rotorboy commented 6 years ago

After reading https://flight-manual.atom.io/hacking-atom/sections/debugging/ , still Not quite sure how to enable/find “atom debug log” or expand all console lines. Do I need this https://atom.io/packages/console-log?

-Avi

On May 7, 2018, at 09:24, Caleb Champlin notifications@github.com wrote:

@rotorboy Can you enable Xdebug DBGP Protocol Debugging in the settings and then send me a copy of your atom debug log with logging set to verbose and all console lines expanded?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

cchamplin commented 6 years ago

Depending on OS you should be able to open it from View -> Developer ->Toggle Developer Tools. Then go to the console.

rotorboy commented 6 years ago

I saved console log as file, included it here, as well as pasted a copy in case the issue tracker doesnt handle includes. I also pasted the TOP part of console window which doesnt seem to be included in log file.

Let me know if this is enough, or if you need more. Any help appreciated as I’m pretty much unable to debug at this point…

Thanks

logger.js? [sm]:55 Atom Debug (PHP Debug) Service registered: Decorator logger.js? [sm]:55 Atom Debug (PHP Debug) Service registered: Actions logger.js? [sm]:55 Atom Debug (PHP Debug) Service registered: Stack logger.js? [sm]:55 Atom Debug (PHP Debug) Service registered: Console logger.js? [sm]:55 Atom Debug (PHP Debug) Service registered: Status logger.js? [sm]:55 Atom Debug (PHP Debug) Service registered: Scope logger.js? [sm]:55 Atom Debug (PHP Debug) Service registered: Watches logger.js? [sm]:55 Atom Debug (PHP Debug) Service registered: Breakpoints logger.js? [sm]:55 Atom Debug (PHP Debug) Service registered: DebugView logger.js? [sm]:55 Atom Debug (PHP Debug) Received Debug UI Services logger.js? [sm]:55 Atom Debug (PHP Debug) Service registered: Debugger logger.js? [sm]:55 Atom Debug (PHP Debug) Service registered: ScopeResolver php-debug.js? [sm]:152 The atom-debug-ui package has been installed logger.js? [sm]:55 Atom Debug (PHP Debug) Service registered: DebugContextView_default logger.js? [sm]:55 Atom Debug (PHP Debug) Listening on *:9000 materialdesignicons-webfont.woff Failed to load resource: net::ERR_FILE_NOT_FOUND logger.js? [sm]:55 Atom Debug (PHP Debug) Session initiated logger.js? [sm]:55 Atom Debug (PHP Debug) Breakpoint Triggered breakpoints.js? [sm]:138 /view_log.php logger.js? [sm]:55 Atom Debug (PHP Debug) Session initiated logger.js? [sm]:55 Atom Debug (PHP Debug) Service registered: DebugContextView_30013 logger.js? [sm]:55 Atom Debug (PHP Debug) Session Ended Object logger.js? [sm]:55 Atom Debug (PHP Debug) Breakpoint Triggered breakpoints.js? [sm]:138 view_log.php

logger.js? [sm]:31 Atom Debug (PHP Debug) Connection error Error: write after end at writeAfterEnd (_stream_writable.js:191:12) at Socket.Writable.write (_stream_writable.js:238:5) at Socket.write (net.js:670:40) at atom/packages/php-debug/lib/engines/dbgp/dbgp-instance.js:329:24 at tryCallTwo (/.atom/packages/php-debug/node_modules/promise/lib/core.js:45:5) at doResolve (/.atom/packages/php-debug/node_modules/promise/lib/core.js:200:13) at new Promise (/.atom/packages/php-debug/node_modules/promise/lib/core.js:66:3) at DbgpInstance.command (/.atom/packages/php-debug/lib/engines/dbgp/dbgp-instance.js:302:12) at DbgpInstance.executeStopDetach (/.atom/packages/php-debug/lib/engines/dbgp/dbgp-instance.js:678:10) at /.atom/packages/php-debug/lib/engines/dbgp/debugging-context.js:361:26 at Function.module.exports.Emitter.simpleDispatch (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/scrollbar-style/node_modules/event-kit/lib/emitter.js:25:14) at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/scrollbar-style/node_modules/event-kit/lib/emitter.js:125:28) at ActionsService.emitAction (/Users/avi/.atom/packages/atom-debug-ui/lib/services/actions.js:563:19) at UnifiedView.destroy (.atom/packages/atom-debug-ui/lib/unified/debug-ui-unified-view.js:160:42) at UnifiedView.dispose (/.atom/packages/atom-debug-ui/lib/ui/component.js:45:10) at /Applications/Atom.app/Contents/Resources/app/node_modules/event-kit/lib/composite-disposable.js:27:35 at Set.forEach (native) at CompositeDisposable.module.exports.CompositeDisposable.dispose (/Applications/Atom.app/Contents/Resources/app/node_modules/event-kit/lib/composite-disposable.js:26:32) at PanelManager.destroy (/.atom/packages/atom-debug-ui/lib/unified/debug-ui-unified-view.js:188:24) at DebugContextViewService.destroy (//.atom/packages/atom-debug-ui/lib/services/debugcontextview.js:372:27) at /.atom/packages/atom-debug-ui/lib/services/debugview.js:56:27 at Function.module.exports.Emitter.simpleDispatch (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/scrollbar-style/node_modules/event-kit/lib/emitter.js:25:14) at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/scrollbar-style/node_modules/event-kit/lib/emitter.js:125:28) at /.atom/packages/php-debug/lib/engines/dbgp/engine.js:199:21 at Function.module.exports.Emitter.simpleDispatch (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/scrollbar-style/node_modules/event-kit/lib/emitter.js:25:14) at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/scrollbar-style/node_modules/event-kit/lib/emitter.js:125:28) at DbgpInstance.stop (/.atom/packages/php-debug/lib/engines/dbgp/dbgp-instance.js:42:21) at DbgpInstance.executeDetach (/.atom/packages/php-debug/lib/engines/dbgp/dbgp-instance.js:674:14) at /.atom/packages/php-debug/lib/engines/dbgp/debugging-context.js:346:26 at Function.module.exports.Emitter.simpleDispatch (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/scrollbar-style/node_modules/event-kit/lib/emitter.js:25:14) warn @ logger.js? [sm]:31 logger.js? [sm]:55 Atom Debug (PHP Debug) Session Ended Object logger.js? [sm]:55 Atom Debug (PHP Debug) Connection Closed logger.js? [sm]:55 Atom Debug (PHP Debug) Connection Closed logger.js? [sm]:55 Atom Debug (PHP Debug) Session initiated logger.js? [sm]:55 Atom Debug (PHP Debug) Breakpoint Triggered breakpoints.js? [sm]:138 view_log.php

On May 7, 2018, at 10:15 AM, Caleb Champlin notifications@github.com wrote:

Depending on OS you should be able to open it from View -> Developer ->Toggle Developer Tools. Then go to the console.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/gwomacks/php-debug/issues/283#issuecomment-387078665, or mute the thread https://github.com/notifications/unsubscribe-auth/AhPDqHMDsfLzN4xbvRaBnCHA0FTALyyrks5twFcLgaJpZM4T0ZCS.

someguy314 commented 6 years ago

I have the same problem as well, with php-debug 0.3.3 and atom 1.26.1. My debug output: gist Everything before "now clicking on Step Over" is from starting the request in the browser to stopping at the breakpoint. After that is when I clicked on Step Over. This disables the Continue/Step Over etc buttons, only Stop and Detach remain clickable. But the line of the break point is still highlighted and the browser is still stuck loading.

cchamplin commented 6 years ago

Thanks for the debugging information v0.3.4 just landed which should hopefully take care of it.

rotorboy commented 6 years ago

Hey Caleb;

Thanks for getting on that so quickly. Indeed things seem to be functioning again, which brings up the other issue I had related to the additional atom-debug-ui package that is now required.

There are now THREE sets of controls for debugging, two which are clearly part of php-debug (the classic lower panel and the new control bar), but there is now a separate “debugger” menu that seems to be more “UI” than “debugger”, but when I try to attach and/or launch a debugger it says “no debugger found”, even though I have php-debug obviously installed. What am I missing here?

Also I see there is now a “path maps” button, but I’m not clear on what paths are even about and the documentation is very scant on this. Is there somewhere to find out what this does for me? Also there was mention of now being able to attach to multiple processed (eg. say an ajax call comes in to apache…would be nice to attach to the process handling that call) but again unable to find any documentation on that.

Any pointers on the above very much appreciated.

Thanks again for getting the basic functionality back on...

On May 7, 2018, at 8:20 PM, Caleb Champlin notifications@github.com wrote:

Thanks for the debugging information v0.3.4 just landed which should hopefully take care of it.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/gwomacks/php-debug/issues/283#issuecomment-387245610, or mute the thread https://github.com/notifications/unsubscribe-auth/AhPDqEdODnVsP_ckOxdvj_W_kDn5jelHks5twOS-gaJpZM4T0ZCS.

cchamplin commented 6 years ago

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.

Path maps are for mapping between files on your local host and remote code being debugged on another server. If you are just debugging locally they should auto populate and you shouldn't need to worry about them.

For the multi-session support if the option is enabled in the settings whenever another debug session is started (apache/php-cli/etc) it should open new windows automatically in atom. If this is not working you may need to investigate your xdebug version/settings.

rotorboy commented 6 years ago

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.

yes, that explains that. Thanks.

Path maps are for mapping between files on your local host and remote code being debugged on another server. If you are just debugging locally they should auto populate and you shouldn't need to worry about them.

yeah, seemed like there was some aspect of remote debugging involved with this, but since Im working only with local it all seems ok.

For the multi-session support if the option is enabled in the settings whenever another debug session is started (apache/php-cli/etc) it should open new windows automatically in atom. If this is not working you may need to investigate your xdebug version/settings.

ah ok. I opened a file that handles ajax calls made every 10 seconds (polling) and set a break point, and indeed execution does seem to stop on the first ajax call. However, as you mentioned the repeated call seems to generate a new debug session every 10 seconds, and that seems to lock up the ui in Atom until I turn off debugging in the browser.

I grabbed the console logs and there seem to be some errors (looks like atom / php-debug uses backbone, so I see some emitter problems). Ive included it here, but if you want I can open another bug if you think its worthwhile doing so…

Thanks again for the help.

someguy314 commented 6 years ago

With v0.3.4 debugging is now working on my system as well, thanks.

ghost commented 6 years ago

I'm also finding it very confusing with three different debug packages and nothing seems to work anymore.

I tried disabling the atom-ide-ui but now I can't make breakpoints with the mouse. I use the context menu but the xdebug no longer works!

Can we have things back to how they were please?

Is there a way to install the OLD PHP-Debug package?