jimingham wrote: This is a slightly orthogonal point, but I don't think we should confine this error visualization to just expressions. If the user passes a non-boolean string to an option in a command, it would be helpful to point at the option for them, much as pointing to the part of the expression that doesn't parse is useful. And if we're pointing at errors in expressions, it looks kind of odd that we don't do the same thing for other commands.
I'm not suggesting that that be part of this work, but when thinking about when this kind of thing would be appropriate I think would be unfortunate if we didn't allow the same feature at least for parsed commands. Jim > On Sep 27, 2024, at 2:00 AM, Pavel Labath ***@***.***> wrote: > > > I'm actually surprised that lldb-dap sees the new diagnostics because I > thought it would run the expression through a lower-level API like > SBFrame::EvaluateExpression(). But I guess it just provides a "terminal" > window that passes everything through HandleCommand. To support this better, > I'm thinking about adding a setting to opt into the inline diagnostics that > only lldb sets, so we don't get unexpected results like this. > > It has both. lldb-dap does this weird heuristic console multiplexing, where > it guesses whether something should be treated like an expression (I guess > that's because other VSCode debuggers do that), which is executed through > EvaluateExpression, or an lldb command, which is executed through > HandleCommand. So it's not very likely that a user will be running a > "command" to evaluate an expression, but I think it still illustrates my > point that HandleCommand can be (and probably is) invoked in contexts where > one cannot guarantee the alignment of the output. > > — > Reply to this email directly, view it on GitHub > <https://github.com/llvm/llvm-project/pull/106470#issuecomment-2378798335>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/ADUPVW3LWDCV5NKNNMDEQOTZYUNELAVCNFSM6AAAAABNJIEXUGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNZYG44TQMZTGU>. > You are receiving this because you were mentioned. > https://github.com/llvm/llvm-project/pull/106470 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits