Interface Debugger

All Superinterfaces:
JavaSourceResolver
All Known Implementing Classes:
DebuggeeAgent

public interface Debugger extends JavaSourceResolver
Qute debugger API.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Registers a debugger listener to receive debug events.
    CompletableFuture<org.eclipse.lsp4j.debug.CompletionsResponse>
    completions(org.eclipse.lsp4j.debug.CompletionsArguments args)
    Provides code completions for the specified context.
    CompletableFuture<org.eclipse.lsp4j.debug.EvaluateResponse>
    evaluate(Integer frameId, String expression, String context)
    Evaluates the given expression in the context of the specified frame.
    org.eclipse.lsp4j.debug.Scope[]
    getScopes(int frameId)
    Returns the variable scopes for the given stack frame.
    org.eclipse.lsp4j.debug.SourceResponse
    getSourceReference(int sourceReference)
    Returns the source code template for a given source reference.
    org.eclipse.lsp4j.debug.StackTraceResponse
    getStackFrames(int threadId, Integer startFrame, Integer levels)
    Returns the stack frames for the specified thread.
    getState(int threadId)
    Returns the current state of the remote debugger for a given thread.
    org.eclipse.lsp4j.debug.Thread
    getThread(int threadId)
    Returns the thread with the given ID.
    org.eclipse.lsp4j.debug.Thread[]
    Returns the list of threads known to the debugger.
    org.eclipse.lsp4j.debug.Variable[]
    getVariables(int variablesReference)
    Retrieves the variables for a given variable reference.
    boolean
    Returns whether the debugger is currently enabled.
    void
    next(int threadId)
    Moves to the next statement for the given thread (alias for step over).
    void
    pause(int threadId)
    Pauses the execution of the template engine on the specified thread.
    void
    Unregisters a previously registered debugger listener.
    void
    resume(int threadId)
    Resumes the execution of the template engine on the specified thread.
    org.eclipse.lsp4j.debug.Breakpoint[]
    setBreakpoints(org.eclipse.lsp4j.debug.SourceBreakpoint[] sourceBreakpoints, org.eclipse.lsp4j.debug.Source source)
    Sets breakpoints in a source file.
    void
    setEnabled(boolean enabled)
    Enables or disables the debugger.
    void
    stepIn(int threadId)
    Performs a "step in" operation for the given thread.
    void
    stepOut(int threadId)
    Performs a "step out" operation for the given thread.
    void
    stepOver(int threadId)
    Performs a "step over" operation for the given thread.
    void
    Terminates the debugging session.

    Methods inherited from interface io.quarkus.qute.debug.client.JavaSourceResolver

    resolveJavaSource
  • Method Details

    • getState

      DebuggerState getState(int threadId)
      Returns the current state of the remote debugger for a given thread.
      Parameters:
      threadId - the ID of the thread
      Returns:
      the current DebuggerState of the thread
    • pause

      void pause(int threadId)
      Pauses the execution of the template engine on the specified thread.
      Parameters:
      threadId - the ID of the thread to pause
    • resume

      void resume(int threadId)
      Resumes the execution of the template engine on the specified thread.
      Parameters:
      threadId - the ID of the thread to resume
    • setBreakpoints

      org.eclipse.lsp4j.debug.Breakpoint[] setBreakpoints(org.eclipse.lsp4j.debug.SourceBreakpoint[] sourceBreakpoints, org.eclipse.lsp4j.debug.Source source)
      Sets breakpoints in a source file.
      Parameters:
      sourceBreakpoints - the breakpoints to set
      source - the source file where breakpoints are applied
      Returns:
      the actual breakpoints that were set
    • getThreads

      org.eclipse.lsp4j.debug.Thread[] getThreads()
      Returns the list of threads known to the debugger.
      Returns:
      an array of Thread objects
    • getThread

      org.eclipse.lsp4j.debug.Thread getThread(int threadId)
      Returns the thread with the given ID.
      Parameters:
      threadId - the ID of the thread
      Returns:
      the corresponding Thread object
    • getStackFrames

      org.eclipse.lsp4j.debug.StackTraceResponse getStackFrames(int threadId, Integer startFrame, Integer levels)
      Returns the stack frames for the specified thread.
      Parameters:
      threadId - the ID of the thread
      startFrame - the index of the first frame to return; if omitted frames start at 0.
      levels - the maximum number of frames to return. If levels is not specified or 0, all frames are returned.
      Returns:
      an array of StackFrame objects and the total frames
    • getScopes

      org.eclipse.lsp4j.debug.Scope[] getScopes(int frameId)
      Returns the variable scopes for the given stack frame.
      Parameters:
      frameId - the ID of the stack frame
      Returns:
      an array of Scope objects
    • getVariables

      org.eclipse.lsp4j.debug.Variable[] getVariables(int variablesReference)
      Retrieves the variables for a given variable reference.
      Parameters:
      variablesReference - the reference ID for the variable
      Returns:
      an array of child Variable objects
    • evaluate

      CompletableFuture<org.eclipse.lsp4j.debug.EvaluateResponse> evaluate(Integer frameId, String expression, String context)
      Evaluates the given expression in the context of the specified frame.
      Parameters:
      frameId - the ID of the stack frame (nullable)
      expression - the expression to evaluate
      context - the evaludation context
      Returns:
      a CompletableFuture that completes with the evaluation result
    • terminate

      void terminate()
      Terminates the debugging session.
    • stepIn

      void stepIn(int threadId)
      Performs a "step in" operation for the given thread.
      Parameters:
      threadId - the ID of the thread
    • stepOut

      void stepOut(int threadId)
      Performs a "step out" operation for the given thread.
      Parameters:
      threadId - the ID of the thread
    • stepOver

      void stepOver(int threadId)
      Performs a "step over" operation for the given thread.
      Parameters:
      threadId - the ID of the thread
    • next

      void next(int threadId)
      Moves to the next statement for the given thread (alias for step over).
      Parameters:
      threadId - the ID of the thread
    • completions

      CompletableFuture<org.eclipse.lsp4j.debug.CompletionsResponse> completions(org.eclipse.lsp4j.debug.CompletionsArguments args)
      Provides code completions for the specified context.
      Parameters:
      args - the CompletionsArguments for the current context
      Returns:
      a CompletableFuture<org.eclipse.lsp4j.debug.CompletionsResponse> with the suggested completions
    • getSourceReference

      org.eclipse.lsp4j.debug.SourceResponse getSourceReference(int sourceReference)
      Returns the source code template for a given source reference.
      Parameters:
      sourceReference - the source reference
      Returns:
      the source code template for a given source reference
    • addDebuggerListener

      void addDebuggerListener(DebuggerListener listener)
      Registers a debugger listener to receive debug events.
      Parameters:
      listener - the listener to register
    • removeDebuggerListener

      void removeDebuggerListener(DebuggerListener listener)
      Unregisters a previously registered debugger listener.
      Parameters:
      listener - the listener to remove
    • setEnabled

      void setEnabled(boolean enabled)
      Enables or disables the debugger.
      Parameters:
      enabled - true to enable the debugger, false to disable it
    • isEnabled

      boolean isEnabled()
      Returns whether the debugger is currently enabled.
      Returns:
      true if enabled, false otherwise