We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

How can I tell if my extension is getting called?

Development and Programming

Erin Dalzell's avatar
Erin Dalzell
790 posts
17 years ago
Erin Dalzell's avatar Erin Dalzell

I put in an echo statement, but I am not sure if that is sufficient.

       
ExpressionEngineer's avatar
ExpressionEngineer
148 posts
17 years ago
ExpressionEngineer's avatar ExpressionEngineer

if it’s not something vital you could try this instead of an echo:

exit("some text");
       
Jamie Poitra's avatar
Jamie Poitra
409 posts
17 years ago
Jamie Poitra's avatar Jamie Poitra

I use this a lot when working on stuff that is new or while troubleshooting:

print_r($some_useful_variable_or_array); exit();

That way you not only know that the code progressed to the point where the exit happened but you also get some possibly useful output to see if things were working correctly.

Jamie

       
ExpressionEngineer's avatar
ExpressionEngineer
148 posts
17 years ago
ExpressionEngineer's avatar ExpressionEngineer

lol, I though that was what I said.

       
Jamie Poitra's avatar
Jamie Poitra
409 posts
17 years ago
Jamie Poitra's avatar Jamie Poitra

Well I guess the difference is with a print_r you can feed an array or a variable which I find particularly useful. But yeah we had the same gist of an idea there. 😊

Jamie

       
ExpressionEngineer's avatar
ExpressionEngineer
148 posts
17 years ago
ExpressionEngineer's avatar ExpressionEngineer

Nah I meant I thought I had put a print_r in there myself, I always do what you wrote, it’s odd that I left the print_r out.

lol, too much to handle before xmas I guess.

       
Jamie Poitra's avatar
Jamie Poitra
409 posts
17 years ago
Jamie Poitra's avatar Jamie Poitra

Ah. 😊

Jamie

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.