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

[3.x] [Debugger] Add --debug-server CLI option. #60819

Merged
merged 1 commit into from
May 6, 2022

Conversation

Faless
Copy link
Collaborator

@Faless Faless commented May 6, 2022

Automatically starts the editor debug server at given <IP>:<PORT>.

E.g.:

# Run editor and debug server listening on any interface, port 8080
godot3 -e --path proj/proj_empty --debug-server *:8080

# Run the godot project connecting to that debug server.
godot3 --path proj/proj_empty --remote-debug 127.0.0.1:8080

3.x bits of #52226 .

Automatically starts the editor debug server at given <IP>:<PORT>.

E.g.:
 # Run editor and debug server listening on any interface, port 8080
godot3 -e --path proj/proj_empty --debug-server *:8080

 # Run the godot project connecting to that debug server.
godot3 --path proj/proj_empty --remote-debug 127.0.0.1:8080
@Faless Faless added enhancement topic:editor usability topic:network cherrypick:3.x Considered for cherry-picking into a future 3.x release labels May 6, 2022
@Faless Faless added this to the 3.x milestone May 6, 2022
@Faless Faless requested a review from akien-mga May 6, 2022 12:07
@Faless Faless requested review from a team as code owners May 6, 2022 12:07
@akien-mga akien-mga modified the milestones: 3.x, 3.5 May 6, 2022
@akien-mga akien-mga removed the cherrypick:3.x Considered for cherry-picking into a future 3.x release label May 6, 2022
@akien-mga
Copy link
Member

Tested to connect between Linux PC and a Steam Deck, works great!

  • Ran Linux PC editor first with: godot-3.x -e --debug-server 127.0.0.1:6007
  • Then ran exported debug build on Steam Deck with Jetpaca.x86_64 --remote-debug 192.168.1.7:6007 (that's my Linux PC IP)
  • Profit :) Remote scene changes and inspection work fine. Had issues with script reloading but that's not related to this change, I have it also with a localhost connection.

@akien-mga akien-mga merged commit 60dc792 into godotengine:3.x May 6, 2022
@akien-mga
Copy link
Member

Thanks!

@rubenwardy
Copy link

rubenwardy commented Aug 19, 2022

Hi! Didn't want to create an issue without confirming whether this is a bug or not. If I use --debug-server, I can successfully connect my game to the editor's debugger once. However, once the session ends, you need to restart the Godot Editor for the debug server to open/work again.

Would making Godot keep the debug server open be a proposal or a bug report?

Edit: reading the code, looks like this would be a proposal. I'll let godotengine/godot-proposals#2608 cover that then

Version: v3.5.stable.flathub [991bb6a]

Here's my commands:

flatpak run org.godotengine.Godot -e --path ~/dev/games/mygame/ --debug-server *:6007

./mygame.x86_64 --remote-debug 127.0.0.1:6007
# or
./mygame.x86_64 --remote-debug 192.168.0.20:6007

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.

3 participants