daveleroy / SublimeDebugger

Graphical Debugger for Sublime Text for debuggers that support the debug adapter protocol
MIT License
372 stars 44 forks source link

Debugger gives TypeError #256

Open Muki-Anuwa opened 6 months ago

Muki-Anuwa commented 6 months ago

Tried to open Debugger via the Debugger: Open command. Would not run and gives the following error.

scaled_font = settings.get('font_size') * (Settings.minimum_console_height + 1.75) / 5
TypeError: unsupported operand type(s) for +: 'NoneType' and 'float'

How could I fix this?

daveleroy commented 5 months ago

Did restarting fix this?

Supragy352 commented 5 months ago

Having the same error any solution? image

daveleroy commented 5 months ago

Only idea I have is that font_size is set to null in your preferences

You could try running print(view.settings()['font_size']) in the sublime console

Pau1R commented 4 months ago

I have found a workaround for macos: In /Users/paul/Library/Application Support/Sublime Text/Packages/Debugger/modules/output_panel.py replace Settings.minimum_console_height in line 138 with a random value: 13. For me the debugger started successfully and works as intended.

Supragy352 commented 4 months ago

Okay that worked, thanks

daveleroy commented 4 months ago

When you run Preferences: Debugger Settings is the minimum_console_height setting missing or set to null or something? https://github.com/daveleroy/SublimeDebugger/blob/cb9971093bdb255d943c6d0ae5caff3641130f2f/Debugger.sublime-settings#L20

Supragy352 commented 4 months ago

User settings is empty but the default is set to 10. Also is there a limite number of times I can request Github API for adapters? Mine showed all of them before but now it is showing a 403 error.

Supragy352 commented 4 months ago

And now its working, huh

daveleroy commented 4 months ago

The github api uses etags and the responses are cached in memory so if you restart or reload the debugger plugin you could end up rate limited (resets every hour I believe).

The github_personal_access_token setting can be used to get a higher api limit.

Supragy352 commented 4 months ago

Oh okay did not know that. Also the default 10 size is after I edited the Settings.minimum_console_height to be 10.

Supragy352 commented 4 months ago

Also is there something wrong with this config? image The path to the executable is correct and gdb is also installed, why is it not working? Is there a place I can ask questions about the DAP? Dicord?