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

Debugger gives TypeError #256

Open
Muki-Anuwa opened this issue Mar 30, 2024 · 11 comments
Open

Debugger gives TypeError #256

Muki-Anuwa opened this issue Mar 30, 2024 · 11 comments

Comments

@Muki-Anuwa
Copy link

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
Copy link
Owner

Did restarting fix this?

@Supragy352
Copy link

Having the same error any solution?
image

@daveleroy
Copy link
Owner

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
Copy link

Pau1R commented May 9, 2024

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
Copy link

Okay that worked, thanks

@daveleroy
Copy link
Owner

When you run Preferences: Debugger Settings is the minimum_console_height setting missing or set to null or something?

"minimum_console_height": 10,

@Supragy352
Copy link

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
Copy link

And now its working, huh

@daveleroy
Copy link
Owner

daveleroy commented May 9, 2024

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
Copy link

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

@Supragy352
Copy link

Supragy352 commented May 9, 2024

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?

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

4 participants