Skip to content
This repository has been archived by the owner on Aug 26, 2021. It is now read-only.

Auto-step #16

Open
jw3 opened this issue May 5, 2021 · 2 comments
Open

Auto-step #16

jw3 opened this issue May 5, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@jw3
Copy link
Owner

jw3 commented May 5, 2021

Consider an additional stepping state (called auto-step in the gui demo) where step commands get put in the queue without manual intervention, one example would be a customizable interval. You get the visual feedback of stepping but with lower cost of interaction.

Is there already a function for this in VS Code, or is this a unique usability enhancement, idk offhand.

Thought of this while reading #12, but this is an enhancement to common debug functionality so will track it here.

@jw3 jw3 added the enhancement New feature or request label May 5, 2021
@arosien
Copy link
Collaborator

arosien commented May 5, 2021

I think the protocol itself is agnostic, so the requests will be delivered as they occur. However I'm not sure if VS Code only sends the next step command, for example, once the response from the previous is received.

We could experiment with the current code by delaying sending responses. It may turn out that the java-debug AbstractProtocolServer ensures only one request is handled at a time, which would mean we would need an alternate command to enqueue a step.

@arosien
Copy link
Collaborator

arosien commented May 5, 2021

/**
   * The debug adapter supports stepping granularities (argument 'granularity')
   * for the stepping requests.
   */
  supportsSteppingGranularity?: boolean;

https://microsoft.github.io/debug-adapter-protocol/specification#Types_Capabilities

https://microsoft.github.io/debug-adapter-protocol/specification#Types_SteppingGranularity:

The granularity of one ‘step’ in the stepping requests ‘next’, ‘stepIn’, ‘stepOut’, and ‘stepBack’. Values:

  • ‘statement’: The step should allow the program to run until the current statement has finished executing. The meaning of a statement is determined by the adapter and it may be considered equivalent to a line. For example ‘for(int i = 0; i < 10; i++) could be considered to have 3 statements ‘int i = 0’, ‘i < 10’, and ‘i++’.
  • ‘line’: The step should allow the program to run until the current source line has executed.
  • ‘instruction’: The step should allow one instruction to execute (e.g. one x86 instruction). etc.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants