Описание тега debug-print
Debug print may refer to any method of debugging application using simple text output.
Simple text debugging methods differ between programing languages.
Javascript
In javascript, developers usually use alert
function to get the variable contents or the console.log
(may not be browser compatible) method. The latter has the advantage of being non-blocking. Using alert is only possible for small amounts of data since we must confirm each dialog.
PHP
In PHP echo
, print_R
and var_dump
are used to debug. Statement echo
only outputs text, but latter two functions are also formatting complicated variable strictures (arrays, objects).
C++
In C++ std::cout
is used to output data to console. The iostream library must be included to do so.