vscode-bazel
vscode-bazel copied to clipboard
exception on variable evaluation error
trafficstars
If evaluation fails (e.g. user tries to add a watch for a variable that doesn't exist), this line fails:
https://github.com/bazelbuild/vscode-bazel/blob/master/src/debug-adapter/client.ts#L409
const value = (await this.bazelConnection.sendRequest({
evaluate: skylark_debugging.EvaluateRequest.create({
statement: args.expression,
threadId,
}),
})).evaluate.result;
Because evaluate is undefined.
It looks like DebugEvent.error.message gets "name '{name}' is not defined" in this case, which could be reported to the user.