Debugger doesn't brake whatever I do

PHP Tools [?] extends Visual Studio with set of advanced features to work more efficiently with PHP code.

Re: Debugger doesn't brake whatever I do

Postby Miloslav Beno » April 6th, 2018, 12:01 pm

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
Miloslav Beno │ DEVSENSE s.r.o. │ @miloslavbenomiloslav@devsense.com
User avatar
Miloslav Beno
 
Posts: 1252
Joined: January 7th, 2012, 8:36 pm

Re: Debugger doesn't brake whatever I do

Postby WaldemarHasz » April 9th, 2018, 12:39 pm

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
You do not have the required permissions to view the files attached to this post.
WaldemarHasz
 
Posts: 22
Joined: December 3rd, 2017, 9:14 pm

Re: Debugger doesn't brake whatever I do

Postby WaldemarHasz » April 9th, 2018, 12:41 pm

Will also send activity log... give me 2h.. lunch,..

BrW
WaldemarHasz
 
Posts: 22
Joined: December 3rd, 2017, 9:14 pm

Re: Debugger doesn't brake whatever I do

Postby WaldemarHasz » April 9th, 2018, 2:26 pm

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
You do not have the required permissions to view the files attached to this post.
Last edited by WaldemarHasz on April 9th, 2018, 2:48 pm, edited 1 time in total.
WaldemarHasz
 
Posts: 22
Joined: December 3rd, 2017, 9:14 pm

Re: Debugger doesn't brake whatever I do

Postby WaldemarHasz » April 9th, 2018, 2:40 pm

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
WaldemarHasz
 
Posts: 22
Joined: December 3rd, 2017, 9:14 pm

Re: Debugger doesn't brake whatever I do

Postby WaldemarHasz » April 9th, 2018, 3:17 pm

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
WaldemarHasz
 
Posts: 22
Joined: December 3rd, 2017, 9:14 pm

Re: Debugger doesn't brake whatever I do

Postby Miloslav Beno » April 10th, 2018, 8:26 am

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!
Miloslav Beno │ DEVSENSE s.r.o. │ @miloslavbenomiloslav@devsense.com
User avatar
Miloslav Beno
 
Posts: 1252
Joined: January 7th, 2012, 8:36 pm

Re: Debugger doesn't brake whatever I do

Postby WaldemarHasz » April 10th, 2018, 9:50 am

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.
WaldemarHasz
 
Posts: 22
Joined: December 3rd, 2017, 9:14 pm

Re: Debugger doesn't brake whatever I do

Postby WaldemarHasz » April 10th, 2018, 10:08 am

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
WaldemarHasz
 
Posts: 22
Joined: December 3rd, 2017, 9:14 pm

Re: Debugger doesn't brake whatever I do

Postby jensa » April 11th, 2018, 9:05 am

Hi,

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

Pls tell me how to solve this issue.

rgds
jensa
 
Posts: 8
Joined: May 12th, 2017, 1:14 pm

PreviousNext

Return to PHP Tools

Who is online

Users browsing this forum: No registered users and 36 guests

cron

User Control Panel

Login

Who is online

In total there are 36 users online :: 0 registered, 0 hidden and 36 guests (based on users active over the past 5 minutes)
Most users ever online was 256 on March 28th, 2024, 9:42 am

Users browsing this forum: No registered users and 36 guests