robertbasic / pugdebug

pugdebug is a standalone debugging client for PHP applications that uses XDebug as the debugging engine.
http://pugdebug.com/
Other
73 stars 15 forks source link

Files show as blank in centre pane (Win version) #157

Open ucavus opened 9 years ago

ucavus commented 9 years ago

I am receiving remote connections, and pugdebug responds correctly but the files it shows are showing as blank when it hits a breakpoint. If I open a file manually from the File Explorer pane, the code is shown. If I open the same file that's showing as blank, from the explorer pane, it opens in a new, separate tab. If I first open the file to debug and set a breakpoint, when the breakpoint is reached and new blank tab is opened, again with the same name.

I can see variables, etc. so it's not entirely useless.

My settings are like below, where L: is the local mapping of a network share and R: is the physical drive on the development server. There are multiple web roots in paths below the share but it's easier to have a single project set up for the entire server. The paths often have spaces in the folder names, if that's an issue (I've seen lots of shell scripts and some OS software fail because of this).

pug-settings

robertbasic commented 9 years ago

Sounds like resolving the path maps is not working correctly.

Could you maybe set the remote_log setting for xdebug, try debugging with pugdebug, and attach xdebug's log file after? Thanks

ucavus commented 9 years ago

Redacted personal info but ensured directory separators are exactly as they were (in case that makes a difference).

Log opened at 2015-07-17 05:20:37
I: Checking remote connect back address.
I: Remote address found, connecting to 192.168.8.181:4321.
I: Connected to client. :-)
-> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" fileuri="file:///R:/path/to/share/path/to/project/index.php" language="PHP" protocol_version="1.0" appid="3392" idekey="pugdebug"><engine version="2.2.7"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[http://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2015 by Derick Rethans]]></copyright></init>

<- feature_set -i 1 -n max_depth -v 10
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="1" feature="max_depth" success="1"></response>

<- feature_set -i 2 -n max_children -v 128
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="2" feature="max_children" success="1"></response>

<- feature_set -i 3 -n max_data -v 512
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="3" feature="max_data" success="1"></response>

<- breakpoint_set -i 4 -t line -f R:\path\to\share\path/to/project/dir/file.php -n 239
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="4" id="33920001"></response>

<- breakpoint_list -i 5
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_list" transaction_id="5"><breakpoint type="line" filename="file:///R:/path/to/share/path/to/project/dir/file.php" lineno="239" state="enabled" hit_count="0" hit_value="0" id="33920001"></breakpoint></response>

<- run -i 6
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="run" transaction_id="6" status="break" reason="ok"><xdebug:message filename="file:///R:/path/to/share/path/to/project/dir/file.php" lineno="239"></xdebug:message></response>

<- context_names -i 7
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="context_names" transaction_id="7"><context name="Locals" id="0"></context><context name="Superglobals" id="1"></context></response>

<- context_get -i 8 -c 0
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="context_get" transaction_id="8" context="0">REDACTED</response>

<- context_get -i 9 -c 1
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="context_get" transaction_id="9" context="1">REDACTED</response>

<- stack_get -i 10
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="stack_get" transaction_id="10"><stack where="getContentMain" level="0" type="file" filename="file:///R:/path/to/share/path/to/project/dir/file.php" lineno="239"></stack><stack where="{main}" level="1" type="file" filename="file:///R:/path/to/share/path/to/project/index.php" lineno="1077"></stack></response>
ucavus commented 9 years ago

Changing my local settings to use forward-slashes as directory separators fixed the blank files issue. Not having a great deal of luck with the program, though. If I press buttons in the wrong order, or something, the communication hangs. The program still responds, like buttons being pressable, but no further debugging info seems to be sent/received.

robertbasic commented 9 years ago

Sorry, I was away from the keyboard for the past 2 weeks.

Thanks for the logs, I'll fix it to not matter if it's forward or backwards slashes.

I'm aware and admit the program is not 100% polished, but working on making it better :)

Thanks again!