Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add per-stackframe canRestart #147

Closed
connor4312 opened this issue Nov 4, 2020 · 1 comment
Closed

Add per-stackframe canRestart #147

connor4312 opened this issue Nov 4, 2020 · 1 comment
Assignees
Labels
feature-request Request for new features or functionality
Milestone

Comments

@connor4312
Copy link
Member

connor4312 commented Nov 4, 2020

Context: microsoft/vscode#89471

A simple way to do this would be a canRestart on the StackFrame. This has some overlap/redundancy with supportsRestartRequest. Proposal:

export interface StackFrame {
  /**
   * Whether a restart request can be sent for the stackframe. This is only
   * relevant when the capability 'supportsRestartFrame' is present, with which
   * frames are restartable by default unless this property is set to 'false'.
   */
  canRestart?: boolean;
@weinand weinand added the feature-request Request for new features or functionality label Nov 5, 2020
@weinand
Copy link
Contributor

weinand commented Feb 10, 2021

This request makes sense and I've added it to the StackFrame type:

interface StackFrame {
  /**
   * An identifier for the stack frame. It must be unique across all threads.
   * This id can be used to retrieve the scopes of the frame with the
   * 'scopesRequest' or to restart the execution of a stackframe.
   */
  id: number;

  /**
   * The name of the stack frame, typically a method name.
   */
  name: string;

  /**
   * The optional source of the frame.
   */
  source?: Source;

  /**
   * The line within the file of the frame. If source is null or doesn't exist,
   * line is 0 and must be ignored.
   */
  line: number;

  /**
   * The column within the line. If source is null or doesn't exist, column is 0
   * and must be ignored.
   */
  column: number;

  /**
   * An optional end line of the range covered by the stack frame.
   */
  endLine?: number;

  /**
   * An optional end column of the range covered by the stack frame.
   */
  endColumn?: number;

  /**
   * Indicates whether this frame can be restarted with the 'restart' request.
   * Clients should only use this if the debug adapter supports the 'restart'
   * request (capability 'supportsRestartRequest' is true).
   */
  canRestart?: boolean;

  /**
   * Optional memory reference for the current instruction pointer in this
   * frame.
   */
  instructionPointerReference?: string;

  /**
   * The module associated with this frame, if any.
   */
  moduleId?: number | string;

  /**
   * An optional hint for how to present this frame in the UI.
   * A value of 'label' can be used to indicate that the frame is an artificial
   * frame that is used as a visual label or separator. A value of 'subtle' can
   * be used to change the appearance of a frame in a 'subtle' way.
   * Values: 'normal', 'label', 'subtle', etc.
   */
  presentationHint?: 'normal' | 'label' | 'subtle';
}

If there are no objections I will release this DAP addition later today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

2 participants