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

119 Commits

Author SHA1 Message Date
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
kobewi
c0083e431b Cleanup unused engine code v2 2023-01-19 13:02:18 +01:00
Rémi Verschelde
d95794ec8a One Copyright Update to rule them all
As many open source projects have started doing it, we're removing the
current year from the copyright notice, so that we don't need to bump
it every year.

It seems like only the first year of publication is technically
relevant for copyright notices, and even that seems to be something
that many companies stopped listing altogether (in a version controlled
codebase, the commits are a much better source of date of publication
than a hardcoded copyright statement).

We also now list Godot Engine contributors first as we're collectively
the current maintainers of the project, and we clarify that the
"exclusive" copyright of the co-founders covers the timespan before
opensourcing (their further contributions are included as part of Godot
Engine contributors).

Also fixed "cf." Frenchism - it's meant as "refer to / see".
2023-01-05 13:25:55 +01:00
Fabio Alessandrelli
67265d14f7 [MP] Move engine and editor profilers to a plugin.
Also refactor the editor plugin out of the ReplicationEditor.
2022-11-14 15:09:00 +01:00
Rémi Verschelde
54418ea659 Remove NO_THREADS fallback code, Godot 4 requires thread support
This also removes `OS::can_use_threads` from the public API since it's always
true.
2022-10-03 11:23:26 +02:00
Rémi Verschelde
90019676b0 Code quality: Fix header guards consistency
Adds `header_guards.sh` bash script, used in CI to validate future
changes. Can be run locally to fix invalid header guards.
2022-07-25 11:17:40 +02:00
Pedro J. Estébanez
033001375f Fix editor re-focus on debugger break on Windows 2022-07-21 21:47:05 +02:00
Voylin
cebdfd1bbd Fixing Print_rich which only displays correctly in terminal
There was an issue that the type was not passed through correctly. These couple of lines fix this issue and make print_rich work as expected.
2022-07-01 04:34:19 +09:00
TechnoPorg
9961881b98 Remove SceneTree dependency from LocalDebugger
Core classes should not have dependencies on scene classes.
2022-06-29 19:49:27 -06:00