当前位置: 首页>>代码示例>>Java>>正文


Java Debugger类代码示例

本文整理汇总了Java中org.mozilla.javascript.debug.Debugger的典型用法代码示例。如果您正苦于以下问题:Java Debugger类的具体用法?Java Debugger怎么用?Java Debugger使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Debugger类属于org.mozilla.javascript.debug包,在下文中一共展示了Debugger类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: detach

import org.mozilla.javascript.debug.Debugger; //导入依赖的package包/类
public void detach( Context cx )
{
	if ( !isTerminated( ) )
	{
		terminate( );
	}

	Debugger dbg = cx.getDebugger( );

	if ( dbg instanceof JsDebugger )
	{
		cx.setDebugger( null, null );
	}

	isAttached = false;

	if ( jsDebugger != null )
	{
		jsDebugger.dispose( );
		jsDebugger = null;
	}

	if ( factoryListener != null )
	{
		cx.getFactory( ).removeListener( factoryListener );
		factoryListener = null;
	}
}
 
开发者ID:eclipse,项目名称:birt,代码行数:29,代码来源:ReportVM.java

示例2: check

import org.mozilla.javascript.debug.Debugger; //导入依赖的package包/类
static boolean check( String source, int lineNumber )
{
	Context cx = Context.enter( );

	Debugger oldDebugger = cx.getDebugger( );
	Object oldContext = cx.getDebuggerContextData( );
	boolean oldGenerate = cx.isGeneratingDebug( );
	int oldLevel = cx.getOptimizationLevel( );

	try
	{
		BreakableSourceChecker checker = new BreakableSourceChecker( );
		checker.lineNumber = lineNumber + 2;

		cx.setDebugger( checker, null );
		cx.setGeneratingDebug( true );
		cx.setOptimizationLevel( -1 );

		cx.compileString( addHeader( source ), "<check>", 1, null ); //$NON-NLS-1$

		return checker.breakable;
	}
	catch ( Exception e )
	{
		return false;
	}
	finally
	{
		cx.setDebugger( oldDebugger, oldContext );
		cx.setGeneratingDebug( oldGenerate );
		cx.setOptimizationLevel( oldLevel );

		Context.exit( );
	}
}
 
开发者ID:eclipse,项目名称:birt,代码行数:36,代码来源:JsUtil.java

示例3: getDebugger

import org.mozilla.javascript.debug.Debugger; //导入依赖的package包/类
/**
 * Return the current debugger.
 * @return the debugger, or null if none is attached.
 */
public final Debugger getDebugger()
{
    return debugger;
}
 
开发者ID:MikaGuraN,项目名称:HL4A,代码行数:9,代码来源:Context.java

示例4: addDebugger

import org.mozilla.javascript.debug.Debugger; //导入依赖的package包/类
public void addDebugger(Debugger debugger) {
    rhino.setDebugger(debugger, scope);
}
 
开发者ID:victordiaz,项目名称:phonk,代码行数:4,代码来源:AppRunnerInterpreter.java

示例5: getDebugger

import org.mozilla.javascript.debug.Debugger; //导入依赖的package包/类
/**
 * Return the current debugger.
 * @return the debugger, or null if none is attached.
 */
public final Debugger getDebugger()
{
	return debugger;
}
 
开发者ID:tiffit,项目名称:TaleCraft,代码行数:9,代码来源:Context.java

示例6: evaluate

import org.mozilla.javascript.debug.Debugger; //导入依赖的package包/类
public synchronized VMValue evaluate( String expression )
{
	int currentState = debugger.currentState( );

	if ( currentState == VM_TERMINATED )
	{
		return null;
	}

	JsValue result = null;
	Debugger oldDebugger = cx.getDebugger( );
	Object oldContextData = cx.getDebuggerContextData( );
	int oldLevel = cx.getOptimizationLevel( );

	cx.setDebugger( null, null );
	cx.setOptimizationLevel( -1 );
	cx.setGeneratingDebug( false );

	try
	{
		Callable script = (Callable) cx.compileString( expression,
				EVALUATOR_LITERAL,
				0,
				null );
		Object val = script.call( cx,
				scope,
				thisObj,
				ScriptRuntime.emptyArgs );

		if ( val == Undefined.instance )
		{
			result = new JsValue( UNDEFINED_LITERAL, UNDEFINED_TYPE );
		}
		else
		{
			result = new JsValue( val );
		}
	}
	catch ( Exception ex )
	{
		result = new JsValue( ex.getMessage( ), EXCEPTION_TYPE );
	}
	finally
	{
		cx.setGeneratingDebug( true );
		cx.setOptimizationLevel( oldLevel );
		cx.setDebugger( oldDebugger, oldContextData );
	}

	return result;
}
 
开发者ID:eclipse,项目名称:birt,代码行数:52,代码来源:JsDebugFrame.java

示例7: setDebugger

import org.mozilla.javascript.debug.Debugger; //导入依赖的package包/类
/**
 * Set the associated debugger.
 * @param debugger the debugger to be used on callbacks from
 * the engine.
 * @param contextData arbitrary object that debugger can use to store
 *        per Context data.
 */
public final void setDebugger(Debugger debugger, Object contextData)
{
    if (sealed) onSealedMutation();
    this.debugger = debugger;
    debuggerData = contextData;
}
 
开发者ID:MikaGuraN,项目名称:HL4A,代码行数:14,代码来源:Context.java

示例8: setDebugger

import org.mozilla.javascript.debug.Debugger; //导入依赖的package包/类
/**
 * Set the associated debugger.
 * @param debugger the debugger to be used on callbacks from
 * the engine.
 * @param contextData arbitrary object that debugger can use to store
 *        per Context data.
 */
public final void setDebugger(Debugger debugger, Object contextData)
{
	if (sealed) onSealedMutation();
	this.debugger = debugger;
	debuggerData = contextData;
}
 
开发者ID:tiffit,项目名称:TaleCraft,代码行数:14,代码来源:Context.java


注:本文中的org.mozilla.javascript.debug.Debugger类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。