Without actually doing some debugging, I guess you can't be certain that a debugger is working.
But you can be pretty sure -- I guess one should assume that if some aspects of xDebug are working then it would all be working.
Given that, you can confirm that xDebug is installed and in place by trying the following:
1) phpinfo()
-- this will show you all the extensions that are loaded, including xDebug. If it is there, then it's a safe bet that it's working.
2) If that isn't good enough for you, you can try using the var_dump()
function. xDebug modifies the output of var_dump()
to include additional information. If this is in place, then xDebug is working.
3) xDebug modifies PHP's error output. If your program crashes with xDebug in place, you'll get more information about the failure than with the standard PHP crash output.
4) xDebug also adds a number of helper functions to PHP. You could try any of these to see if it's working. For example, the function xdebug_get_code_coverage()
should exist and return an array. If it does, then xDebug is installed. If not, it isn't.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…