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

File keeps removing my imports in C #12914

Open
Elyeden0 opened this issue Nov 2, 2024 · 2 comments
Open

File keeps removing my imports in C #12914

Elyeden0 opened this issue Nov 2, 2024 · 2 comments
Assignees
Labels
Language Service more info needed The issue report is not actionable in its current state

Comments

@Elyeden0
Copy link

Elyeden0 commented Nov 2, 2024

Environment

VS Code version: Code 1.94.2 (384ff7382de624fb94dbaf6da11977bba1ecd427, 2024-10-09T16:08:44.566Z)
OS version: Windows_NT x64 10.0.26100
Modes:

System Info
Item Value
CPUs 11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz (8 x 1805)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) undefined
Memory (System) 15.73GB (9.79GB free)
Process Argv --crash-reporter-id ec6e5681-0250-49c2-a7cb-f437b6ceceb4
Screen Reader no
VM 0%
Extensions (5)
Extension Author (truncated) Version
copilot Git 1.242.0
copilot-chat Git 0.21.2
42header kub 0.42.9
cpptools ms- 1.22.10
pdf tom 1.2.2
A/B Experiments
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805cf:30301675
binariesv615:30325510
vsaa593:30376534
py29gd2263:31024239
c4g48928:30535728
azure-dev_surveyone:30548225
a9j8j154:30646983
962ge761:30959799
pythongtdpath:30769146
pythonnoceb:30805159
asynctok:30898717
pythonmypyd1:30879173
h48ei257:31000450
pythontbext0:30879054
cppperfnew:31000557
dsvsc020:30976470
pythonait:31006305
dsvsc021:30996838
da93g388:31013173
dvdeprecation:31068756
dwnewjupyter:31046869
newcmakeconfigv2:31071590
impr_priority:31102340
nativerepl2:31139839
refactort:31108082
pythonrstrctxt:31112756
wkspc-onlycs-t:31132770
wkspc-ranged-t:31151552
cf971741:31144450
iacca1:31156133
notype1:31157159
5fd0e150:31155592
dwcopilot:31164048
icondisabled:31158250

Bug Summary and Steps to Reproduce

Type: Bug

I am importing stdlib.h in c to use size_t, but everytime i save it removes it. I looked at the settings and it shouldnt happen, i looked up on forums and still nothing. I don't know what to do

Configuration and Logs

{
"configurations": [
{
"name": "Linux",
"includePath": [
"${workspaceFolder}/**"
],
"defines": [],
"compilerPath": "/usr/bin/gcc",
"cStandard": "c17",
"cppStandard": "gnu++17",
"intelliSenseMode": "linux-gcc-x64"
}
],
"version": 4
}

Other Extensions

No response

Additional context

No response

@sean-mcmanus
Copy link
Collaborator

@Elyeden0 What extension is removing it? I don't know what feature in our extension would be doing that. Can try disabling the other extensions? Can you try setting C_Cpp.loggingLevel to "Debug" and look at the C/C++ logging window to see what commands are being processed when the removal occurs? I assume by "import" you mean #include.

@sean-mcmanus sean-mcmanus self-assigned this Nov 4, 2024
@sean-mcmanus sean-mcmanus added Language Service more info needed The issue report is not actionable in its current state labels Nov 4, 2024
@Elyeden0
Copy link
Author

Elyeden0 commented Nov 5, 2024

Hi.
Yes i was talking about include
I solved my problem, for whatever reason the c/cpp tools automatically removed the 12th line in every file. I completely erased vscode from my computer and reinstalled it, same for all the extensions, and the problem is gone. Maybe i did something wrong while trying to solve it, but now it's gone. Thanks alot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Language Service more info needed The issue report is not actionable in its current state
Projects
Status: No status
Development

No branches or pull requests

2 participants