-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
debug: watch expressions
are not updated properly
#11955
Comments
This is because the very first 'evaluate' happens too early, and the VS Code debug JS extension does not even reject that request: https://github.com/microsoft/vscode-js-debug/blob/d7730405d64e81eb364f76ea38efb7c93a5f877d/src/dap/connection.ts#L172 Since there is a queue of promises to update the watch expression in Theia, and the first neither rejects nor resolves, then the next updates will also wait forever: theia/packages/debug/src/browser/view/debug-view-model.ts Lines 218 to 228 in e7619c5
If the 'evaluate' promises are not queued, the console error can be seen in the backend log, but there is no rejection:
watch_part1.movwatch_part2.movTheia can fix it quickly. Do not queue or time out. The more challenging solution is to figure out why JS debug cannot accept the evaluate command, although the adapter has already sent the |
The `vscode-js-debug` does not reject when the evaluate request arrives too early to the debug adapter and the evaluate handler is not yet registered. Ref: https://github.com/microsoft/vscode-js-debug/blob/d7730405d64e81eb364f76ea38efb7c93a5f877d/src/dap/connection.ts#L172 If the first evaluate request never rejects nor resolves, none of the following evaluate requests will as they are queued, making the Theia UI never update. This commit adds a 1000ms timeout to the evaluate DAP call. Note that the VS Code Debug JS extension cannot accept the evaluate request despite it already sent the initialized to the client. Closes eclipse-theia#11955
Bug Description:
There is an issue with
watch expressions
not being updated in the debug-view which causes a difference in behavior with vscode and user expectations.For example:
If we add a
watch expression
with no debug session present, we correctly get information that the expression is not available.However, if we start a debug session and hit the breakpoint (making the variable
value
assigned), the watch expression is not updated:If we edit the watch expression with the same name (
value
) then it gets updated:Steps to Reproduce:
cli.spec.ts
file and set a breakpoint at line 38 (afterconst value
)value
value
watch expression, select "edit expression" and press "enter" (keepingvalue
as a name)The text was updated successfully, but these errors were encountered: