-
Notifications
You must be signed in to change notification settings - Fork 138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request for clarification on interaction among condition
, hitCondition
, logMessage
in breakpoints
#363
Comments
You could also argue that setting I agree that the spec should clarify this. However, changing that line in |
This was my interpretation too. Any other interpretation makes the arguments conflicting. The spec is IMO correct today. |
I'm the user who reported this on
Yes. I actually expected this without having read the spec. Conditional logpoints are also a more flexible option. In other words, it's superset of the current behavior of debugpy. A hot code path can produce too much noise when logging. Being able to only log under certain conditions is useful. A real world example is my need to log certain requests among 10K+ which satisfy certain headers. |
I suggest the following wording on the
I believe the existing requirement, "the debug adapter must not 'break'," is sufficient otherwise. We can also clarify another similar ambiguity on
|
My understanding of logpoints and their use case is that it's basically an injectable conditional print. For that to work, it has to not break (and if the user desires to break, they can put another breakpoint on the same line, right?). It's also how they have worked in VS historically. |
I think you can specify both, no? hitCondition counts the number of times the 'condition' is met. |
That's reasonable. I've updated my proposal above. |
Background:
Up until now what makes sense for me is that when
logMessage
is set breakpoints are skipped, but ifcondition
orhitCondition
is also set along withlogMessage
it'd log the message but it'd still break if the condition becomes true, even iflogMessage
is also set.However, a user brought up (in microsoft/debugpy#1146) that the description of
logMessage
mentioned that in https://microsoft.github.io/debug-adapter-protocol/specification#Types_SourceBreakpoint just says inlogMessage
:"If this attribute exists and is non-empty, the debug adapter must not 'break' (stop) but log the message instead."
I think that this is an oversight in the spec (given that I expected breakpoints to stop in that case and the spec doesn't really say anything about the interaction with other properties -- and this is also how the javascript debugger in VSCode works), but I'd like to confirm if this is the case or not.
The text was updated successfully, but these errors were encountered: