Package: pugdebug
Pugdebugpugdebug is a standalone debugging client for PHP applications that uses Xdebug (3) as the debugging engine.NOTE: This is the official fork!Install pugdebugInstall from pippip install pugdebugInstall from sourcepip install -r requirements.txtGenerate single executableRequirepyinstallerand you can usebuild-pyinstaller.shorbuild-pyinstaller.batbased on your system.Using pugdebug./app.pySettingsTo bring up theSettingswindow, navigate toFiles -> Settings(shortcut:Ctrl+S).Path settingsThePathsection refers to the path settings.TheRootunder thePathsection is the root path where the project you want to debug is located.TheMaps fromunder thePathsection is for when the project you want to debug is under a virtual machine, like Vagrant. Here you would enter the path of the project under that VM.For example, if a project I'm working on is in/home/robert/wwww/pugdebugand that maps to/var/wwwunder the VM, theRootwould be set to/home/robert/www/pugdebugand theMaps fromwould be set to/var/www.Debugger settingsTheHostsetting should be the IP address of the machine on which pugdebug runs. In most cases (like vagrant) it is perfectly fine to leave this field blank.ThePortsetting is the port number on which Xdebug will attempt to connect to the machine on which pugdebug runs. The default port is9003.TheIDE Keysetting allows to filter out messages from Xdebug based on this value.Break at first linetells the debugger should it break on the first line or not (on CMS is better to disable it).Max depth,Max childrenandMax datasettings control the amount of information about variables is retrieved from Xdebug.HotkeysF1- Start ListeningF2- Stop ListeningF3- StopF4- DetachF5- RunF6- Step OverF7- Step InF8- Step OutCtrl+N- New projectCtrl+F- SearchCtrl+T- Search for fileCtrl+G- Go to lineCtrl+S- Show settingsAlt+F4- Exit applicatione- Open the file opened in your editor (based on the settings)FAQDebugging sessionsTo start debugging, click theStart listeningbutton in the top left corner.pugdebug then listens to all connections on thePortprovided, and if the connection has theIDE Keymatching with what is configured, it will start debugging the PHP request from that connection.In the case if there is already a debugging in progress, the new connection will be queued and once the debugging of the current connection is done, the new one will be debugged.This allows pugdebug to debug multiple requests (think ajax).Load a web project in a browser and start aHTTP debugging session.pugdebug should pick up that request and display the index file of the web project, while stopping the execution on the first line.Using theRun,Over,In,Outcontinuation commands allows stepping through the PHP code.Setting breakpoints is possible by double clicking the line where a breakpoint is needed.The correspoding line number should be highlighted and a new breakpoint should be listed in the breakpoint viewer (bottom right corner).Double clicking the line with a breakpoint should remove that breakpoint.TheStopaction will stop debugging the current request and tell Xdebug to stop further execution of the PHP script that is being debugged.TheDetachaction will detach the debugger from the current request, which allows to stop debugging but also let the PHP script finish as it normally would.TheStop listeningaction will tell pugdebug to stop listening to new incomming connections.Setting up the development environmentSetting up the development environment should be needed only when you want to help out with developing pugdebug itself.The main dependencies are Python 3.7/9,QT5,SIPandPyQt5.WordPressAs WordPress uses a hook systemBreak on the first linecan create issues because open the first file and not where it is the breakpoint as example, so it is better to disable that option.