summaryrefslogtreecommitdiffstats
path: root/core/debugger/local_debugger.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/debugger/local_debugger.cpp')
-rw-r--r--core/debugger/local_debugger.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/core/debugger/local_debugger.cpp b/core/debugger/local_debugger.cpp
index dc46ffc307..a5d807f66b 100644
--- a/core/debugger/local_debugger.cpp
+++ b/core/debugger/local_debugger.cpp
@@ -171,7 +171,7 @@ void LocalDebugger::debug(bool p_can_continue, bool p_is_error_breakpoint) {
} else {
String key_value = line.get_slicec(' ', 1);
- int value_pos = key_value.find("=");
+ int value_pos = key_value.find_char('=');
if (value_pos < 0) {
print_line("Error: Invalid set format. Use: set key=value");
@@ -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);
}
@@ -344,7 +344,7 @@ Pair<String, int> LocalDebugger::to_breakpoint(const String &p_line) {
String breakpoint_part = p_line.get_slicec(' ', 1);
Pair<String, int> breakpoint;
- int last_colon = breakpoint_part.rfind(":");
+ int last_colon = breakpoint_part.rfind_char(':');
if (last_colon < 0) {
print_line("Error: Invalid breakpoint format. Expected [source:line]");
return breakpoint;