opened
testforstephen
username_0
- VSCode Version:
```
Version: 1.40.0-insider (system setup)
Commit: b7b21844e760e632f39bedf651da2bc93f54b0cc
Date: 2019-10-29T06:48:38.866Z
Electron: 6.1.2
Chrome: 76.0.3809.146
Node.js: 12.4.0
V8: 7.6.303.31-electron.0
OS: Windows_NT x64 10.0.18363
```
- OS Version: Windows 10

I try to enable data breakpoint for Java debugger, here are some problems i find.
- VS Code didn't respect the `accessTypes` attribute of [DataBreakpointInfoResponse](https://microsoft.github.io/debug-adapter-protocol/specification#Requests_DataBreakpointInfo). When it returns an array `['read', 'write', 'readWrite']`, right click the variable, the menu only shows`Break When Value Changes`. 
- VS Code didn't respect the `canPersist` attribute of [DataBreakpointInfoResponse](https://microsoft.github.io/debug-adapter-protocol/specification#Requests_DataBreakpointInfo) well. When it is `true`, the BREAKPOINTS viewlet will keep it there after the debug session terminates. But when launching a new debug session, no `setDataBreakpoints` request are sent to debugger during initialization. The debugger has no chance to enable the persisted data breakpoints.
-  Cannot edit the attributes for the existed data breakpoint. For example, cannot change its access type, no UI to add `condition` and `hitCondition`.
- Should distinct the data breakpoint for the same variable or type. Currently, i can add multiple duplicated Data Breakpoints for the same variable. It's better to disable this operation if there is a data breakpoint existed for the same variable. Maybe `dataId` can be used as the key to detect the duplication.
Problems for Data Breakpoint
issue
created
weinand
username_1
@username_0 Thanks a lot for providing this great feedback!

For issue 2 I've created a separate bug: 
Issues 1, 3, 4, 5 are known limitations of VS Code's current implementation which we are planning to address over the next milestones.
comment
created
yannickowow
username_2
Hi all,
Thanks for this feedback, it shows that I'm not the only one who expects this features!

Can it be possible to also add a DataBreakpoints from the "Watch" view ? I suppose that you can extract the current expression and send it as an argument for sendDataBreakpointRequest.

Thanks in advance!
comment
created
yannickowow
username_2
Hi,
I did manage to find a way to show actions relative to current `Breakpoint` access types. I use check marks to show current R/W attribute, and non-compatible ones are greyed out
![image](https://user-images.githubusercontent.com/45362067/103174896-3223c080-4866-11eb-8971-9815485226e8.png)
Is it something worth a PR ?
Thanks in advance.
comment
created
isidorn
username_3
@username_2 thanks for that, however it feels to me like the proper way to handle this is to open the Breakpoint context menu to extension contributions. Similar to how we have the variables and the call stack view open to contributions.
If you think this makes sense it would be great if you file a new feature request and tag me on the issue. Thanks!
comment
created
weinand
username_1
@username_3 since data breakpoint access types are [part of the DAP spec](https://microsoft.github.io/debug-adapter-protocol/specification#Requests_DataBreakpointInfo), VS Code should surface a UI for them (instead of individual extensions).
comment
created
yannickowow
username_2
Yes, that is what I understood as well from DAP spec. 
@username_3 after that, should I open a new feature request ?
comment
created
isidorn
username_3
@username_2 yes, feel free to open a new feature request and ping me on it. Thanks
comment
created
isidorn
username_3
I think most of the original request have now been tackled. Thus closing, and feel free to create follow up issues for missing things.
comment
closed
isidorn
username_3
issue