Debugging php eval instruction

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

Debugging php eval instruction

Postby msalas » January 9th, 2019, 9:48 am

Hello,
I have been using PHP tools for visual studio for more than a year now.
I'm currently using version 1.29.11015.2017 and php 7.0 (windows 10).

In one of my projects, I create a command line dynamically and evaluate
that instruction with php command "eval".In the past, at some point I was able to set a break point in the eval line of my program, and by pressing F11 in
MS Visual studio, I was able to trace the instruction (function) that was being evaluated.

Currently, if I try to do that, it is only sending me an error:
The program '[13572] php.exe' has exited with code -1 (0xffffffff).

Is there an issue of an update of "php tools for visual studio" or you reckon
is a problem with my settings?

Thanks
msalas
 
Posts: 1
Joined: January 9th, 2019, 9:27 am

Re: Debugging php eval instruction

Postby maros.beno » January 9th, 2019, 12:51 pm

Hi,
if I understand you correctly, when you have a script such as this:

<?php
function hello()
{
echo "hello";
}

eval("hello();");

and put a breakpoint inside hello function, visual studio will not break on this breakpoint for you? It does that for me, so i think it's something with your code. It really depends on multiple factors like xdebug version, php version etc. But in default this should work, so i suspect your settings.
Maroš Beňo
User avatar
maros.beno
 
Posts: 61
Joined: October 12th, 2016, 12:11 pm


Return to PHP Tools

Who is online

Users browsing this forum: No registered users and 4 guests

User Control Panel

Login

Who is online

In total there are 4 users online :: 0 registered, 0 hidden and 4 guests (based on users active over the past 5 minutes)
Most users ever online was 89 on October 15th, 2018, 4:06 pm

Users browsing this forum: No registered users and 4 guests
Phalanger