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

Move Debug menu logic to DebuggerEditorPlugin, allow 4 debug instances #36920

Merged
merged 2 commits into from
Mar 9, 2020

Conversation

Faless
Copy link
Collaborator

@Faless Faless commented Mar 8, 2020

In this PR:

multiple

@Faless Faless force-pushed the debugger/more_instances branch from 27d7cb0 to bfc1b76 Compare March 9, 2020 09:00
Copy link
Member

@akien-mga akien-mga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome to get more code out of the huge editor_node.cpp :)

@akien-mga
Copy link
Member

Do command line debug options still work as expected after this change?

  --remote-debug <address>         Remote debug (<host/IP>:<port> address).
  --debug-collisions               Show collision shapes when running the scene.
  --debug-navigation               Show navigation polygons when running the scene.

@Faless
Copy link
Collaborator Author

Faless commented Mar 9, 2020

Do command line debug options still work as expected after this change?

Yes, EditorRun still uses them for the command line but, when deciding which one to set, it reads the booleans from EditorSettings project metadata instead of a member var set by the EditorNode.

bool debug_collisions = EditorSettings::get_singleton()->get_project_metadata("debug_options", "run_debug_collisons", false);
bool debug_navigation = EditorSettings::get_singleton()->get_project_metadata("debug_options", "run_debug_navigation", false);
if (debug_collisions) {
args.push_back("--debug-collisions");
}
if (debug_navigation) {
args.push_back("--debug-navigation");
}

EDIT: And.. I've tested them :)

@akien-mga akien-mga merged commit e162c07 into godotengine:master Mar 9, 2020
@akien-mga
Copy link
Member

Thanks!

@realkotob
Copy link
Contributor

realkotob commented Mar 9, 2020

Is it possible to cherrypick this into 3.2.x ?

We have an ongoing client project that we regularly test with 4 instances (the final production target is 8 local devices) so having this feature would be god-sent!

@Faless
Copy link
Collaborator Author

Faless commented Mar 9, 2020

Is it possible to cherrypick this into 3.2.x ?

Sadly no, the code in the 3.2 branch is completely different from the one in master branch. namely multiple instance support in the debugger has been added in #36244 and cherry picking that is too risky as it may introduce many regressions.

@kelteseth
Copy link

@Faless thanks for this really nice feature! I toyed with the multiple instance feature a bit and I have some questions.

  1. Is there a way to set command line arguments for every instance? For example, I want instance 1 to be the server and the other 3 to be clients. My current workflow in GD 3 is to start the server in the Editor and a client via a .bat file.

  2. Is there a way to see the remote tree for a specific instance?

Cheers!

@Calinou
Copy link
Member

Calinou commented Sep 26, 2020

Is there a way to set command line arguments for every instance? For example, I want instance 1 to be the server and the other 3 to be clients. My current workflow in GD 3 is to start the server in the Editor and a client via a .bat file.

Right now, there's no widget in the editor to do this. You can set the command-line arguments using Main Run Args in the Project Settings, but this affects all instances. See godotengine/godot-proposals#522.

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

Successfully merging this pull request may close these issues.

Allow launching multiple game instances Build and play buttons to run multiple instances at once
5 participants