How to remove debug code - sample

by 7 replies
8
This appears at the bottom of my screen, under the footer - but only in Firefox, and only on my computer. Here's the code:

Debug Mode On

$wp_query->query_vars output
Array
(
[post_type] => coupon
[post_status] => Array
(
[0] => publish
)

[ignore_sticky_posts] =>
1 [paged] => 1
[error] =>
[m] =>
[p] => 0
[post_parent] =>
[subpost] =>
[subpost_id] =>
[attachment] =>
[attachment_id] => 0
[name] =>
[static] =>
[pagename] =>
[page_id] => 0
[second] =>
[minute] =>
[hour] =>
[day] => 0
[monthnum] => 0
[year] => 0
[w] => 0
[category_name] =>
[tag] =>
[cat] =>
[tag_id] =>
[author] =>
[author_name] =>
[feed] =>
[tb] =>
[comments_popup] =>
[meta_key] =>
[meta_value] =>
[preview] =>
[s] =>
[sentence] =>
[fields] =>
[menu_order] =>
[category__in] => Array
(
)

[category__not_in] => Array
(
)

[category__and] => Array
(
)

[post__in] => Array
(
)

[post__not_in] => Array
(
)

[tag__in] => Array
(
)

[tag__not_in] => Array
(
)

[tag__and] => Array
(
)

[tag_slug__in] => Array
(
)

[tag_slug__and] => Array
(
)

[post_parent__in] => Array
(
)

[post_parent__not_in] => Array
(
)

[author__in] => Array
(
)

[author__not_in] => Array
(
)

[suppress_filters] =>
[cache_results] => 1
[update_post_term_cache] => 1
[update_post_meta_cache] => 1
[posts_per_page] => 12
[nopaging] =>
[comments_per_page] => 50
[no_found_rows] =>
[order] => DESC
)


$wpdb->queries output




Any idea how I can rid of that?


Thanks in advance.
#programming #code #debug #remove #sample
  • what plugins are you using in firefox
    • [1] reply
    • 1. ActiveTouch General Plugin Container Version 105
      2. Shockwave Flash 14.0 r0

      That's all that are activated.
  • whats the site, send it by PM if you dont want to put it here.
    • [DELETED]
  • Another possibility is to put the if statement within your logging function, you get less code this way, but at the expense of some extra function calls.

    I'm also not a big fan of completely removing the debug code. Once you're in production, you'll probably need access to debug messages if something goes wrong. If you remove all of your code level debugging, than this isn't a possibility.
  • Search in all files: "query_vars output". You have a forgotten var_dump in your code.

    (you may need to download all files locally)


    You are logged with firefox as admin on your site?
    • [1] reply
    • I am the admin.

      Where do I find the "query_vars output" files? Also, can you elaborate on the forgotten var_dump code? Where do I find it?
      • [1] reply

Next Topics on Trending Feed