[{"ID":"136080D0-EC73-4AFB-99B3-E9A8C9E620A6","title":"aff - python","tags":"python debug","date":"13\/03\/2018","timestamp":"1520944033","rss_date":"Tue, 13 Mar 2018 13:27:13 +0100","status":"public","dependency":"","source":"http:\/\/warriordudimanche.net","content":"# aff(var)\r\ndef aff(var):\r\n\timport pprint\r\n\tpprint.pprint(var)"},{"ID":"F8F9D784-5FE3-424C-8E24-E3F7FA8CBF4C","title":"aff v2.0","tags":"debug fonctions php","date":"27\/02\/2016","timestamp":"1456580374","rss_date":"Sat, 27 Feb 2016 14:39:34 +0100","status":"public","dependency":"","source":"","content":"\tfunction aff($var,$stop=true){\r\n\t\t$dat=debug_backtrace();$origin='
'.$dir.'<\/em><\/td>'.$fil.'<\/em><\/td> | '.$data['function'].'()<\/em><\/td> | '.$data['line'].'<\/em> <\/td><\/tr>';\r\n\t\t}\r\n\t\t$origin.='<\/table>';\r\n\t\techo ' | '.$origin.'<\/div>';\r\n\t\tif ($stop){exit();}\r\n\t}"},{"ID":"B127B931-0A5B-4078-9410-EEF05126E77B","title":"Forcer l'affichage des erreurs","tags":"astuce debug php","date":"22\/03\/2015","timestamp":"1427030237","rss_date":"Sun, 22 Mar 2015 14:17:17 +0100","status":"public","dependency":"","source":"http:\/\/blog.medev.ch\/content\/afficher-les-erreurs-php","content":""},{"ID":"7C9ED99C-6882-4462-B628-9D0141EAE452","title":"afficher variables, fonctions et constantes d\u00e9clar\u00e9es","tags":"astuce debug php","date":"04\/01\/2014","timestamp":"1388854918","rss_date":"Sat, 04 Jan 2014 18:01:58 +0100","status":"public","dependency":"","source":"http:\/\/php.net\/manual\/fr\/function.get-defined-vars.php","content":"\/\/afficher toutes les variables d\u00e9clar\u00e9es\r\nexit(' ' . htmlspecialchars(print_r(get_defined_vars(), true)) . '<\/pre>');\r\n\/\/afficher toutes les constantes d\u00e9clar\u00e9es\r\nexit('' . htmlspecialchars(print_r(get_defined_constants(), true)) . '<\/pre>');\r\n\/\/afficher toutes les fonctions d\u00e9clar\u00e9es\r\nexit('' . htmlspecialchars(print_r(get_defined_functions(), true)) . '<\/pre>');"},{"ID":"507A1BC7-8853-491A-B69C-007FD2786B77","title":"bloquer la diffusion des erreurs et r\u00e9agir (m\u00eame les fatales)","tags":"php astuce debug","date":"08\/06\/2013","timestamp":"1370711017","rss_date":"Sat, 08 Jun 2013 19:03:37 +0200","status":"public","dependency":"","source":"http:\/\/stackoverflow.com\/questions\/6861033\/how-to-catch-the-fatal-error-maximum-execution-time-of-30-seconds-exceeded-in-p","content":"ini_set('display_errors', '0'); \r\nregister_shutdown_function('shutdown');\r\nfunction shutdown() \r\n{ \r\n $error = error_get_last();\r\n if ($error['type'] === E_ERROR) {\r\n\r\n \/\/do your shutdown stuff here\r\n \/\/be care full do not call any other function from within shutdown function\r\n \/\/as php may not wait until that function finishes\r\n \/\/its a strange behavior. During testing I realized that if function is called \r\n \/\/from here that function may or may not finish and code below that function\r\n \/\/call may or may not get executed. every time I had a different result. \r\n\r\n \/\/ e.g.\r\n\r\n other_function();\r\n\r\n \/\/code below this function may not get executed\r\n\r\n } \r\n\r\n} "},{"ID":"7A7D1DB5-BE1A-4910-9EB0-CCEAA3304952","title":"Fonction d'arr\u00eat et de d\u00e9buggage: AFF()","tags":"php fonctions debug","date":"21\/05\/2013","timestamp":"1369123739","rss_date":"Tue, 21 May 2013 10:08:59 +0200","status":"public","dependency":"","source":"","content":"function aff($a,$stop=true){echo 'Arret a la ligne '.__LINE__.' du fichier '.__FILE__.'';var_dump($a);echo '<\/pre>';if ($stop){exit();}}\r\n"},{"ID":"1B1CC98F-D101-4E55-8511-6E44BC057D94","title":"n_print: tracer les variables sans exit();","tags":"php fonctions debug","date":"24\/04\/2013","timestamp":"1366834660","rss_date":"Wed, 24 Apr 2013 22:17:40 +0200","status":"public","dependency":"","source":"http:\/\/shaarlet.knah-tsaeb.org\/?HsF04A","content":"', $name, '<\/h2>';\r\necho ' |