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

Reply via email to