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

Theia does not respect StoppedEvent description in Debug Adapter Protocol #13049

Closed
EvilBeaver opened this issue Nov 2, 2023 · 4 comments · Fixed by #13050
Closed

Theia does not respect StoppedEvent description in Debug Adapter Protocol #13049

EvilBeaver opened this issue Nov 2, 2023 · 4 comments · Fixed by #13050
Labels
debug issues that related to debug functionality localization issues related to localization/internalization/nls

Comments

@EvilBeaver
Copy link
Contributor

EvilBeaver commented Nov 2, 2023

Bug Description:

Theia does not use Description field of event, thus text "Paused on {0}" can't be properly localized

https://microsoft.github.io/debug-adapter-protocol/specification#Events_Stopped

The full reason for the event, e.g. 'Paused on exception'. This string is shown in the UI as is and can be translated.

Steps to Reproduce:

  1. Write a debug adapter which sends Stopped event with 'description' field specified
  2. See that Theia does not show this string

https://github.com/eclipse-theia/theia/blob/master/packages/debug/src/browser/model/debug-thread.tsx#L233

In code above there is a localization of the reason, but there are two bad things here:

  1. It does not localize "Paused on" part of text
  2. It requires localization on Theia side, not in debug adapter side

Expected behavior

Theia respects description field and if it exists - shows it AS IS without any prefixes, as required by DAP.

Additional Information

  • Operating System: any
  • Theia Version: v1.43.0+
@msujew msujew added debug issues that related to debug functionality localization issues related to localization/internalization/nls labels Nov 2, 2023
@msujew
Copy link
Member

msujew commented Nov 2, 2023

@EvilBeaver Are you interested in contributing a fix for this?

@EvilBeaver
Copy link
Contributor Author

@msujew yes, I can fix it

@EvilBeaver
Copy link
Contributor Author

@msujew one question: where translations are stored in the codebase?

return nls.localize('theia/debug/breakpoint', 'breakpoint'); - where lies the content of 'theia/debug/breakpoint'?

@msujew
Copy link
Member

msujew commented Nov 2, 2023

@EvilBeaver You can find all translation files here, with the requested key in particular here. Note that these are initially machine translated, though manual improvements to the translations are welcome.

EvilBeaver pushed a commit to EvilBeaver/theia that referenced this issue Nov 2, 2023
If stopped event description exists it must be shown in UI as is.
EvilBeaver pushed a commit to EvilBeaver/theia that referenced this issue Nov 2, 2023
…3049

If thread Stopped event contains description field, UI must show description as is
tsmaeder pushed a commit that referenced this issue Nov 13, 2023
If thread Stopped event contains description field, UI must show description as is


Co-authored-by: Andrey Ovsyankin <ovsa@1c.ru>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
debug issues that related to debug functionality localization issues related to localization/internalization/nls
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants