CodingTrace JS script

 

Press Ctrl+Enter to quickly submit your post
Quick Reply  
 
 
  
 From:  Mikee   
 To:  Peter (BOUGHTONP)     
32270.9 In reply to 32270.8 

It's simply a fallback for if you dont have firebug installed.

 

It also avoids you having to take out all of the console.log's every time you want to show a client it working in action while it's in development.




[Mwah]
0/0
 Reply   Quote More 

 From:  milko  
 To:  Peter (BOUGHTONP)     
32270.10 In reply to 32270.8 
You're not miffed.

milko
0/0
 Reply   Quote More 

 From:  Mikee   
 To:  ALL
32270.11 
Added an extra (optional) thing called "sources".

trace.log("hello", "mysource");
trace.error(e, "mysource");

you can then filter by sources.

Generally I try to use either class names or function names.

I.e.

javascript code:
 
 function testicals(){
  try{
   var mystring = "hello this is my string";
   trace.log(mystring ,"testicals()");
  }catch(e){
   trace.error(e ,"testicals()");
  }
 }
 
 function boobies(){
  try{
   var mystring = "hello this is my string";
   trace.log(mystring ,"boobies()");
  }catch(e){
   trace.error(e ,"boobies()");
  }
 }



[Mwah]

Attachments:
tracer.js

0/0
 Reply   Quote More 

Message 32270.12 was deleted

 From:  Sulkpot  
 To:  Mr (M00RL0CK)     
32270.13 In reply to 32270.12 
*a big spazzy spaz.

0/0
 Reply   Quote More 

 From:  THERE IS NO GOD BUT (RENDLE)  
 To:  Sulkpot     
32270.14 In reply to 32270.13 
Ahem.

0/0
 Reply   Quote More 

 From:  Mikee   
 To:  ALL
32270.15 

New version with a couple of big bug fixes.

 

code getting pretty messy now so I might rewrite it as a class if anyone is interested in it.




[Mwah]

Attachments:
tracer.js

0/0
 Reply   Quote More 

 From:  Mikee   
 To:  ALL
32270.16 
Updated again. Now with type reporting and whatnot.

Also added a demo page here to see it in action with a very very simple page.



[Mwah]

Attachments:
tracer.js

0/0
 Reply   Quote More 

 From:  andy  
 To:  Mikee      
32270.17 In reply to 32270.16 
i like it! good job
0/0
 Reply   Quote More 

 From:  Mikee   
 To:  ALL
32270.18 

Added HTML dom object highlighting.

 

fixed bugs.

 

Example of html dom highlighting:

 

http://www.beentheretogether.co.uk/code/tracer/htmlelm.php?trace

 

Note: only tested in IE so far.




[Mwah]
0/0
 Reply   Quote More 

Reply to All    
 

1–18

Rate my interest:

Adjust text size : Smaller 10 Larger

Beehive Forum 1.5.2 |  FAQ |  Docs |  Support |  Donate! ©2002 - 2024 Project Beehive Forum

Forum Stats