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

launch.json configuration's autocomplete (snippet) not displaying extension configurations #80601

Closed
WardenGnaw opened this issue Sep 10, 2019 · 7 comments
Assignees
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues *out-of-scope Posted issue is not in scope of VS Code under-discussion Issue is under discussion for relevance, priority, approach
Milestone

Comments

@WardenGnaw
Copy link
Member

Issue Type: Bug

  1. Install Microsoft C/C++ extension
  2. Create a simple cpp file (e.g. main.cpp)
int main(void)
{
   return 0;
}
  1. Create a launch.json file
{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
    ]
}
  1. Try to insert a snippet into the configurations array and the dropdown list does not list the C++ extension configurations.

Note: The configurations will be shown if you use the "Add Configuration..." button on the lower right hand corner.

VS Code version: Code 1.38.0 (3db7e09, 2019-09-03T21:49:13.459Z)
OS version: Windows_NT x64 10.0.18362

System Info
Item Value
CPUs Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz (8 x 3408)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
oop_rasterization: disabled_off
protected_video_decode: unavailable_off
rasterization: enabled
skia_deferred_display_list: disabled_off
skia_renderer: disabled_off
surface_synchronization: enabled_on
video_decode: enabled
viz_display_compositor: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 31.92GB (4.40GB free)
Process Argv
Screen Reader no
VM 0%
Extensions (23)
Extension Author (truncated) Version
rest-client hum 0.21.3
azure-pipelines ms- 1.152.0
vscode-apimanagement ms- 0.1.1
vscode-azureappservice ms- 0.15.0
vscode-azurefunctions ms- 0.17.1
vscode-azurestorage ms- 0.7.0
vscode-cosmosdb ms- 0.10.2
mssql ms- 1.6.0
remote-containers ms- 0.59.0
remote-ssh ms- 0.42.2
remote-ssh-edit ms- 0.42.2
remote-ssh-explorer ms- 0.42.2
remote-wsl ms- 0.38.0
vscode-remote-extensionpack ms- 0.15.0
azure-account ms- 0.8.4
azurecli ms- 0.4.6
cpptools ms- 0.25.1
csharp ms- 1.20.0
mono-debug ms- 0.15.8
vscode-node-azure-pack ms- 0.0.9
azurerm-vscode-tools msa 0.6.0
code-spell-checker str 1.7.17
azure-iot-toolkit vsc 2.9.0
@vscodebot
Copy link

vscodebot bot commented Sep 10, 2019

(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

@isidorn
Copy link
Contributor

isidorn commented Sep 11, 2019

I can not reproduce this with latest vsocde insiders https://code.visualstudio.com/insiders/

@WardenGnaw what are you doing differently than me in this screenshot (note that I triggered inteli-sense via cmd + space)? Can you reproduce with an empty user-data-dir and no other extensions on vscode insiders?

fyi @jrieken in case we changed something in snippets

Screenshot 2019-09-11 at 10 58 35

@isidorn isidorn added info-needed Issue requires more information from poster debug Debug viewlet, configurations, breakpoints, adapter issues labels Sep 11, 2019
@WardenGnaw
Copy link
Member Author

@isidorn Thanks for investigating this issue!

what are you doing differently than me in this screenshot (note that I triggered inteli-sense via cmd + space)?

Sorry I didn't clarify that step, I was triggering inteli-sense with typing in double quotes. See GIF below.

ctrl (or cmd on macOS) + space works as expected. It is exactly the same as if you would click on the Add Configuration... button.

VS Code 1.39.0-insider

Version: 1.39.0-insider (system setup)
Commit: 211fa02efe8c041fd7baa8ec3dce199d5185aa44
Date: 2019-09-11T06:18:37.576Z
Electron: 4.2.10
Chrome: 69.0.3497.128
Node.js: 10.11.0
V8: 6.9.427.31-electron.0
OS: Windows_NT x64 10.0.18362

VSCodeConfigurationMissing

I double checked to see if this was a platform specific issue, but this also occurs on macOS.

@isidorn
Copy link
Contributor

isidorn commented Sep 12, 2019

@WardenGnaw thanks for providing more details. However this is not a regression, we were always behaving like this.
It is weird that all other snippets get shown (nodejs, chrome) and the C++ snippets do not get shown.
After some debugging I believe that you are dynamically providing your C++ snippets and the rest of the snippets are provided via static package.json contribution.
As to why the dynamic snippets are treated differently from the static snippets in JSON. @aeschli might be better to answer.
Joh had the idea that JSON treats " as a word which might be a problem.

I deleted some off topic comments from above to make the convesation cleaner.

@isidorn isidorn added under-discussion Issue is under discussion for relevance, priority, approach and removed info-needed Issue requires more information from poster labels Sep 12, 2019
@isidorn isidorn added this to the Backlog milestone Sep 12, 2019
@microsoft microsoft deleted a comment from steevegl-axes Sep 12, 2019
@WardenGnaw
Copy link
Member Author

@isidorn I'm not sure if this is the same issue but the configurations are also missing in *.code-workspace. Both ctrl (or cmd) + space do not display the C++ configurations in the configuration section.

I added a DocumentSelector for .code-workspace and registered it as a completionItemProvider but it also does not show snippets.

Since there is no Add Configuration for .code-workspace there is no way to provide launch configurations there.

image

Related: microsoft/vscode-cpptools#4891

@isidorn
Copy link
Contributor

isidorn commented Jan 28, 2020

Yes, I believe this is the same issue.

@isidorn isidorn added the *out-of-scope Posted issue is not in scope of VS Code label Jul 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues *out-of-scope Posted issue is not in scope of VS Code under-discussion Issue is under discussion for relevance, priority, approach
Projects
None yet
Development

No branches or pull requests

3 participants
@isidorn @WardenGnaw and others