microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
162.33k stars 28.59k forks source link

Debug: Logpoint: Intellisense #157416

Closed PrimeTime416 closed 1 year ago

PrimeTime416 commented 2 years ago

Please allow for intellisense when entering in the Log Message Template Section {}, currently is says No Suggestions. Thanks!

image

VSCodeTriageBot commented 2 years ago

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

sujyotraut commented 2 years ago

This feature will make debugging in vscode a lot better experience & improve productivity. We appreciate this feature.

VSCodeTriageBot commented 1 year ago

This feature request has not yet received the 20 community upvotes it takes to make to our backlog. 10 days to go. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

VSCodeTriageBot commented 1 year ago

:slightly_frowning_face: In the last 60 days, this feature request has received less than 20 community upvotes and we closed it. Still a big Thank You to you for taking the time to create this issue! To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

colin-grant-work commented 1 year ago

It may be worth adding here that this was not a request for new functionality. This functionality is already implemented but is broken - I suspect due to changes in the bracket system.

https://github.com/microsoft/vscode/blob/61532aeb5643822cf46cb8ccf0301024ad4af483/src/vs/workbench/contrib/debug/browser/breakpointWidget.ts#L247-L277

That code clearly indicates that if the context is a log message and isPositionInCurlyBracketBlock(this.input), completions should be provided. That they are not being provided is a bug.

@roblourens, in case closed issues are silenced.

roblourens commented 1 year ago

Thanks for pointing that out, I agree this actually looks broken. @hediet it looks like you changed the bracket detection logic, could you take a look?

hediet commented 1 year ago

This actually works for symbols: image

Member completion never worked here and will probably never be supported. The reason for this is that typescript cannot offer contextual member completion for strings outside of source files.

colin-grant-work commented 1 year ago

@hediet, what you're seeing is not what I'm seeing in 1.72.2. For me, no suggestions are ever provided for a log point in a TS file, whether it's a member reference or not:

image

image

image

vince-fugnitto commented 1 year ago

@roblourens @hediet like Colin mentioned I'm not getting any completions whatsoever for logpoints when using v1.72.2.

colin-grant-work commented 1 year ago

@hediet, To provide a little more detail, the problem is definitely in the bracket system:

image

Here I'm debugging when I hit ctrl+i in the breakpoint widget. It's hitting the conditional check at line 250 in the code I posted above, and it succeeds until it hits the check for whether it's in brackets, and that check returns false, though my cursor is obviously inside curly brackets.

hediet commented 1 year ago

I can reproduce now after clearing my settings.

As stupid as it sounds, it works with this setting:

"[plaintext]": {
    "editor.language.colorizedBracketPairs": [
        ["{", "}"]
    ]
},
hediet commented 1 year ago

Fixed by https://github.com/microsoft/vscode/issues/170497