Page 2 of 3

Re: Debugger doesn't brake whatever I do

PostPosted: April 6th, 2018, 12:01 pm
by Miloslav Beno
I've tried very similar setup and it works.

- It's not fault of PHP 5.3 or Xdebug 2.2.6
- It's not caused by path mapping ( but you can try to turn off manual path mapping just to see if automatic path mapping will find where to break )
- mklink is fine too

Could you also please try to send us activitylog from VS? Just to check something strange is not there. https://docs.devsense.com/troubleshooting/activitylog-xml

Re: Debugger doesn't brake whatever I do

PostPosted: April 9th, 2018, 12:39 pm
by WaldemarHasz
Hi Miroslav

Ok it took a week for me to update the project, so now we have PHP 5.6, XDebug 2.5.5 and PHP tools 1.27.10732. Unfortunately there is no difference.. attached the xdebug log file.

The VS also acts the same...

Auto-attach to process '[6068] PHP.Debugger.Systray.exe' on machine 'WALDEMAR-PC' succeeded.
Mapping dir "E:\Podjetja\Nevron\Hospitality Interface\Design\PHP - VS2017\Iptv\Source" to "file:///var/www/portal/library/Iptv"
Mapping dir "E:\Podjetja\Nevron\Hospitality Interface\Design\PHP - VS2017\Zend\Source" to "file:///opt/ZendFramework-1.12.17/library/Zend"
Mapping dir "E:\Podjetja\Nevron\Hospitality Interface\Design\PHP - VS2017\Doctrine\Source" to "file:///var/www/portal/library/Doctrine"
Mapping dir "E:\Podjetja\Nevron\Hospitality Interface\Design\PHP - VS2017\Manager\Source" to "file:///var/www/portal/application"
Auto-attach to process '[10072] php_remote.exe' on machine 'WALDEMAR-PC' succeeded.
The program '[10072] php_remote.exe' has exited with code -1 (0xffffffff).
Auto-attach to process '[8996] php_remote.exe' on machine 'WALDEMAR-PC' succeeded.
The program '[8996] php_remote.exe' has exited with code -1 (0xffffffff).
....

I'll try auto mapping, but as much as I remember it didn't work a year ago... will inform.

Best regards
Waldemar

Re: Debugger doesn't brake whatever I do

PostPosted: April 9th, 2018, 12:41 pm
by WaldemarHasz
Will also send activity log... give me 2h.. lunch,..

BrW

Re: Debugger doesn't brake whatever I do

PostPosted: April 9th, 2018, 2:26 pm
by WaldemarHasz
Activity.xml.. started VS, started Debugger, executed command that should start the debug, stopped Debugger, closed VS

This is suspicious:

<entry>
<record>1097</record>
<time>2018/04/09 14:23:38.707</time>
<type>Error</type>
<source>PHP.Debugger.PhpProcess</source>
<description>System.UriFormatException: Invalid URI: The format of the URI could not be determined.&#x000D;&#x000A; at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind)&#x000D;&#x000A; at System.Uri..ctor(String uriString)&#x000D;&#x000A; at PHP.VisualStudio.Debugger.PhpProcess.HandleStepDone(ResponseMessage msg)&#x000D;&#x000A; at PHP.VisualStudio.Debugger.PhpProcess.DebugEventThread()</description>
</entry>


BrW

Re: Debugger doesn't brake whatever I do

PostPosted: April 9th, 2018, 2:40 pm
by WaldemarHasz
Auto mapping:

Couldn't map "file:///var/www/portal/tools/iptv" to local project. Please check if the "iptv" exists and it's included in your project.
There wasn't established any directory mapping. Debugging most likely won't work correctly.
Auto-attach to process '[11196] php_remote.exe' on machine 'WALDEMAR-PC' succeeded.
The program '[11196] php_remote.exe' has exited with code -1 (0xffffffff).
Couldn't map "file:///var/www/portal/public/manager/index.php" to local project. Please check if the "index.php" exists and it's included in your project.
There wasn't established any directory mapping. Debugging most likely won't work correctly.
Auto-attach to process '[11176] php_remote.exe' on machine 'WALDEMAR-PC' succeeded.
The program '[11176] php_remote.exe' has exited with code -1 (0xffffffff).

Take notice that my setup is like:
1. Windows with VS2017
2. Project defined on windows disk with multiple mklink-s defined to shared Linux folder
3. Environment run in linux VM

So there is no "file:///var/www/portal/tools/iptv" folder or anything like that available i.e. without manual mapping nothing would work.

BrW

Re: Debugger doesn't brake whatever I do

PostPosted: April 9th, 2018, 3:17 pm
by WaldemarHasz
Is there an option in "Php Tools" to enable break on any exception.. like in VisualStudio Code?

In VSCode I had to change the mklink source folder to direct shared mapping "\\192.168.200.254\Root\var\www\portal" or the breakpoint would not be fired. VSCode acted as if there were two different minute.php files.. the one through Source link and the shared one.

I'm trying to define direct mapping in VS too... will inform how it will go.

BrW

Re: Debugger doesn't brake whatever I do

PostPosted: April 10th, 2018, 8:26 am
by Miloslav Beno
Hi Waldemar,

Thanks for trying all of this.

I think this will be related to the issue: System.UriFormatException: Invalid URI: The format of the URI could not be determined

What we can try is to attach another Visual Studio to the VS that debugges PHP, and break on this exception and examine variables.

If you want we can do it together through teamviewer. One more question Do you have the latest stable PHP Tools?

Btw. Break on exception is supported in PHP Tools https://docs.devsense.com/debugging/exceptions

Thanks!

Re: Debugger doesn't brake whatever I do

PostPosted: April 10th, 2018, 9:50 am
by WaldemarHasz
Hi Miloslav

Yes we can do it, the same way as last time over the TV, so you can get the control and check what is wrong. Have send you an email and you can ping me over Skype.

BrW
p.s. Yes I have the latest one.. just installed it yesterday.

Re: Debugger doesn't brake whatever I do

PostPosted: April 10th, 2018, 10:08 am
by WaldemarHasz
Hi Miloslav

I'm managed to make it work.. the issue that one of the VS updates changed how the links are processed, so that mklinks were replaced by direct shared links and as they were not defined in the mappings the breakpoints were not triggered.

Anyway the last PHP Tools works ok with the shared links... well for some reason everything VS behaves more slowly like this. But at least it's working.

Now if we can pinpoint the reason for slow behavior all would be back to normal.

BrW

Re: Debugger doesn't brake whatever I do

PostPosted: April 11th, 2018, 9:05 am
by jensa
Hi,

Im having the exact same problems, same output in activitylog.

Pls tell me how to solve this issue.

rgds