Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debug: Logpoint: Intellisense #157416

Closed
PrimeTime416 opened this issue Aug 7, 2022 · 12 comments
Closed

Debug: Logpoint: Intellisense #157416

PrimeTime416 opened this issue Aug 7, 2022 · 12 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues verified Verification succeeded
Milestone

Comments

@PrimeTime416
Copy link

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

image

@weinand weinand added debug Debug viewlet, configurations, breakpoints, adapter issues feature-request Request for new features or functionality labels Aug 7, 2022
@vscodenpa vscodenpa added this to the Backlog Candidates milestone Aug 7, 2022
@vscodenpa
Copy link

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
Copy link

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

@vscodenpa
Copy link

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!

@vscodenpa
Copy link

🙁 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!

@vscodenpa vscodenpa closed this as not planned Won't fix, can't repro, duplicate, stale Oct 8, 2022
@colin-grant-work
Copy link

colin-grant-work commented Oct 12, 2022

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.

provideCompletionItems: (model: ITextModel, position: Position, _context: CompletionContext, token: CancellationToken): Promise<CompletionList> => {
let suggestionsPromise: Promise<CompletionList>;
const underlyingModel = this.editor.getModel();
if (underlyingModel && (this.context === Context.CONDITION || (this.context === Context.LOG_MESSAGE && isPositionInCurlyBracketBlock(this.input)))) {
suggestionsPromise = provideSuggestionItems(this.languageFeaturesService.completionProvider, underlyingModel, new Position(this.lineNumber, 1), new CompletionOptions(undefined, new Set<CompletionItemKind>().add(CompletionItemKind.Snippet)), _context, token).then(suggestions => {
let overwriteBefore = 0;
if (this.context === Context.CONDITION) {
overwriteBefore = position.column - 1;
} else {
// Inside the currly brackets, need to count how many useful characters are behind the position so they would all be taken into account
const value = this.input.getModel().getValue();
while ((position.column - 2 - overwriteBefore >= 0) && value[position.column - 2 - overwriteBefore] !== '{' && value[position.column - 2 - overwriteBefore] !== ' ') {
overwriteBefore++;
}
}
return {
suggestions: suggestions.items.map(s => {
s.completion.range = Range.fromPositions(position.delta(0, -overwriteBefore), position);
return s.completion;
})
};
});
} else {
suggestionsPromise = Promise.resolve({ suggestions: [] });
}
return suggestionsPromise;
}
}));

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
Copy link
Member

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?

@roblourens roblourens assigned hediet and unassigned roblourens Oct 13, 2022
@roblourens roblourens added bug Issue identified by VS Code Team member as probable bug and removed feature-request Request for new features or functionality labels Oct 13, 2022
@roblourens roblourens reopened this Oct 13, 2022
@hediet hediet modified the milestones: Backlog, November 2022 Oct 20, 2022
@hediet
Copy link
Member

hediet commented Nov 2, 2022

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.

@hediet hediet closed this as not planned Won't fix, can't repro, duplicate, stale Nov 2, 2022
@hediet hediet added the *out-of-scope Posted issue is not in scope of VS Code label Nov 2, 2022
@colin-grant-work
Copy link

colin-grant-work commented Nov 2, 2022

@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
Copy link

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

@colin-grant-work
Copy link

colin-grant-work commented Nov 2, 2022

@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 hediet removed the *out-of-scope Posted issue is not in scope of VS Code label Nov 3, 2022
@hediet hediet reopened this Nov 3, 2022
@hediet
Copy link
Member

hediet commented Nov 3, 2022

I can reproduce now after clearing my settings.

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

"[plaintext]": {
    "editor.language.colorizedBracketPairs": [
        ["{", "}"]
    ]
},

@hediet
Copy link
Member

hediet commented Jan 30, 2023

Fixed by #170497

@hediet hediet closed this as completed Jan 30, 2023
@lramos15 lramos15 added the verified Verification succeeded label Feb 21, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Mar 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants