llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
27.97k stars 11.54k forks source link

[lldb-dap] show breakpoint hit count #104396

Closed fr43nk closed 3 days ago

fr43nk commented 1 month ago

Hi,

is it possible to show the hit count of a breakpoint somewhere in the hover quickinfo? I do not want to create a log point for this as this gets confusing when there are multiple breakpoints.

Best regards, Frank

llvmbot commented 1 month ago

@llvm/issue-subscribers-lldb

Author: Frank (fr43nk)

Hi, is it possible to show the hit count of a breakpoint somewhere in the hover quickinfo? I do not want to create a log point for this as this gets confusing when there are multiple breakpoints. Best regards, Frank
Da-Viper commented 4 weeks ago

image @fr43nk Is this what you mean ?

fr43nk commented 3 weeks ago

@Da-Viper that looks very promising. Is this a new feature in the extension? I cannot see it on my vscode.

Da-Viper commented 3 weeks ago

@Da-Viper that looks very promising. Is this a new feature in the extension? I cannot see it on my vscode.

It is in vscode and this is using the lldb-dap

Right click on the space before the numbering you should see option

add conditional breakpoint -> from the drop down select -> Hit Count -> then set the number of hit count

fr43nk commented 2 weeks ago

@Da-Viper Ah, no, so we had a misunderstanding here. What I mean is, that there is some kind of information for every set breakpoint, how often the breakpoint is hit. The "hit count" setting is something different, It means to stop at a certain hit count value.

fr43nk commented 1 week ago

@vogelsgesang @EugeneZelenko are there any news from your side about this feature?

Best regards, Frank

vogelsgesang commented 3 days ago

Afaict, this feature request is directed to the wrong project. This should be implemented in VS Code's debugger UI. I would recommend you open a corresponding feature request in https://github.com/microsoft/vscode/issues

The VS Code frontend apparently already keeps track of hit-counts for special "Hit Count" breakpoints, as shown by @Da-Viper's screenshot. I assume it would be rather straightforward to extend this bookkeeping also to normal breakpoints.

Even if we wanted to implement this functionality in lldb-dap, there seems to be no way for the debug adapter to instruct the UI to show additional information in the hover of a breakpoint. As such lldb-dap's hands are tied here.

Closing this issue, as I think it is out-of-scope of lldb-dap

fr43nk commented 2 days ago

Thank you @vogelsgesang. One short question: is the management of the "hit count" breakpoint also part of the vscode or is that something related to llvm-dap?