Debugger crash after variable peek
4 posts
• Page 1 of 1
Debugger crash after variable peek
Hi,
When I am debugging and I hold the mouse over a variable to peek at the value, the value is displayed, but if I hit F10 to step to the next line, or I continue, the debugger crashes. I.e. does not run step to the next line or continue. FireFox will display 'connection interrupted'
I can view variable values via the locals window, or a watch without a problem but it always crashes if I peek at the value.
I have the same issue in VS2012 & VS 2013, using either v1.9.4736 or v1.8.4704
Any ideas what is wrong?
Thanks
When I am debugging and I hold the mouse over a variable to peek at the value, the value is displayed, but if I hit F10 to step to the next line, or I continue, the debugger crashes. I.e. does not run step to the next line or continue. FireFox will display 'connection interrupted'
I can view variable values via the locals window, or a watch without a problem but it always crashes if I peek at the value.
I have the same issue in VS2012 & VS 2013, using either v1.9.4736 or v1.8.4704
Any ideas what is wrong?
Thanks
- Jason54
- Posts: 3
- Joined: November 5th, 2013, 5:45 am
Re: Debugger crash after variable peek
Hi Jason,
Do you have some code sample I can try to see the issue?
Thanks,
Do you have some code sample I can try to see the issue?
Thanks,
Miloslav Beno │ DEVSENSE s.r.o. │ @miloslavbeno │ miloslav@devsense.com
-
Miloslav Beno - Posts: 1252
- Joined: January 7th, 2012, 8:36 pm
Re: Debugger crash after variable peek
Hi There,
In trying to isolate when it happens, it seems to be to do with when there is an error handler.
Please try the code below.
Set a break point at the line "echo 'set break point here';".
When the debugger breaks, hold the mouse over 'aaa' to view the value. It should show you '22' but it shows 'null'. Now hit F10 and you won't get to the next line. If you were to hit F10 without mousing over the member, you would get to the next line no problem.
If I remove the 'exit()' from the end of the error function, it does not crash.
So it seems that the error function may be triggered in the background when peeking at a class member value, because without the 'exit()' we don't crash the debugger, but it still doesn't show the correct value of '22' it shows the member name 'aaa'.
Thanks,
Jason
In trying to isolate when it happens, it seems to be to do with when there is an error handler.
Please try the code below.
Set a break point at the line "echo 'set break point here';".
When the debugger breaks, hold the mouse over 'aaa' to view the value. It should show you '22' but it shows 'null'. Now hit F10 and you won't get to the next line. If you were to hit F10 without mousing over the member, you would get to the next line no problem.
If I remove the 'exit()' from the end of the error function, it does not crash.
So it seems that the error function may be triggered in the background when peeking at a class member value, because without the 'exit()' we don't crash the debugger, but it still doesn't show the correct value of '22' it shows the member name 'aaa'.
Thanks,
Jason
- Code: Select all
<?php
function errorFunction($error_level, $error_message, $error_file, $error_line, $error_context)
{
echo 'error handling';
exit();
}
set_error_handler('errorFunction');
$a = new stdClass();
$a->aaa = 22;
echo 'set break point here';
echo 'will not reach this line';
?>
- Jason54
- Posts: 3
- Joined: November 5th, 2013, 5:45 am
Re: Debugger crash after variable peek
Hi Jason,
Thank you so much for the code! I've been able to replicate the issue. It seems set_error_handler turns xdebug into some wrong state.
Anyway we've designed solution for this in our code and it will be available in the upcoming update.
Thanks again,
Thank you so much for the code! I've been able to replicate the issue. It seems set_error_handler turns xdebug into some wrong state.
Anyway we've designed solution for this in our code and it will be available in the upcoming update.
Thanks again,
Miloslav Beno │ DEVSENSE s.r.o. │ @miloslavbeno │ miloslav@devsense.com
-
Miloslav Beno - Posts: 1252
- Joined: January 7th, 2012, 8:36 pm
4 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 202 guests