I found that it may not be related directly to global variables. I did a small project (1 php file) and it is working perfectly, no debugger hang.
In fact, the hang I am experimenting is when I debug a WordPress site. By example, on WordPress core file /wp-blog-header.php, if I hit "Step Over" before calling wp() function on the code below, debugger is hanging indefinitely.
- Code: Select all
if ( !isset($wp_did_header) ) {
$wp_did_header = true;
require_once( dirname(__FILE__) . '/wp-load.php' );
wp();
require_once( ABSPATH . WPINC . '/template-loader.php' );
}
Something interesting, I found that each time the tooltip for a variable (when I put my mouse cursor over a variable) is saying "Loading...", the next time I hit "Step Over" (or another debug buttons), the problem occurs and the debugger hangs. By example, in the code above, it happens when I am on the first require_once line. In other words, after hitting "Step Over" on that line, it is impossible to get value for variable
$wp_did_header and if I hit "Step Over" again, it hangs.