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

VSCode Debug Console not evaluating expressions #88

Open
alegomes opened this issue Dec 27, 2023 · 1 comment
Open

VSCode Debug Console not evaluating expressions #88

alegomes opened this issue Dec 27, 2023 · 1 comment

Comments

@alegomes
Copy link

Create a very basic project with gradle init

image

Set a breakpoint and start debugging it...

image

..and try to evaluate expressions in the Debug Console.

It doesn't work :-(

@fwcd
Copy link
Owner

fwcd commented Jan 26, 2024

Currently only variables in the program can be "evaluated", arbitrary expressions are not supported yet:

override fun evaluate(args: EvaluateArguments): CompletableFuture<EvaluateResponse> = async.compute {
val variable = (args.frameId
.toLong()
.let(converter::toInternalStackFrame)
?: throw KotlinDAException("Could not find stack frame with ID ${args.frameId}"))
.evaluate(args.expression)
?.let(converter::toDAPVariable)
EvaluateResponse().apply {
result = variable?.value ?: "unknown"
variablesReference = variable?.variablesReference ?: 0
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants