本文整理了Java中org.mozilla.javascript.Context.setGeneratingDebug()
方法的一些代码示例,展示了Context.setGeneratingDebug()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Context.setGeneratingDebug()
方法的具体详情如下:
包路径:org.mozilla.javascript.Context
类名称:Context
方法名:setGeneratingDebug
[英]Specify whether or not debug information should be generated.
Setting the generation of debug information on will set the optimization level to zero.
[中]指定是否应生成调试信息。
将调试信息的生成设置为on将优化级别设置为零。
代码示例来源:origin: ro.isdc.wro4j/rhino
@Override
protected void onContextCreated(Context cx)
{
cx.setLanguageVersion(languageVersion);
cx.setOptimizationLevel(optimizationLevel);
if (errorReporter != null) {
cx.setErrorReporter(errorReporter);
}
cx.setGeneratingDebug(generatingDebug);
super.onContextCreated(cx);
}
代码示例来源:origin: com.github.tntim96/rhino
@Override
protected void onContextCreated(Context cx)
{
cx.setLanguageVersion(languageVersion);
cx.setOptimizationLevel(optimizationLevel);
if (errorReporter != null) {
cx.setErrorReporter(errorReporter);
}
cx.setGeneratingDebug(generatingDebug);
super.onContextCreated(cx);
}
代码示例来源:origin: com.github.tntim96/rhino
/**
* Called when a Context is created.
*/
public void contextCreated(Context cx) {
if (type != IPROXY_LISTEN) Kit.codeBug();
ContextData contextData = new ContextData();
Debugger debugger = new DimIProxy(dim, IPROXY_DEBUG);
cx.setDebugger(debugger, contextData);
cx.setGeneratingDebug(true);
cx.setOptimizationLevel(-1);
}
代码示例来源:origin: ro.isdc.wro4j/rhino
/**
* Called when a Context is created.
*/
public void contextCreated(Context cx) {
if (type != IPROXY_LISTEN) Kit.codeBug();
ContextData contextData = new ContextData();
Debugger debugger = new DimIProxy(dim, IPROXY_DEBUG);
cx.setDebugger(debugger, contextData);
cx.setGeneratingDebug(true);
cx.setOptimizationLevel(-1);
}
代码示例来源:origin: org.eclipse.dirigible/dirigible-engine-javascript-rhino
private void enableDebugger(HttpServletRequest request, HttpServletResponse response, String moduleOrCode, Context context) {
Context rhinoContext = (Context) context;
ErrorReporter reporter = new RhinoJavascriptDebugInvocationErrorReporter();
rhinoContext.setErrorReporter(reporter);
String userId = UserFacade.getName(request);
logger.debug("creating DebugModel ...");
DebugModel debugModel = DebugManager.getDebugModel(userId);
if (debugModel == null) {
debugModel = DebugModelFacade.createDebugModel(userId, new RhinoJavascriptDebugController(userId));
}
logger.debug("creating JavascriptDebugger ...");
RhinoJavascriptDebugger debugger = new RhinoJavascriptDebugger(debugModel, request);
rhinoContext.setDebugger(debugger, JAVA_SCRIPT_DEBUGGER);
logger.debug("created JavascriptDebugger");
RhinoJavascriptDebugSender.sendCurrentSessions(userId, debugModel);
rhinoContext.setGeneratingDebug(true);
rhinoContext.setOptimizationLevel(-1);
}
代码示例来源:origin: org.wso2.bpel.extensions/ode-bpel-extensions-e4x
Context ctx = ContextFactory.getGlobal().enterContext();
ctx.setOptimizationLevel(-1);
ctx.setGeneratingDebug(false);
ctx.setGeneratingSource(false);
ctx.setDebugger(null, null);
代码示例来源:origin: ro.isdc.wro4j/rhino
cx.setGeneratingDebug(false);
try {
Callable script = (Callable)cx.compileString(expr, "", 0, null);
resultString = exc.getMessage();
} finally {
cx.setGeneratingDebug(true);
cx.setOptimizationLevel(saved_level);
cx.setDebugger(saved_debugger, saved_data);
代码示例来源:origin: com.github.tntim96/rhino
cx.setGeneratingDebug(false);
try {
Callable script = (Callable)cx.compileString(expr, "", 0, null);
resultString = exc.getMessage();
} finally {
cx.setGeneratingDebug(true);
cx.setOptimizationLevel(saved_level);
cx.setDebugger(saved_debugger, saved_data);
代码示例来源:origin: org.apache.cocoon/cocoon-flowscript-impl
public void initialize() throws Exception {
if (enableDebugger) {
if (getLogger().isDebugEnabled()) {
getLogger().debug("Flow debugger enabled, creating");
}
getDebugger().doBreak();
}
Context context = Context.enter();
context.setOptimizationLevel(OPTIMIZATION_LEVEL);
context.setCompileFunctionsWithDynamicScope(true);
context.setGeneratingDebug(true);
// add support for Rhino objects to JXPath
JXPathIntrospector.registerDynamicClass(Scriptable.class,
ScriptablePropertyHandler.class);
JXPathContextReferenceImpl.addNodePointerFactory(new ScriptablePointerFactory());
try {
scope = new Global(context);
// Access to Cocoon internal objects
FOM_Cocoon.init(scope);
} catch (Exception e) {
Context.exit();
throw e;
}
}
代码示例来源:origin: org.apache.jmeter/ApacheJMeter_core
cx.setGeneratingDebug(false);
cx.setGeneratingSource(false);
cx.setOptimizationLevel(0);
代码示例来源:origin: org.apache.cocoon/cocoon-flowscript-impl
context.setGeneratingDebug(true);
context.setCompileFunctionsWithDynamicScope(true);
LocationTrackingDebugger locationTracker = new LocationTrackingDebugger();
代码示例来源:origin: org.apache.cocoon/cocoon-flowscript-impl
Context context = Context.enter();
context.setOptimizationLevel(OPTIMIZATION_LEVEL);
context.setGeneratingDebug(true);
context.setCompileFunctionsWithDynamicScope(true);
context.setErrorReporter(new JSErrorReporter());
代码示例来源:origin: org.apache.jmeter/ApacheJMeter_core
cx.setGeneratingDebug(false);
cx.setGeneratingSource(false);
cx.setOptimizationLevel(0);
内容来源于网络,如有侵权,请联系作者删除!