Closed bexrr closed 9 months ago
Someone on Stack Overflow is reporting a similar problem for launch configs: The path in the launch.json keep automatically changing. @bexrr Do you have the same issue with launch configs as well?
What happens if you click on "Save Anyway".
In general the settings file is only written once at startup. Maybe, the file saving is blocked on your system
@starball5 No issues with launch.json (and c_cpp_properties.json). @franneck94 Saving does not work, when clicking "Save Anyway". Saving the settings.json file is possible when disabling the Cpp-Runner extension.. Maybe some interesting information: After some time having the settings.json open in my workspace, the content changes to some default settings (I guess?). I found a "workaround" how to edit the settings: By disabling the extension, editing settings.json and then enabling the extension again. Still I'm not content with settings.json being constantly updated.
Maybe its fixed in 9.4.1
No, the issue still exists, unfortunately.
Please try 9.4.2 on a fresh workspace.
(I'm just guessing since i cannot reproduce the problem)
Still not working. I've audited settings.json and found that the system call "openat" is called continuously (log abbreviated):
type=SYSCALL msg=audit(1704266246.810:2105): syscall=257 success=yes exit=44 a0=ffffff9c a1=7ffdca365120 a2=[..] a3=[..] items=2 ppid=8941 pid=9066 subj=[...].code SYSCALL=openat
The call is successful and returns a valid file descriptor. The arguments to the system call are the path to settings.json, so everything is fine regarding the call and its return.
I think the problem is not related to the extension at all
I've started a debug session: I seems like there is a loop in the settingsProvider.changeCallback(): A callback is registered in case settings.json is changed. In this callback function, settings.json is written again which triggers the onChangeCallback again.. Writing settings.json in this changeCallback is triggered when handling the property msvcBatchPath. I have added an OS check when handling the msvcBatchPath (settingsProvider line 282): this.operatingSystem === OperatingSystems.windows && which fixes the problem for me.
So like this?
Fixed in 9.4.3
When Cpp-Runner is enabled, settings.json is constantly updated, so that I cannot update settings.json manually.
VS code is constantly refreshing view of settings.json content. Here I'm trying to change the content in an external editor:
Not sure if any other VS code extension is influencing this behaviour, but when I disable Cpp-Runner no automatic modifications to settings.json are made anymore. Using ubuntu 22.04.