1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00
Commit Graph

127 Commits

Author SHA1 Message Date
devloglogan
1a8306bbc1 Allow custom monitors to select desired type 2025-10-22 07:31:44 -05:00
Thaddeus Crews
5935a32e32 Core: Cleanup headers in core/config
- `MainLoop` now forward-declared in `OS`
2025-10-06 09:20:56 -05:00
Aaron Franke
3d1c9fd5de Move server files into their subfolders 2025-09-30 19:39:39 -07:00
Thaddeus Crews
6b22951162 Merge pull request #107954 from stuartcarnie/unix_domain_socket_support
Add Core UNIX domain socket support
2025-09-30 18:35:08 -05:00
Thaddeus Crews
fdf32d1b2a Merge pull request #108577 from YYF233333/global_class_list
Simplify `ScriptServer::get_global_class_list`
2025-09-30 11:19:10 -05:00
Stuart Carnie
7227fdd805 Core: Add UNIX domain socket support
> [!NOTE]
>
> Later versions of Windows has support for `AF_UNIX`, so it could be
> added.
2025-09-26 05:46:19 +10:00
Edward Moulsdale
e366471fdc Add GDSOFTCLASS to deeper inheritors of Object 2025-09-24 19:15:56 +01:00
Yufeng Ying
a50fc5acd8 Change ClassDB::get_class_list and related stuff. 2025-09-16 15:00:33 +08:00
Thaddeus Crews
d97d8c16e7 Merge pull request #107663 from mihe/script-break-error
Fix errors not being emitted when debugger breaks on script errors
2025-06-24 09:58:38 -05:00
Stuart Carnie
2ebf8369f0 Core: Fix data race in remote debugger; handle errors 2025-06-19 06:25:56 +10:00
Mikael Hermansson
1b7b44390a Fix errors not being emitted when debugger breaks on script errors 2025-06-18 11:52:26 +02:00
Thaddeus Crews
d3956ea0f2 Merge pull request #103979 from ydeltastar/evaluator-global-classes
Fix global classes can't be used in the Evaluator
2025-06-09 17:08:44 -05:00
Danil Alexeev
24494d840e Core: Unify display of error type prefixes 2025-06-09 20:18:51 +03:00
ydeltastar
a5181d75f4 Fix global classes can't be used in the Evaluator 2025-06-09 13:47:17 -03:00
kobewi
5af4bef46f Inline static variables (part 1) 2025-04-29 18:10:44 +02:00
Yufeng Ying
7a1a970c25 size() <= 0 and size() < 1. 2025-04-02 19:18:44 +08:00
Yufeng Ying
4f4031a675 Replace size() == 0 with is_empty(). 2025-04-02 19:18:43 +08:00
kobewi
75881f8322 Use initializer list in Arrays 2025-03-26 18:38:15 +01:00
kobewi
7d82704f12 Allow to ignore debugger error breaks 2025-03-12 19:05:57 +01:00
Thaddeus Crews
7d46e7d011 Merge pull request #98379 from timothyqiu/alien-thread
Translate main thread name in the editor instead of running project
2025-03-10 10:01:11 -05:00
Thaddeus Crews
324512e11c Style: Replace header guards with #pragma once 2025-03-07 17:33:47 -06:00
A Thousand Ships
5113022dfe Clean up some uses of String::substr
Cases where the end position is either equvalent to the default or past
the end of the string.
2025-03-07 14:50:38 +01:00
Haoyu Qiu
513dbff72b Translate main thread name in the editor instead of running project 2025-03-07 19:06:54 +08:00
Adam Scott
33e16435f5 Replace some problematic uses of String::num to String::num_int64 2025-01-15 12:51:51 -05:00
Yufeng Ying
be86ce3103 Apply iwyu suggestion in core. 2024-12-19 00:43:47 +08:00
Lukas Tenbrink
b5c31ebb41 Add contains_char() for single-character 'contains' calls. 2024-12-06 20:23:35 +01:00
A Thousand Ships
68f638cf02 Use (r)find_char instead of (r)find for single characters 2024-11-17 10:02:18 +01:00
Thaddeus Crews
4d4353179e Merge pull request #97218 from wenqiangwang/local_debuggger_expr_evalulation
Add support for `print` command in local (command line `-d`) debugger
2024-11-12 12:13:13 -06:00
Fabio Alessandrelli
7cd850b909 [Debugger] Move quit shortcut configuration to the SceneDebugger 2024-11-07 15:03:17 +01:00
A Thousand Ships
38f9769bc6 [Core] Improve error messages with vformat 2024-10-30 15:55:51 +01:00
Adam Scott
0d350e7108 Set clang-format RemoveSemicolon rule to true
- Set clang-format `Standard` rule to `c++20`
2024-10-25 13:49:43 -04:00
kobewi
645abdbb80 Add expression evaluater to debugger (REPL)
Co-authored-by: rohanrhu <rohanrhu2@gmail.com>
2024-10-01 15:36:09 +02:00
Wenqiang
9a94353fa3 Added support for 'print' command in local (command line -d) debugger 2024-09-28 13:28:07 -07:00
Thaddeus Crews
9f9ee0c813 SCons: Add unobtrusive type hints in SCons files 2024-09-25 09:34:35 -05:00
A Thousand Ships
e33fdb4296 Use MutexLock in more places 2024-08-29 14:12:59 +02:00
Jamie Pate
b18e1e0dcd Fix Game window stops responding when debugger pauses
Fixes #73374

As of godot 4 On windows/osx the game window will be frozen and will not
be updated.

In the debugger loop it calls

OS::get_singleton()->process_and_drop_events();
which allows windows/osx to handle system events. If the window doesn't
handle these events then both systems will judge the window to be 'not
responding' (osx beachball cursor)

When the event processing code was migrated from OS to DisplayServer the
process_and_drop_events() logic was moved to DisplayServer, but the call
inside the remote debugger pause loop was not updated to call the
DisplayServer version, there are currently no implementations of
OS::process_and_drop_events() so i removed it and switched to the new
DisplayServer::force_process_and_drop_events() method.
2024-07-10 13:38:57 -07:00
A Thousand Ships
a0dbdcc3ab Replace find with contains/has where applicable
* Replaces `find(...) != -1` with `contains` for `String`
* Replaces `find(...) == -1` with `!contains` for `String`
* Replaces `find(...) != -1` with `has` for containers
* Replaces `find(...) == -1` with `!has` for containers
2024-05-08 12:37:42 +02:00
A Thousand Ships
955d5affa8 Reduce and prevent unnecessary random-access to List
Random-access access to `List` when iterating is `O(n^2)` (`O(n)` when
accessing a single element)

* Removed subscript operator, in favor of a more explicit `get`
* Added conversion from `Iterator` to `ConstIterator`
* Remade existing operations into other solutions when applicable
2024-05-04 16:08:55 +02:00
Muller-Castro
a8bc9f3e78 Add const lvalue ref to core/* container parameters 2024-02-14 11:20:36 -03:00
Thaddeus Crews
b3cac9c092 Allow Ref instantiate to accept constructor args 2024-02-10 13:19:14 -06:00
A Thousand Ships
684752e75b Replace error checks against size with is_empty 2024-02-09 12:50:15 +01:00
Yuri Sizov
c027aecc2e Merge pull request #86676 from rune-scape/sparse-script-reload
GDScript: Hot-reload changed scripts only
2024-01-17 18:52:54 +01:00
ACB
c976306628 fix deadlock in RemoteDebugger::debug 2024-01-14 11:07:14 +01:00
rune-scape
cde478bda6 Hot-reload only changed scripts 2024-01-02 17:56:52 -08:00
Wilson E. Alvarez
a3cb1b096f Add const references detected by clang-tidy 2023-12-16 13:36:44 -05:00
A Thousand Ships
893f889d74 [Core] Replace ERR_FAIL_COND with ERR_FAIL_NULL where applicable 2023-09-11 19:45:49 +02:00
Yuri Sizov
d8ff69d53c Extract ScriptInstance to simplify includes
This allows to include script_instance.h directly in the
generated gdvirtual.gen.inc, and remove excessive includes
from the codebase.

This should also allow Resource to use GDVIRTUAL macros,
which wasn't possible previously due to a circular dependency.
2023-09-06 22:54:38 +02:00
Juan Linietsky
5e512b705e Support threads in the script debugger
* This implementation adds threads on the side of the client (script debugger).
* Some functions of the debugger are optimized.
* The profile is also now thread safe using atomics.
* The editor can switch between multiple threads when debugging.

This PR adds threaded support for the script language debugger. Every thread has its own thread local data and it will connect to the debugger using multiple thread IDs.
This means that, now, the editor can receive multiple threads entering debug mode at the same time.
2023-07-26 12:06:45 +02:00
Simon Barkehanai
4ecad8dea3 Fix infinite loop on EOF in the command line debugger
When using the command line debugger (godot -d) on Unix systems, when
entering an EOF (ctrl+D), the debugger enters an infinite loop.

Adding a check for EOF in the debugger loop exits the debugger when EOF
is entered.

Fixes #50170.
2023-06-11 04:20:22 -07:00
Juan Linietsky
a37c30dfc9 Fix thread IDs.
On Linux, thread IDs were not properly assigned with the current approach.
The line:
`std::thread new_thread(&Thread::callback, _thread_id_hash(thread.get_id()), p_settings, p_callback, p_user);`
does not work because the thread ID is not assigned until the thread starts.

This PR changes the behavior to use manually generated thread IDs. Additionally, if a thread is (or may have been created) outside Godot, the method `Thread::attach_external_thread` was added.
2023-04-24 15:13:58 +02:00