Skip to content

Commit 96875bc

Browse files
committed
Moved instructions to readme.
1 parent 1602e86 commit 96875bc

File tree

2 files changed

+90
-88
lines changed

2 files changed

+90
-88
lines changed

modules/cbdebugger/instructions.md

Lines changed: 0 additions & 88 deletions
This file was deleted.

readme.md

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,96 @@ Apache License, Version 2.0.
1313
- Railo 4+
1414
- ColdFusion 9+
1515

16+
#INSTRUCTIONS
17+
18+
Just drop into your **modules** folder or use CommandBox to install
19+
20+
`box install cbdebugger`
21+
22+
This will activate the debugger in your application and render out at the end of a request.
23+
24+
## Settings
25+
This will also allow you to use several settings in your parent application or you can modify the settings in the `ModuleConfig` if desired. We recommend placing your debugger settings in your main `ColdBox.cfc` configuration file under a `debugger` struct.
26+
27+
```js
28+
// Debugger Settings
29+
debugger = {
30+
// Activate debugger for everybody
31+
debugMode = true,
32+
// Setup a password for the panel
33+
debugPassword = "",
34+
enableDumpVar = true,
35+
persistentRequestProfiler = true,
36+
maxPersistentRequestProfilers = 10,
37+
maxRCPanelQueryRows = 50,
38+
showTracerPanel = true,
39+
expandedTracerPanel = true,
40+
showInfoPanel = true,
41+
expandedInfoPanel = true,
42+
showCachePanel = true,
43+
expandedCachePanel = false,
44+
showRCPanel = true,
45+
expandedRCPanel = false,
46+
showModulesPanel = true,
47+
expandedModulesPanel = false,
48+
showRCSnapshots = false,
49+
wireboxCreationProfiler=false
50+
};
51+
```
52+
53+
## WireBox Mappings
54+
The module will also register two model objects for you:
55+
56+
* `debuggerService@cbdebugger`
57+
* `timer@cbdebugger`
58+
59+
The `DebuggerService` can be used a-la-carte for your debugging purposes.
60+
The `Timer` object will allow you to time code execution and send the results to the debugger panel.
61+
62+
## Mixins
63+
64+
This module will also register a few methods in all your handlers/interceptors/layouts and views:
65+
66+
```js
67+
/**
68+
* Method to turn on the rendering of the debug panel on a reqquest
69+
*/
70+
any function showDebugger()
71+
72+
/**
73+
* Method to turn off the rendering of the debug panel on a reqquest
74+
*/
75+
any function hideDebugger()
76+
77+
/**
78+
* See if the debugger will be rendering or not
79+
*/
80+
boolean function isDebuggerRendering()
81+
```
82+
83+
84+
## LogBox Appender
85+
86+
This module also comes with a LogBox appender called `cbdebugger.includes.appenders.ColdBoxTracerAppender` so your application can log to the debugger's tracer. You won't be able to configure the appender in your main LogBox configuration since modules aren't loaded until after LogBox is already created. What you can do though is add the appender programmatically to LogBox using the `afterConfigurationLoad` interception point. Here's an example of what that might look like:
87+
88+
89+
```js
90+
// This appender is part of a module, so we need to register it after the modules have been loaded.
91+
function afterConfigurationLoad() {
92+
var logBox = controller.getLogBox();
93+
logBox.registerAppender( 'tracer', 'cbdebugger.includes.appenders.ColdBoxTracerAppender' );
94+
var appenders = logBox.getAppendersMap( 'tracer' );
95+
96+
// Register the appender with the root loggger, and turn the logger on.
97+
var root = logBox.getRootLogger();
98+
root.addAppender( appenders['tracer'] );
99+
root.setLevelMax( 4 );
100+
root.setLevelMin( 0 );
101+
}
102+
```
103+
104+
105+
16106
********************************************************************************
17107
Copyright Since 2005 ColdBox Framework by Luis Majano and Ortus Solutions, Corp
18108
www.coldbox.org | www.luismajano.com | www.ortussolutions.com

0 commit comments

Comments
 (0)