Examples of Debugger


Examples of com.google.code.vimsztool.debug.Debugger

  }
 
  public static String setFieldValue(String name, String exp) {
    ThreadReference threadRef = checkAndGetCurrentThread();
    SuspendThreadStack threadStack = SuspendThreadStack.getInstance();
    Debugger debugger = Debugger.getInstance();
    VirtualMachine vm = debugger.getVm();
   
    try {
     
      ParseResult result = AstTreeFactory.getExpressionAst(exp);
      if (result.hasError()) {
View Full Code Here

Examples of com.google.code.vimsztool.debug.Debugger

    String methodName = dotNode.getChild(1).getText();
    if (var instanceof ObjectReference || var instanceof ReferenceType) {
      return invoke(var,methodName,arguments);
    }
    if (var instanceof String) {
      Debugger debugger = Debugger.getInstance();
      VirtualMachine vm = debugger.getVm();
      return invoke(vm.mirrorOf((String)var),methodName,arguments);
    }
    return null;
  }
View Full Code Here

Examples of com.google.code.vimsztool.debug.Debugger

 
  private static Value getMirrorValue(Object value) {
    if (value == null) return null;
    if (value instanceof Value) return (Value)value;
   
    Debugger debugger = Debugger.getInstance();
    VirtualMachine vm = debugger.getVm();
    if (value instanceof Integer) {
      return vm.mirrorOf(((Integer)value).intValue());
    } else if (value instanceof Boolean) {
      return vm.mirrorOf(((Boolean)value).booleanValue());
    } else if (value instanceof Float) {
View Full Code Here

Examples of com.google.code.vimsztool.debug.Debugger

    else {
      throw new ExpressionEvalException("eval expression error, array index is not int type.");
    }
  }
  private static ThreadReference checkAndGetCurrentThread() {
    Debugger debugger = Debugger.getInstance();
    if (debugger.getVm() == null ) {
      throw new ExpressionEvalException("no virtual machine connected.");
    }
   
    SuspendThreadStack threadStack = SuspendThreadStack.getInstance();
    ThreadReference threadRef = threadStack.getCurThreadRef();
View Full Code Here

Examples of com.google.code.vimsztool.debug.Debugger

 
    private static ReferenceType getClassType(String className) {
   
    try {
      ThreadReference threadRef = checkAndGetCurrentThread();
      Debugger debugger = Debugger.getInstance();
      SuspendThreadStack threadStack = SuspendThreadStack.getInstance();
      StackFrame stackFrame = threadRef.frame(threadStack.getCurFrame());
      CompilerContext ctx = debugger.getCompilerContext();
      VirtualMachine vm = debugger.getVm();
      List<ReferenceType> refTypes = vm.classesByName("java.lang."+className);
      if (refTypes !=null && refTypes.size() >0 ) {
        return refTypes.get(0);
      }
      String locSourcePath = stackFrame.location().sourcePath();
View Full Code Here

Examples of com.google.code.vimsztool.debug.Debugger

    return sb.toString();
  }
 
  private void hotSwapClass(CompileResultInfo resultInfo) {
   
    Debugger debugger = Debugger.getInstance();
    BreakpointManager bpm = BreakpointManager.getInstance();
    List<String[]> outputs = resultInfo.getOutputInfo();
    for (String[] names : outputs) {
      String className = names[0];
      String outputPath = names[1];
View Full Code Here

Examples of org.apache.camel.processor.interceptor.Debugger

     * @return the current debugger or null if none is active
     * @see #enableDebug()
     */
    public Debugger getDebugger() {
        for (CamelContext camelContext : camelContexts) {
            Debugger debugger = Debugger.getDebugger(camelContext);
            if (debugger != null) {
                return debugger;
            }
        }
        return null;
View Full Code Here

Examples of org.apache.camel.processor.interceptor.Debugger

    }

    public void afterPropertiesSet() throws Exception {
        // TODO there should be a neater way to do this!

        Debugger debugger = getBeanForType(Debugger.class);
        if (debugger != null) {
            getContext().addInterceptStrategy(debugger);
        }

        Tracer tracer = getBeanForType(Tracer.class);
View Full Code Here

Examples of org.apache.camel.processor.interceptor.Debugger

    }

    public void afterPropertiesSet() throws Exception {
        // TODO there should be a neater way to do this!

        Debugger debugger = getBeanForType(Debugger.class);
        if (debugger != null) {
            getContext().addInterceptStrategy(debugger);
        }

        Tracer tracer = getBeanForType(Tracer.class);
View Full Code Here

Examples of org.apache.camel.processor.interceptor.Debugger

        return new RouteBuilder() {
            public void configure() throws Exception {
                // add debugger as an interceptor. The debugger is an enhanced tracer that also
                // logs the exchanges at runtime. It is also a framework where we programatically
                // can access the internal states of Camel etc.
                getContext().addInterceptStrategy(new Debugger());

                from("direct:start").
                        process(new Processor() {
                            public void process(Exchange exchange) throws Exception {
                                // do nothing
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.