Debugging Using a Log-file (esp. Shopware)

Shopware Partner – euroblaze StuttgartWe have been using a debugging method which we found useful while programming shops using the Shopware-Framework where its really difficult to see the SQL query or var_dump() results on browser. The trick is to place a file called “mylog.txt” (or any other name) in the root folder. Then while doing any debug test write your output or query or request string to this file..

One such example is as below:

$myfile = fopen("mylog.txt", "a+") or die("Unable to open file!");
fwrite($myfile, $select . "\n-----------------------------------\n");
fclose($myfile);

This way you will have your own log for debugging. As I found all the errors are not reported in OXID or Shopware default Log file.

PS: Don’t forget to delete this file once you have submitted your project, since it is just for debugging purpose.

nebiz logo

Industriestraße 24b D-70565 Stuttgart – Deutschland

Tel. +49-711-7947-2394 Email. beratung@nebiz.de

© 2018 NEBIZ®

Über uns

NEBIZ® ist Ihr Partner für die Entwicklung erfolgreicher e-Commerce Lösungen. Wir liefern Ihnen leistungsfähige Technik und sinnvolle Beratung, damit Sie sich ganz auf Ihr Kerngeschäft konzentrieren können.

Neben unserem Umsetzung- und Programmierung-Know-how stehen wir Ihnen mit Online Marketing zur Seite.