Debugging static functions

Project:VS.Php for Visual Studio 2008
Component:Miscellaneous
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

In a file functions.inc I have a class functions with a static function relocate.
Code:

class functions
{
public static function relocate($path, $page)
{
echo "<SCRIPT LANGUAGE='JavaScript'>";
echo "<!-- This script and many more are available free online at -->\n";
echo "<!-- The JavaScript Source!! http://javascript.internet.com -->\n";
echo "<!-- Begin\n";
echo "window.location='".$path.$page."';\n";
echo "// End -->\n";
echo "</script>\n";
echo "<noscript>\n";
echo "It appears that your browser does not support JavaScript, or you have it disabled.";
echo "This site is best viewed with JavaScript enabled.";
echo "<p>If JavaScript is disabled in your browser, please turn it back on then reload this page.</p>";
echo "<p>Or, if your browser does not support JavaScript, click <a href='".$path.".php'>here</a>.</p>";
echo "</noscript>\n";
}
}

So when ever I make the call to functions::relocate the debugger hangs at the call location not in function itself. I have to go to the task manager and kill the vsphp debugger process to regain control.

Michael Wildman

Comments

    Michael, Interesting. I seen

    Michael,

    Interesting. I seen some problems here. Let me work a bit on it and I'll let you know what I find. I hope I can have a fix very soon.

    thanks

    Michael, This

    Michael,

    This build:

    http://www.jcxsoftware.com/jcx/vsphp/beta

    fixes the hang but it still does not like stepping in a line of code that has a static function. This is XDebug who's not liking it. I need to check with the xdebug guys to see why this might happen.

    stall

    This may be related to this bug - I notice that the IDE frequently stalls for about 15 seconds while editing files that make calls to static methods - extremely annoying.

    I ran ntfilemon to see what was happening and it appears that devenv.exe is looking for files that match static method names. For example i have the following in a line of code:

    parent::OnSave();

    I see in the filemon logs that VS is repeatedly looking for a file "parent.php" during the stall and the OS is returning numerous "file doesn't exist" errors.

    I am using the beta version you posted and it is seems to have made only a very minor improvement as far as I can tell.

    Are you seen this during

    Are you seen this during debugging or during editing?

    Which version did you try?