Hi,
you could simply add
[{debug}]
to any template you want to debug. This will trigger the Smarty Debug
Console shown in a popup window.
It lists all known variables and their assigned values without
destroying the shop layout.
Additionally check:
http://wiki.oxidforge.org/Tutorials/Supercharge_Your_OXID_Development_Environment
IMHO the best way to debug is to use an IDE that is capable of advanced
debugging features like setting (conditional) breakpoints and stepping
through each line. Tools like Zend Studio, Eclipse or PhpStorm offer
such things.
I don't see any responsibility for Oxid to make debugging Oxid eShop
easier. Your IDE should provide that.;)
Best regards,
--
Daniel Schlichtholz Mayflower GmbH
Pleichertorstraße 2 Tel.: +49 931 359 65 1125
D-97070 Würzburg Fax : +49 931 359 65 28
[email protected] http://www.mayflower.de
Mayflower GmbH, Standort Würzburg
Firmensitz: Mannhardtstrasse 6, 80538 München
Registergericht: Amtsgericht München, HRB 142039
Geschäftsführer: Gregor Streng, Björn Schotte,
Albrecht Günther, Johann-Peter Hartmann
On Tue, 9 Aug 2011 13:06:50 -0400, Shaun Purvis
<[email protected]> wrote:
> Yes, I've used the debug functions to log info to files when that was more
> appropriate. But I'm still on the same page as Marc when it comes to having
> debug info render on the page being viewed. Sometimes, having the info on
> the page is much more convenient.
>
> Regards,
> Shaun.
>
> On Tue, Aug 9, 2011 at 12:55 PM, development <[email protected]> wrote:
>
>> Hi Holger
>>
>> Thanks for the hint but this is no option since I'm asking for a way to
>> debug on the front end.
>> My intent is to debug data on the same page where the processed result is
>> shown (for easily comparing the data with its result).
>>
>> Example:
>> I calculate various prices of a basket and after loading the page I get the
>> basket with the calculated prices.
>> Now I want to see not only the basket but also my debug messages on the
>> same page (and not within a separate console window).
>> But as we all know we can't just use echo, print, var_dump or whatever
>> since we will get some nasty
>> Warning: Cannot modify header information - headers already sent by (output
>> started at /var/www/...xyz.php:6) in /var/www/...xyz.php on line 123
>> or the like.
>> Also we most likely break the design (at least a bit).
>>
>> So to prevent this I would like to have a built-in debug function which I
>> can use to append MY debug info to the one that is produced by OXID eShop
>> itself.
>>
>> Or we can go even further and think about a new debug mode where only our
>> own debug messages are shown.
>>
>> May be I'm totally crazy or far from reality but this would help me (and I
>> think not only me).
>>
>> Greetings from Basel
>> Marc
>>
>> ORCA Services AG
>> Herrenmattstrasse 26
>> CH-4132 Muttenz
>> Office Basel: Aeschengraben 10, CH-4051 Basel
>>
>> [email protected]
>> T. +41 61 205 80 80
>> T. +41 61 205 80 73 (direkt)
>> F. +41 61 205 80 81
>>
>> www.orca.ch, www.orca-services.ch
>>
>> "We convert your visitors into customers."
>>
>> -----Ursprüngliche Nachricht-----
>> Von: [email protected] [mailto:
>> [email protected]] Im Auftrag von Holger Kohnen
>> Gesendet: Dienstag, 9. August 2011 17:54
>> An: [email protected]
>> Betreff: Re: [oxid-dev-general] Using debug messages?
>>
>> you can use the debug-function.
>> first you need to create out.txt in shop root and than you can 'tail
>> -f' that file.
>>
>> 2011/8/9 Shaun Purvis <[email protected]>:
>> > I've also wondered about this and having a more convenient method built
>> into
>> > the code would be nice (unless I too have been missing it). As of now, I
>> > simply add code to the end of index.php where all the debug code is
>> printed
>> > out. But something along the line of....
>> >
>> > foreach DebugMessages as Msg
>> > echo Msg;
>> >
>> > would be nice to have included in the debug print out.
>> >
>> > Regards,
>> > Shaun.
>> >
>> > On Tue, Aug 9, 2011 at 7:59 AM, development <[email protected]> wrote:
>> >>
>> >> Hello everybody
>> >>
>> >>
>> >>
>> >> I'm currently somewhat puzzled but is there a more convenient way to
>> >> output debug messages than the following?
>> >>
>> >>
>> >>
>> >> // set debug message in your code
>> >>
>> >> $oSmarty = oxUtilsView::getInstance()->getSmarty();
>> >>
>> >> $oSmarty->_tpl_vars['my_debug_info'].="\My Debug info";
>> >>
>> >>
>> >>
>> >> // output debug in template
>> >>
>> >> [{$my_debug_info}]
>> >>
>> >>
>> >>
>> >> è http://www.oxid-esales.com/forum/showthread.php?t=2923
>> >>
>> >>
>> >>
>> >> I mean there's a debug mode but can't we developer's use it to append
>> our
>> >> own debug messages?
>> >>
>> >>
>> >>
>> >> I'm thinking about a function like $debug->appendMsg($myDebugInfo) or
>> >> something like that which appends my debug info to the debug data of
>> OXID
>> >> and is only shown when the debug is set > 0.
>> >>
>> >>
>> >>
>> >> Thanks
>> >>
>> >> Marc
>> >>
>> >>
>> >>
>> >> ORCA Services AG
>> >> Herrenmattstrasse 26
>> >> CH-4132 Muttenz
>> >> Office Basel: Aeschengraben 10, CH-4051 Basel
>> >>
>> >>
>> >>
>> >> [email protected]
>> >> T. +41 61 205 80 80
>> >>
>> >> T. +41 61 205 80 73 (direkt)
>> >>
>> >> F. +41 61 205 80 81
>> >>
>> >> www.orca.ch, www.orca-services.ch
>> >>
>> >>
>> >>
>> >> "We convert your visitors into customers."
>> >>
>> >>
>> >>
>> >> _______________________________________________
>> >> dev-general mailing list
>> >> [email protected]
>> >> http://dir.gmane.org/gmane.comp.php.oxid.general
>> >
>> >
>> > _______________________________________________
>> > dev-general mailing list
>> > [email protected]
>> > http://dir.gmane.org/gmane.comp.php.oxid.general
>> >
>>
>>
>>
>> --
>> Holger Kohnen
>> (Webentwickler)
>>
>> Anklamer Str. 35
>> 10115 Berlin
>>
>> [email protected]
>> http://www.holgerkohnen.de
>>
>> 030 / 788 37 22
>> 0173 / 38 62 791
>> _______________________________________________
>> dev-general mailing list
>> [email protected]
>> http://dir.gmane.org/gmane.comp.php.oxid.general
>> _______________________________________________
>> dev-general mailing list
>> [email protected]
>> http://dir.gmane.org/gmane.comp.php.oxid.general
>>
_______________________________________________
dev-general mailing list
[email protected]
http://dir.gmane.org/gmane.comp.php.oxid.general