Problem with structure field hints
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 45/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Tranquilo
- Stack tecnológico
- c, typescript
- Área
- tooling
Línea de trabajo
Reproduce el problema en main.c usando las tres ubicaciones de prueba de completion y los operadores indicados; después, sigue las solicitudes textDocument/completion a través de auto_complete::handle_completion. Compara por qué la completion aparece en la segunda ubicación, pero no en la primera ni en la tercera. Se considera terminado cuando las sugerencias de campos de estructura aparecen de forma coherente para los contextos y operadores indicados.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Environment
- OS and Version: Windows 10 LTSC 2018
- VS Code Version: 1.129.1
- C/C++ Extension Version: 1.32.2
Bug Summary and Steps to Reproduce
- Create a main.c file with the following contents::
struct {
int a;
int b;
} test;
int main(){
int err = 0;
test.
err++;
test.
err = err + 1;
test.
err--;
}
It's expected that pressing ctrl+space will give us a tooltip, but the first and third "test." the hint doesn't appear, it only works for the second one. ++, --, +=, -=, *=, /=, |=, &=, and ^=/ have similar behavior.
Configuration and Logs
loggingLevel: 6
loggingLevel был изменен на: Debug
Обработан файл c_cpp_properties.json за 0.0065977 с
Intellisense update pending for: file:///c%3A/prog/c/bugTest/main.c
Завершение работы сервера IntelliSense: C:\prog\c\bugTest\main.c
LSP: (received) cpptools/didChangeCppProperties (id: 453)
LSP: (invoked) cpptools/didChangeCppProperties (id: 453)
Попытка получить значения по умолчанию из компилятора C++ в свойстве "compilerPath": "cl.exe"
Попытка получить значения по умолчанию из компилятора C в свойстве "compilerPath": "cl.exe"
Папка C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\18\BUILDTOOLS\VC\TOOLS\MSVC\14.50.35717\INCLUDE будет индексироваться
Папка C:\PROG\C\BUGTEST будет индексироваться
LSP: Sending response (id: 453)
LSP: (received) cpptools/getFoldingRanges: file:///c%3A/prog/c/bugTest/main.c (id: 454)
LSP: (invoked) cpptools/getFoldingRanges: file:///c%3A/prog/c/bugTest/main.c (id: 454)
LSP: Sending response (id: 454)
LSP: (received) cpptools/getCodeActions: file:///c%3A/prog/c/bugTest/main.c (id: 455)
LSP: (invoked) cpptools/getCodeActions: file:///c%3A/prog/c/bugTest/main.c (id: 455)
LSP: Sending response (id: 455)
LSP: $/cancelRequest (<unknown/completed>, id: 455)
LSP: (received) cpptools/getCodeActions: file:///c%3A/prog/c/bugTest/main.c (id: 456)
LSP: (invoked) cpptools/getCodeActions: file:///c%3A/prog/c/bugTest/main.c (id: 456)
LSP: Sending response (id: 456)
IntelliSense update scheduled and TU acquisition started for: file:///c%3A/prog/c/bugTest/main.c
Populating file name cache...
Done populating filename cache. Elapsed time: 0 ms
Expanding recursive includes for: C:\PROG\C\BUGTEST\MAIN.C
Done expanding recursive includes for: C:\PROG\C\BUGTEST\MAIN.C
Reducing recursive includes for: C:\PROG\C\BUGTEST\MAIN.C
Done reducing recursive includes for: C:\PROG\C\BUGTEST\MAIN.C
Отправка аргументов компиляции для C:\prog\c\bugTest\main.c.
system include: C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\18\BUILDTOOLS\VC\TOOLS\MSVC\14.50.35717\INCLUDE
define: _DEBUG
define: UNICODE
define: _UNICODE
stdver: ms_c17
intelliSenseMode: windows-msvc-x64
Время обновления IntelliSense (в секундах): 0.038
LSP: (received) cpptools/getFoldingRanges: file:///c%3A/prog/c/bugTest/main.c (id: 457)
LSP: (invoked) cpptools/getFoldingRanges: file:///c%3A/prog/c/bugTest/main.c (id: 457)
LSP: Sending response (id: 457)
LSP: (received) cpptools/getCodeActions: file:///c%3A/prog/c/bugTest/main.c (id: 458)
LSP: (invoked) cpptools/getCodeActions: file:///c%3A/prog/c/bugTest/main.c (id: 458)
LSP: Sending response (id: 458)
LSP: (received) cpptools/getFoldingRanges: file:///c%3A/prog/c/bugTest/main.c (id: 459)
LSP: (invoked) cpptools/getFoldingRanges: file:///c%3A/prog/c/bugTest/main.c (id: 459)
LSP: Sending response (id: 459)
LSP: (received) cpptools/didChangeActiveEditor: file:///c%3A/prog/c/bugTest/main.c
LSP: (invoked) cpptools/didChangeActiveEditor: file:///c%3A/prog/c/bugTest/main.c
LSP: (received) cpptools/getCodeActions: file:///c%3A/prog/c/bugTest/main.c (id: 460)
LSP: (invoked) cpptools/getCodeActions: file:///c%3A/prog/c/bugTest/main.c (id: 460)
LSP: Sending response (id: 460)
LSP: (received) cpptools/didChangeVisibleTextEditors
LSP: (invoked) cpptools/didChangeVisibleTextEditors
LSP: (received) cpptools/didChangeVisibleTextEditors
LSP: (invoked) cpptools/didChangeVisibleTextEditors
LSP: (received) cpptools/didChangeTextEditorSelection
LSP: (invoked) cpptools/didChangeTextEditorSelection
LSP: (received) cpptools/getCodeActions: file:///c%3A/prog/c/bugTest/main.c (id: 461)
LSP: (invoked) cpptools/getCodeActions: file:///c%3A/prog/c/bugTest/main.c (id: 461)
LSP: Sending response (id: 461)
LSP: (received) textDocument/completion: file:///c%3A/prog/c/bugTest/main.c (id: 462)
LSP: (invoked) textDocument/completion: file:///c%3A/prog/c/bugTest/main.c (id: 462)
auto_complete::handle_completion: file:///c%3A/prog/c/bugTest/main.c (9:10)
Предлагается завершение.
LSP: Sending response (id: 462)
LSP: (received) cpptools/didChangeTextEditorSelection
LSP: (invoked) cpptools/didChangeTextEditorSelection
LSP: (received) cpptools/getCodeActions: file:///c%3A/prog/c/bugTest/main.c (id: 463)
LSP: (invoked) cpptools/getCodeActions: file:///c%3A/prog/c/bugTest/main.c (id: 463)
LSP: Sending response (id: 463)
LSP: (received) textDocument/completion: file:///c%3A/prog/c/bugTest/main.c (id: 464)
LSP: (invoked) textDocument/completion: file:///c%3A/prog/c/bugTest/main.c (id: 464)
auto_complete::handle_completion: file:///c%3A/prog/c/bugTest/main.c (12:10)
Предлагается завершение.
LSP: Sending response (id: 464)
LSP: (received) completionItem/resolve (id: 465)
LSP: (invoked) completionItem/resolve (id: 465)
LSP: Sending response (id: 465)
LSP: (received) cpptools/didChangeTextEditorSelection
LSP: (invoked) cpptools/didChangeTextEditorSelection
LSP: (received) cpptools/getCodeActions: file:///c%3A/prog/c/bugTest/main.c (id: 466)
LSP: (invoked) cpptools/getCodeActions: file:///c%3A/prog/c/bugTest/main.c (id: 466)
LSP: Sending response (id: 466)
LSP: (received) textDocument/completion: file:///c%3A/prog/c/bugTest/main.c (id: 467)
LSP: (invoked) textDocument/completion: file:///c%3A/prog/c/bugTest/main.c (id: 467)
auto_complete::handle_completion: file:///c%3A/prog/c/bugTest/main.c (15:10)
Предлагается завершение.
LSP: Sending response (id: 467)
Other Extensions
No response
Additional context
No response
- Lenguaje dominante
- TypeScript
- Estrellas
- 6.2k
- Forks
- 1.7k
- Merge medio
- 14 h 46 min
- PR fusionados (30 d)
- 61
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de microsoft/vscode-cpptools
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
microsoft/vscode-cpptools#14787 ·
-
[Bug] cpptools fails to start on Ubuntu ARM64 due to missing execute permissions on shared libraries Abiertobug fixed Language Service regression
microsoft/vscode-cpptools#14779 · 1 asignado ·
-
Language Service more info needed
microsoft/vscode-cpptools#14778 · 1 comentario · 1 asignado ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 64/100
microsoft/vscode-cpptools#14769 ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 68/100
microsoft/vscode-cpptools#14768 · 1 comentario ·
Todos los issues de microsoft/vscode-cpptools
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
copse-dev/agent-pane#2953 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
[Bug]: Matrix progress drafts fail with "Matrix runtime not initialized" during tool activity Abiertobug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
Client support matrix inclusion Abiertoenhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
-
calcite-components needs triage refactor
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Esri/calcite-design-system#15203 ·