org.mozilla.javascript.Context.setDebugger()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 JavaScript  
字(3.3k)|赞(0)|评价(0)|浏览(177)

本文整理了Java中org.mozilla.javascript.Context.setDebugger()方法的一些代码示例,展示了Context.setDebugger()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Context.setDebugger()方法的具体详情如下:
包路径:org.mozilla.javascript.Context
类名称:Context
方法名:setDebugger

Context.setDebugger介绍

[英]Set the associated debugger.
[中]设置关联的调试器。

代码示例

代码示例来源:origin: org.eclipse.dirigible/dirigible-engine-javascript-rhino

public DebugFrame getFrame(Context context, DebuggableScript fnOrScript) {
  context.setDebugger(this, fnOrScript);
  return debugFrame;
}

代码示例来源: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

ctx.setGeneratingDebug(false);
ctx.setGeneratingSource(false);
ctx.setDebugger(null, null);

代码示例来源:origin: ro.isdc.wro4j/rhino

int saved_level = cx.getOptimizationLevel();
cx.setDebugger(null, null);
cx.setOptimizationLevel(-1);
cx.setGeneratingDebug(false);
  cx.setGeneratingDebug(true);
  cx.setOptimizationLevel(saved_level);
  cx.setDebugger(saved_debugger, saved_data);

代码示例来源:origin: com.github.tntim96/rhino

int saved_level = cx.getOptimizationLevel();
cx.setDebugger(null, null);
cx.setOptimizationLevel(-1);
cx.setGeneratingDebug(false);
  cx.setGeneratingDebug(true);
  cx.setOptimizationLevel(saved_level);
  cx.setDebugger(saved_debugger, saved_data);

代码示例来源:origin: org.apache.jmeter/ApacheJMeter_core

cx.setGeneratingSource(false);
cx.setOptimizationLevel(0);
cx.setDebugger(null, null);

代码示例来源:origin: org.apache.cocoon/cocoon-flowscript-impl

if (!enableDebugger) {
  context.setDebugger(locationTracker, null);

代码示例来源:origin: org.apache.cocoon/cocoon-flowscript-impl

if (!enableDebugger) {
  context.setDebugger(locationTracker, null);

代码示例来源:origin: org.apache.jmeter/ApacheJMeter_core

cx.setGeneratingSource(false);
cx.setOptimizationLevel(0);
cx.setDebugger(null, null);

相关文章

微信公众号

Context类方法