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

CLI debugger (--debug) does not work with standalone scripts (--script) #32693

Open
Tracked by #51393
wyattbiker opened this issue Oct 9, 2019 · 3 comments
Open
Tracked by #51393

Comments

@wyattbiker
Copy link

Godot version:
3.2.alpha1.official

OS/device including version:
Mac OS X Mojave

Issue description:
As per documentation from godot -h:

Debug options:
  -d, --debug                      Debug (local stdout debugger).
  -b, --breakpoints                Breakpoint list as source::line comma-separated pairs, no spaces (use %20 instead).

I am trying to use the -b and -d options from the command line, but it's as if nothing happens.
godot -s somescript.gd --debug --breakpoints somescript.gd::3

Steps to reproduce:
Create somescript.gd script and execute above CLI command.

extends SceneTree
var somevar = 20
var foo1='abcd'
func _init():
	print(foo1)
@akien-mga akien-mga changed the title 3.2.alpha1.official CLI Debugger does not debug nor break. CLI debugger (--debug) does not work with standalone scripts (--script) Oct 10, 2019
@akien-mga
Copy link
Member

It works fine when you are running an actual scene, but it doesn't seem to work together with the --script option indeed.

@wyattbiker
Copy link
Author

wyattbiker commented Oct 10, 2019

I don't think it runs 100% correct even with scene only.

https://docs.godotengine.org/en/3.1/getting_started/editor/command_line_tutorial.html#debugging

There is some confusion as to what is supposed to happen when you run -d.
E.g.
godot TestScript.tscn -d

It seems, if there is no syntax/runtime error, it does not break into the debugger prompt even when using a scene. But introduce an error in the scene attached script, e.g. x = somevar / 0 then it will break.

@KoBeWi
Copy link
Member

KoBeWi commented Oct 28, 2020

Still valid in 3.2.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants