Alter an expression breakpoint deletes log message
Does this issue occur when all extensions are disabled?: No
- VS Code Version: 1.96.4
- OS Version: Windows 10
Steps to Reproduce:
- Create a new Log point by right clicking and choose "Log point"
- Enter some Text, and hit return
- Again right click the log point and choose edit
- choose "Expression" and enter an expression and hit return
- Right click the log point, choose "Expression" and change the prior entered value and hit enter
- the breakpoint symbol changes from diamond to circle and the log message is gone
Tested this with different debugger extension and the behavior is always the same.
Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.96.4. Please try upgrading to the latest version and checking whether this issue remains.
Happy Coding!
@roblourens Hi! I've been actively working on this issue and have already made progress in identifying and addressing the problem. If possible, I’d like to take on this task. Let me know if it can be assigned to me.
Happy to look at a PR or discuss the approach. We just don't assign issues to public contributors
I think the issue was that updateBreakpoints replaced the entire breakpoint state, causing properties like logMessage to be lost when switching to an expression breakpoint. My code suggestion ensures properties are only overwritten if explicitly provided, by merging bpData with existing values. I also added a test to verify that updates correctly retain existing properties.
Hi! @roblourens. Have you had any time to check out my code suggestion? Let me know if you need any changes. Thanks :)