Skip to content

Support for avoiding source focus in "stopped" events #525

Open

Description

We have implemented a debug adapter for the Ballerina language and, we have a requirement to avoid the automatic focus on the source file that contains the debug hit when a "stopped" event occurs while retaining the ability to display variables and other debug-related information in the LHS debug panel.

We already tried using the preserveFocusHint flag in the "stopped" event, but this flag not only avoids opening the source file but also disables the display of variables in the left-hand side (LHS) debug panel.

Is there a recommended way to achieve this functionality with the current Debug Adapter Protocol (DAP) specification?
If not, can this feature be considered for future versions of the protocol?

Activity

  1. connor4312 commented on Jan 22, 2025

    @connor4312
    Member

    Would it be possible for you to take a screen capture of your scenario so I can better understand the reasoning behind what you're doing? https://gifcap.dev/ is useful if you don't have other software.

  2. NipunaRanasinghe commented on Jan 23, 2025

    @NipunaRanasinghe
    ContributorAuthor

    Connor Peet (@connor4312) Thanks for the prompt response!

    Unfortunately, I’m unable to share any screen recordings at this stage as the product is in its initial stages, and sharing such details requires approval from other teams.

    To explain further, we’re working on providing a visual (low-code) debugging experience for the Ballerina language in VSCode. On each debug hit, we open a diagram view highlighting the specific node along with the stack trace, visible variables, and other debug information.

    The challenge we’re facing is that the source file containing the debug hit opens automatically with the debug hit highlighted. This behavior replaces the diagram view we are trying to display. We couldn’t find a configuration in the Debug Adapter Protocol to disable this behaviour while retaining other debug-related functionality.

    Would you happen to know of a workaround for this or if this functionality could be considered for future versions of the protocol?

  3. puremourning commented on Jan 23, 2025

    @puremourning
    Contributor

    This sounds like a client (vscode) specific request not something that should be on the DAP. Hard to imagine how a generic DAP client could implement what you are talking about.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

under-discussionIssue is under discussion for relevance, priority, approach

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions