vscode-extension-tester icon indicating copy to clipboard operation
vscode-extension-tester copied to clipboard

[πŸš€ Request] Add new feature to interact with conditional breakpoint input box

Open sergiuilie opened this issue 1 year ago β€’ 2 comments

What is the feature you are missing? Trying to write a test where I can validate a conditional breakpoint and I came across multiple issues, there is no direct API to set a conditional breakpoint but I thought that I have a workaround for that:

  1. Go to the line you need the breakpoint
  2. Execute await new Workbench().executeCommand('Debug: Add Conditional Breakpoint');
  3. Type into the 'Expression' box that is currently open

until, I came across point number 3 where I can not type into that box, as it is not an input box or any element that I can catch using findElement or any other method, apparently is a span that does activate only when you type in it.

image

If we can add a new API under the EditorView functionality that can be used to toggle a conditional breakpoint, something like toggleConditionalBreakpoint(line: number, expression?: string, hitCount?: number, logMessage?: string)

Could you provide some example of usage? I can present some use cases:

  • Interacting with the message box that appears on VSCode when you set an invalid conditional breakpoint.
  • Validating the hit counts on a specific breakpoint in a loop.

sergiuilie avatar Mar 15 '23 13:03 sergiuilie

I wrote an article regarding my experience with your extension, check it out MEDIUM ARTICLE LINK

sergiuilie avatar May 29 '23 11:05 sergiuilie

Thank you for sharing your article @sergiuilie !

djelinek avatar Jun 23 '23 18:06 djelinek

So problem with this request is already mentioned by you. Opened box is represented by pseudo-element (::after) which is not a actual DOM element and it’s not possible to interact with it using WebDriver. Span is activated after some text is provided. We are not able to provide solution for this now as I was not able to find any workaround for this. Focusing on parent elements with interest to send text into Expression (or any other option from selection box) is not working as well.

pospisilf avatar Sep 04 '24 05:09 pospisilf

So problem with this request is already mentioned by you. Opened box is represented by pseudo-element (::after) which is not a actual DOM element and it’s not possible to interact with it using WebDriver. Span is activated after some text is provided. We are not able to provide solution for this now as I was not able to find any workaround for this. Focusing on parent elements with interest to send text into Expression (or any other option from selection box) is not working as well.

Thanks for looking into this

sergiuilie avatar Sep 10 '24 14:09 sergiuilie