-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Alternative way for providing debug configuration snippets #4891
Comments
@WardenGnaw It is this line. Do you know why we need the actual launch.json file? |
We need to provide a document selector when we register the completion item provider for launch.json. This hooks into the |
There are two parts for providing a debug config https://vscode.readthedocs.io/en/latest/extensions/example-debuggers/, one is provideDebugConfigurations which provide the initial settings (or specifying initialConfigurations in package.json), and the other is to specify configurationSnippets, which provides the autocomplete stuff. Instead of the "standard" second part, you used a way to just insert to anywhere in the document as long as it's a launch.json file and intellisense pops up. So I doubt the problem you mentioned is the same. While it's unfortunate that cpptools can't really use the package.json ways since there are some os dependent items, it looks like function provideCompletionItems does pass in a position argument. Can you change the function to check if it's triggered at a proper position? For multi-root workspace file, it remains to be tested. But adding a document select for .code-workspace file would probably work? |
This issue has been closed automatically because it's labeled as 'external'. |
Type: Debugger
Because of the implementation (src/debugger/extension.ts, line 129 - 136), the intellisense for the snippets will be shown
The text was updated successfully, but these errors were encountered: