-
-
Notifications
You must be signed in to change notification settings - Fork 34
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
Improve toggling and clearing debugger breakpoints #101
Comments
@NathanLovato Is the way
|
The debugger probably changed in some ways in Godot 4, but I couldn't tell you exactly how. What I can say is that the plan for Godot is to move to using the debugger adapter protocol (DAP). Currently, it uses its own protocol because the debugger dates back from way before DAP. Once it gets DAP, all the debugger code in this package can be removed in favor of dap-mode. |
Actually, it appears that Godot 4 has DAP support. So all the custom debugger code this package has could be deprecated and replaced with dap-mode support for Godot 4. This might also explain the error you got. But note that, to my knowledge, this is only Godot 4. Godot 3 still uses its own debugger protocol. |
@NathanLovato I see, so we need to use another protocol when using |
Ha ha, I found my mistake.
We can make breakpoints run by modifying the following functions: (defun gdscript-godot--run-command (&rest arguments)
"Run a Godot process with ARGUMENTS.
The output of the process will be provided in a buffer named
`*godot - <project-name>*'."
(let ((args (gdscript-util--flatten arguments)))
(gdscript-history--add-to-history args)
(when (and gdscript-debug--breakpoints (not (member "-e" arguments)))
;; Start debugger server if it is not running already
(unless (get-process (gdscript-debug-process-name (gdscript-util--find-project-configuration-file)))
(gdscript-debug-make-server))
(push (mapconcat (lambda (breakpoint)
(let ((file (gdscript-breakpoint->file breakpoint))
(line (gdscript-breakpoint->line breakpoint)))
(format "%s:%s" file line))) gdscript-debug--breakpoints ",") args)
(push "--breakpoints" args)
(if (= gdscript-eglot-version 4)
(push (format "tcp://127.0.0.1:%s" gdscript-debug-port) args)
(push (format "127.0.0.1:%s" gdscript-debug-port) args))
(push "--remote-debug" args))
(gdscript-comint--run (append (gdscript-godot--build-shell-command) args))
(setq gdscript-godot--debug-options-hydra :not-list))) |
So instead of tuning the debugger package for now, should we try adding |
For Godot 4 yes, I think so, because |
You can, just so that it makes it easy to delete the godot 3-specific file at some point. You can decide to make a stable release of this package dedicated to Godot 3 and at a later date sunset support for Godot 3 in later versions of this repository. Given good documentation, individual users who stick to Godot 3 can always pin their package manager to an older release of this repository. This is how I would approach this as a maintainer to reduce maintenance cost. Alternatively, on top of a github release, a Godot 3-specific version of this package could be maintained in a dedicated git branch. I hope this helps |
Many thanks for your kind and warm help. |
We have debugger support since a few months, and it works, but the UX could use some more refinement.
Clearing breakpoints is tedious at the moment at you have to go to every line with a breakpoint and run the remove breakpoint command.
Here are some tasks to improve the UX.
New commands
Usability
The text was updated successfully, but these errors were encountered: