summaryrefslogtreecommitdiffstats
path: root/core/debugger
diff options
context:
space:
mode:
authorThaddeus Crews <repiteo@outlook.com>2024-11-12 12:13:13 -0600
committerThaddeus Crews <repiteo@outlook.com>2024-11-12 12:13:13 -0600
commit4d4353179e22ed441604ded8715a511406634814 (patch)
treec4d0e6b54cee0bd17aed9c267acdaeb8fb411a62 /core/debugger
parent179321a0a3decf8b2b759160b348f4b969465089 (diff)
parent9a94353fa3644c8a99f35694c59d51708a496080 (diff)
downloadredot-engine-4d4353179e22ed441604ded8715a511406634814.tar.gz
Merge pull request #97218 from wenqiangwang/local_debuggger_expr_evalulation
Add support for `print` command in local (command line `-d`) debugger
Diffstat (limited to 'core/debugger')
-rw-r--r--core/debugger/local_debugger.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/debugger/local_debugger.cpp b/core/debugger/local_debugger.cpp
index dc46ffc307..5e79a6d395 100644
--- a/core/debugger/local_debugger.cpp
+++ b/core/debugger/local_debugger.cpp
@@ -208,10 +208,10 @@ void LocalDebugger::debug(bool p_can_continue, bool p_is_error_breakpoint) {
print_variables(members, values, variable_prefix);
} else if (line.begins_with("p") || line.begins_with("print")) {
- if (line.get_slice_count(" ") <= 1) {
- print_line("Usage: print <expre>");
+ if (line.find_char(' ') < 0) {
+ print_line("Usage: print <expression>");
} else {
- String expr = line.get_slicec(' ', 2);
+ String expr = line.split(" ", true, 1)[1];
String res = script_lang->debug_parse_stack_level_expression(current_frame, expr);
print_line(res);
}