eclipse-theia / theia

Eclipse Theia is a cloud & desktop IDE framework implemented in TypeScript.
http://theia-ide.org
Eclipse Public License 2.0
19.55k stars 2.46k forks source link

Debugger doesn't show error of setVariable if it failed #13728

Open EvilBeaver opened 1 month ago

EvilBeaver commented 1 month ago

Bug Description:

Debugger can have ability to set value of a variable. Debug Adapter Protocol has setVariable command for this. But if evaluation of new value fails (for example, if user entered non-valid expression) theia ignores result and error message from Debug Adapter and only logs error to console. As result, user doesn't see any appropriate reaction on his action

Steps to Reproduce:

  1. Launch JS debugging
  2. stop at some breakpoint
  3. in Variables panel right-click and choose Set value
  4. enter an invalid JS expression, for example some syntax error
  5. Nothing happens in UI. Only in console.log we see message "ERROR setValue failed..."

Additional Information

Expected behavior: This is how it works in VSCode image

Code: https://github.com/eclipse-theia/theia/blob/master/packages/debug/src/browser/console/debug-console-items.tsx#L206