Go Back   vb.org Archive > vBulletin Article Depository > Read An Article > vBulletin 3 Articles
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Turn on the debug mode
MrNase
Join Date: May 2003
Posts: 670

 

Germany
Show Printable Version Email this Page Subscription
MrNase MrNase is offline 06-09-2005, 10:00 PM

You can turn on the debug mode simple by adding:

PHP Code:
$config['Misc']['debug'] = true
to your includes/config.php just before
Code:
/*======================================================================*\
|| ####################################################################
(which is at the end of the file )


To turn it off you may remove that line or change it to:
PHP Code:
 $config['Misc']['debug'] = false
Reply With Quote
  #12  
Old 01-01-2006, 04:33 PM
EricaJoy EricaJoy is offline
 
Join Date: Sep 2002
Location: New York, NY
Posts: 236
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Paul M
Actually, I have debug mode permanantly enabled in my config file - I then have a couple of plugins that disable it in the ACP and main forum, so if I need to turn it on I just disable the relevant plugin.
care to release that little goodie?
Reply With Quote
  #13  
Old 02-07-2006, 05:55 PM
Logikos Logikos is offline
 
Join Date: Jan 2003
Posts: 2,924
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

People who want to do this without editing files. See This Plugin.
Reply With Quote
  #14  
Old 02-07-2006, 09:20 PM
Delphiprogrammi Delphiprogrammi is offline
 
Join Date: Feb 2004
Location: Landen(Belgium)
Posts: 1,335
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by LiveWire
People who want to do this without editing files. See This Plugin.
ey that's a nice one !!!! cheers
Reply With Quote
  #15  
Old 03-18-2006, 07:40 PM
Carnage Carnage is offline
 
Join Date: Jan 2005
Location: uk
Posts: 760
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hmm, i hacked one board i was admin on to auto set debug mode on in the template editor cause it was the only way you could edit the Master style. (useful when adding new templates so you dont have to add them to EVERY SINGAL skin )
Reply With Quote
  #16  
Old 09-26-2006, 02:37 PM
Antivirus's Avatar
Antivirus Antivirus is offline
 
Join Date: Sep 2004
Location: Black Lagoon
Posts: 1,090
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What if I want to enable debug mode for two different ips?
Reply With Quote
  #17  
Old 09-26-2006, 04:47 PM
Delphiprogrammi Delphiprogrammi is offline
 
Join Date: Feb 2004
Location: Landen(Belgium)
Posts: 1,335
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Antivirus
What if I want to enable debug mode for two different ips?
PHP Code:
$ips = array('127.0.0.1');
$config['Misc']['debug'] = (in_array($_SERVER['REMOTE_ADDR'], $ips) ? true false); 
that should do it offcource replace 127.0.0.1 with your ip's
Reply With Quote
  #18  
Old 09-26-2006, 05:34 PM
Adrian Schneider's Avatar
Adrian Schneider Adrian Schneider is offline
 
Join Date: Jul 2004
Posts: 2,528
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just a side-note:

The in_array(...) ? true : false is redundant, because it returns true/false anyway.
Reply With Quote
  #19  
Old 10-24-2006, 04:01 PM
Antivirus's Avatar
Antivirus Antivirus is offline
 
Join Date: Sep 2004
Location: Black Lagoon
Posts: 1,090
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by SirAdrian
Just a side-note:
The in_array(...) ? true : false is redundant, because it returns true/false anyway.
I think you're correct sirAdrian, Delphiprogrammi's code doesn't seem to work for me.
Reply With Quote
  #20  
Old 10-30-2006, 11:35 AM
Surviver's Avatar
Surviver Surviver is offline
 
Join Date: Feb 2006
Location: Bonn, Germany
Posts: 382
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello, I've coded a small Plugin to activate the Debug Mode via the ACP: https://vborg.vbsupport.ru/showthread.php?t=130212

Surviver
Reply With Quote
  #21  
Old 12-08-2006, 11:12 PM
Antivirus's Avatar
Antivirus Antivirus is offline
 
Join Date: Sep 2004
Location: Black Lagoon
Posts: 1,090
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

what's the conditional to determine whether or not debug mode is turned on?

For instance, i only want a print_label_row to show within my admincp if debug mode is turned on.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:41 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05065 seconds
  • Memory Usage 2,299KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_code
  • (3)bbcode_php
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_article
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete