parray is an lldb command line command. It looks like the watch window expects an expression, not lldb commands. lldb's expression parser, unlike gdb's, is just the underlying language parser (e.g. it uses a copy of clang for C++). That makes it a more faithful evaluator of the expressions you hand it, but limits what debugger centric syntax we can introduce (like the gdb @10 ). So you could watch the elements one by one, but there isn't C syntax for "elements 0-9 of an array" so the expression parser doesn't support that either. Presumably, VSCode has a "debugger console" for debugger commands. That's where you would enter the parray command. lldb also has stop hooks , so if you wanted to see this array's values in the console each time you stopped, you could do:
1条答案
按热度按时间k5ifujac1#
parray
is an lldb command line command. It looks like the watch window expects an expression, not lldb commands. lldb's expression parser, unlike gdb's, is just the underlying language parser (e.g. it uses a copy of clang for C++). That makes it a more faithful evaluator of the expressions you hand it, but limits what debugger centric syntax we can introduce (like the gdb@10
). So you couldwatch
the elements one by one, but there isn't C syntax for "elements 0-9 of an array" so the expression parser doesn't support that either.Presumably, VSCode has a "debugger console" for debugger commands. That's where you would enter the parray command. lldb also has
stop hooks
, so if you wanted to see this array's values in the console each time you stopped, you could do:stop hooks can be set to trigger only for certain functions, so you could limit this printing to the function where passport is defined, as well.