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

gdb: variables ui breaks after expanding locals #289

Open
Arcturuss opened this issue Jan 13, 2025 · 2 comments
Open

gdb: variables ui breaks after expanding locals #289

Arcturuss opened this issue Jan 13, 2025 · 2 comments

Comments

@Arcturuss
Copy link

When expanding some structs while debugging C++ with GDB, the debugger UI on bottom panel disappears and never reappears again. Only debugger console is shown on the panel then. Closing and reopening debugger doesn't work.

Windows 10, latest versions of ST4 and Debugger from package control.

There is error in the 'show protocol' window:

Traceback (most recent call last):
  File "C:\Users\user\AppData\Roaming\Sublime Text\Packages\Debugger\modules\core\asyncio.py", line 94, in __call__
    self.callback(*self.args)
  File "C:\Users\user\AppData\Roaming\Sublime Text\Packages\Debugger\modules\ui\layout.py", line 73, in render_layouts
    r.render()
  File "C:\Users\user\AppData\Roaming\Sublime Text\Packages\Debugger\modules\ui\phantom.py", line 22, in render
    updated = super().render()
  File "C:\Users\user\AppData\Roaming\Sublime Text\Packages\Debugger\modules\ui\layout.py", line 204, in render
    self.render_element_tree(self.item)
  File "C:\Users\user\AppData\Roaming\Sublime Text\Packages\Debugger\modules\ui\layout.py", line 183, in render_element_tree
    self.render_element_tree(child)
  File "C:\Users\user\AppData\Roaming\Sublime Text\Packages\Debugger\modules\ui\layout.py", line 183, in render_element_tree
    self.render_element_tree(child)
  File "C:\Users\user\AppData\Roaming\Sublime Text\Packages\Debugger\modules\ui\layout.py", line 183, in render_element_tree
    self.render_element_tree(child)
  [Previous line repeated 5 more times]
  File "C:\Users\user\AppData\Roaming\Sublime Text\Packages\Debugger\modules\ui\layout.py", line 195, in render_element_tree
    self.render_element_tree(child, True)
  File "C:\Users\user\AppData\Roaming\Sublime Text\Packages\Debugger\modules\ui\layout.py", line 195, in render_element_tree
    self.render_element_tree(child, True)
  File "C:\Users\user\AppData\Roaming\Sublime Text\Packages\Debugger\modules\ui\layout.py", line 190, in render_element_tree
    item.perform_render()
  File "C:\Users\user\AppData\Roaming\Sublime Text\Packages\Debugger\modules\ui\html.py", line 100, in perform_render
    self.render()
  File "C:\Users\user\AppData\Roaming\Sublime Text\Packages\Debugger\modules\views\variable.py", line 246, in render
    self.render_header(name, value, is_expandable, is_expanded)
  File "C:\Users\user\AppData\Roaming\Sublime Text\Packages\Debugger\modules\views\variable.py", line 200, in render_header
    ui.code(value, on_click=self.edit_variable)
  File "C:\Users\user\AppData\Roaming\Sublime Text\Packages\Debugger\modules\ui\html.py", line 43, in __call__
    instance = super().__call__(*args, **kwargs)
  File "C:\Users\user\AppData\Roaming\Sublime Text\Packages\Debugger\modules\ui\html.py", line 291, in __init__
    self.text = text.replace('\n', '\\n')
AttributeError: 'list' object has no attribute 'replace'

@daveleroy
Copy link
Owner

daveleroy commented Jan 13, 2025

Just based on the stack trace it looks like they are sending an array for a variables value which isn't allowed it should be a string.

@daveleroy
Copy link
Owner

Yeah this looks like an issue with the adapter that they will need to fix.

Here is the relevant bug report WebFreak001/code-debug#413
And a fix WebFreak001/code-debug#414

@daveleroy daveleroy changed the title Panel UI breaks after expanding locals gdb: variables ui breaks after expanding locals Jan 13, 2025
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