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

Disable editing of read only variables #14440

Conversation

RomanPiperMVTec
Copy link
Contributor

What it does

The debug UI allows to change the variable content. The DAP server provides information if the variable is editable. If the variable is not editable, we disable the functionality in the UI.

How to test

Create a .js file in your workspace and copy the following code:

function test(params) {
    let a = "Hello World"
}

test()

Set the breakpoint on the line test()
Launch debugging of the current file
Inspect Local variable "test" and it's children. When right clicking on arguments, the "Set Value" option should be disabled. Double clicking on the variable should not open the editing dialog.

Review checklist

Reminder for reviewers

The debug UI allows to change the variable content. The DAP server provides
information if the variable is editable. If the variable is not editable, we
disable the functionality in the UI.

Signed-off-by: Roman Piper <[email protected]>
@sgraband sgraband self-requested a review November 19, 2024 07:47
Copy link
Contributor

@sgraband sgraband left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the change!

I tested it and it properly disables editing of readonly variables.

@sgraband sgraband merged commit 8393c35 into eclipse-theia:master Nov 20, 2024
11 checks passed
@sgraband sgraband added this to the 1.56.0 milestone Nov 28, 2024
@mvtec-richter mvtec-richter deleted the disable-editing-of-read-only-variables branch December 5, 2024 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants