How to remove debug code - sample

by Vrs
7 replies
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.
#code #debug #remove #sample
  • Profile picture of the author Valdor Kiebach
    what plugins are you using in firefox
    {{ DiscussionBoard.errors[9487226].message }}
    • Profile picture of the author Vrs
      1. ActiveTouch General Plugin Container Version 105
      2. Shockwave Flash 14.0 r0

      That's all that are activated.
      {{ DiscussionBoard.errors[9488192].message }}
  • Profile picture of the author Valdor Kiebach
    whats the site, send it by PM if you dont want to put it here.
    {{ DiscussionBoard.errors[9488200].message }}
  • Profile picture of the author clevelandslim
    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.
    {{ DiscussionBoard.errors[9499142].message }}
  • Profile picture of the author IonutBajescu
    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?
    {{ DiscussionBoard.errors[9499704].message }}
    • Profile picture of the author Vrs
      Originally Posted by IonutBajescu View Post

      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?
      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?
      {{ DiscussionBoard.errors[9501252].message }}
      • Profile picture of the author IonutBajescu
        Originally Posted by Vrs View Post

        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?
        Try logout from admin(clear all cookies) and check if debug info is still there.

        "Where do I find the "query_vars output" files?"
        - In your site files.

        " Also, can you elaborate on the forgotten var_dump code"
        search - Finding all files containing a text string on Linux - Stack Overflow
        {{ DiscussionBoard.errors[9502816].message }}

Trending Topics