daveleroy / SublimeDebugger

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

Problem during setup - it gives an error #196

Closed polak7gt closed 5 months ago

polak7gt commented 1 year ago

After installation, when I type: "Debugger: Open" it gives: TypeError: can only concatenate list (not "NoneType") to list

Information from the console:

DPI mode: per-monitor v2 startup, version: 4143 windows x64 channel: stable executable: /C/Program Files/Sublime Text/sublime_text.exe application: /C/Program Files/Sublime Text working dir: /C/Users/user/OneDrive - Akademia Górniczo-Hutnicza im. Stanisława Staszica w Krakowie/AGH/Programowanie/python_scripts/sublime_text_test packages path: /C/Users/user/AppData/Roaming/Sublime Text/Packages state path: /C/Users/user/AppData/Roaming/Sublime Text/Local zip path: /C/Program Files/Sublime Text/Packages zip path: /C/Users/user/AppData/Roaming/Sublime Text/Installed Packages ignored_packages: ["Vintage"] pre session restore time: 0.0869927 startup time: 0.183993 first paint time: 0.236993 reloading plugin Default.arithmetic reloading plugin Default.auto_indent_tag reloading plugin Default.block reloading plugin Default.colors reloading plugin Default.comment reloading plugin Default.convert_color_scheme reloading plugin Default.convert_syntax reloading plugin Default.copy_path reloading plugin Default.echo reloading plugin Default.exec reloading plugin Default.fold reloading plugin Default.font reloading plugin Default.goto_line reloading plugin Default.history_list reloading plugin Default.html_print reloading plugin Default.indentation reloading plugin Default.install_package_control reloading python 3.3 plugin 0_package_control_loader.00-package_control reloading python 3.3 plugin Package Control.1_reloader reloading python 3.3 plugin Package Control.2_bootstrap reloading plugin Default.keymap reloading plugin Default.kill_ring reloading plugin Default.mark reloading plugin Default.new_templates reloading plugin Default.open_context_url reloading plugin Default.open_in_browser reloading plugin Default.pane reloading plugin Default.paragraph reloading plugin Default.paste_from_history reloading plugin Default.profile reloading plugin Default.quick_panel reloading plugin Default.rename reloading plugin Default.run_syntax_tests reloading plugin Default.save_on_focus_lost reloading plugin Default.scroll reloading plugin Default.set_unsaved_view_name reloading plugin Default.settings reloading plugin Default.show_scope_name reloading plugin Default.side_bar reloading plugin Default.sort reloading plugin Default.switch_file reloading plugin Default.symbol reloading plugin Default.transform reloading plugin Default.transpose reloading plugin Default.ui reloading plugin CSS.css_completions reloading plugin Diff.diff reloading plugin HTML.encode_html_entities reloading plugin HTML.html_completions reloading plugin ShellScript.ShellScript reloading python 3.3 plugin Package Control.Package Control plugins loaded Package Control: Skipping automatic upgrade, last run at 2022-12-07 10:49:44, next run at 2022-12-07 11:49:44 or after ignored packages updated to: ["Debugger", "Vintage"] reloading settings Packages/User/Package Control.sublime-settings reloading settings Packages/User/Preferences.sublime-settings Package Control: The dependency 'pywinpty' is not currently installed; installing... Package Control: The dependency 'pywinpty' has successfully been installed or updated reloading settings Packages/User/Package Control.sublime-settings ignored packages updated to: ["Vintage"] Unable to parse color value var(background) at Packages/Debugger/ColorSchemes/Mariana.sublime-color-scheme:5:27 reloading plugin Debugger.start reloading settings Packages/User/Package Control.sublime-settings reloading settings Packages/User/Preferences.sublime-settings Debugger: [startup] Debugger: [finished] generating syntax summary reloading settings Packages/User/Preferences.sublime-settings Debugger: ProjectConfiguration.reload Traceback (most recent call last): File "C:\Program Files\Sublime Text\Lib\python38\sublimeplugin.py", line 1657, in run return self.run(**args) File "C:\Users\user\AppData\Roaming\Sublime Text\Packages\Debugger\modules\command.py", line 102, in run command.run(self.window, kwargs) File "C:\Users\user\AppData\Roaming\Sublime Text\Packages\Debugger\modules\command.py", line 63, in run debugger = Debugger.get(window, True) File "C:\Users\user\AppData\Roaming\Sublime Text\Packages\Debugger\modules\debugger.py", line 62, in get instance = Debugger(window) File "C:\Users\user\AppData\Roaming\Sublime Text\Packages\Debugger\modules\debugger.py", line 105, in init self.project = Project(window) File "C:\Users\user\AppData\Roaming\Sublime Text\Packages\Debugger\modules\project.py", line 37, in init self.reload() File "C:\Users\user\AppData\Roaming\Sublime Text\Packages\Debugger\modules\project.py", line 142, in reload self.load_configurations() File "C:\Users\user\AppData\Roaming\Sublime Text\Packages\Debugger\modules\project.py", line 202, in load_configurations for task_json in self.configurations_from_project(data, 'debugger_tasks') + Settings.global_debugger_tasks: TypeError: can only concatenate list (not "NoneType") to list

daveleroy commented 1 year ago

Have you set global_debugger_configurations: null in your Debugger.sublime-settings file or something? It should be set to [] or an array of configurations.

polak7gt commented 1 year ago

Something moved on - the command "Debugger: install adapters" worked. Now, when I want to debug something I get: Add or select a configuration to begin debuggingg

So, I found some configuration on github and added it:

{
    // Open the debugger automatically when a project that is set up for debugging
    "open_at_startup": true,

    // Sets the entire scale of the UI, defaults to font_size
    "ui_scale": null,

    // Change at your own risk it may break the interface. Restart required to take effect
    "font_face": "Monospace",

    // Which external terminal should be used when an adapter requests an external terminal
    // "platform" (default) uses Terminal on MacOS, CMD (Not tested) on Windows, (Unimplemented) on Linux
    // "terminus" Opens a new terminal view using terminus. The terminus package must be installed https://github.com/randy3k/Terminus
    "external_terminal": "terminus",

    // Controls the minimum height of the debugger output panels in lines
    "minimum_console_height": 15,

    // Some new features are locked behind this flag
    "development": false,

    "log_info": false,

    "log_exceptions": true,

    "log_errors": true,

    // Sets a specific path for node if not set adapters that require node to run will use whatever is in your path
    "node": null,

    // Output panels outside of the debugger can be integrated into the tabbed debugger interface (note: In some cases output panels may cause issues and not work correctly depending on who owns them)
    // An example for interating the Diagnostics panel of LSP and a Terminus output panel.
    // 
    // "integrated_output_panels": {
    //  "diagnostics": {
    //      "name": "Diagnostics",
    //  },
    //  "Terminus": {
    //      "name": "Terminal",
    //      "position": "bottom"
    //  }
    // }
    "integrated_output_panels": {},

    // Some debug adapters require certain packages to be installed via package control. If you have installed these package outside of package control then you can add them to this list and they will be treated as if they are installed.
    "installed_packages": [],

    // Global debugger configurations that are accessible from every project
    "global_debugger_configurations": [],

    // Global debugger tasks that are accessible from every project
    "global_debugger_tasks": [],

    // Global debugger compounds that are accessible from every project
    "global_debugger_compounds": [],

    // Which lldb library to use
    "lldb_library": null,

    // Sets a specific path for dlv if not set go will use whatever is in your path
    "go_dlv": null,

    // Sets a specific path for `readapt` otherwise whatever is in your path will be used
    "ruby_readapt": null,

    "debugger_configurations":
    [
    ],
}

When I try to run debugging I get: Add or select a configuration to begin debuggingg

Should I add different configuration?

daveleroy commented 5 months ago

You should look at the example projects for setting things up for the adapter you want to use. You shouldn't need to change any settings to add a configuration they exist in sublime-project files generally.