English 中文(简体)
Visual Studio Code: Another instance of Code is running but not responding
原标题:

Can t run Visual Studio Code (Windows). This happend a few times now.

I suddenly can t save files while coding and VS Code hanging. When stopping the task by Task Manager

enter image description here

and start VS Code again I get the message:

Another instance of Code is running but not responding. Please close all other instances and try again.

enter image description here

But there is no VS Code Window open. Instead the Task Manager shows more running instances:

enter image description here

Restarting windows helps but is really annoying. Has anyone else this problem and/or an idea to fix this issue?

Thanks in advance.

问题回答

I tried everything: restarting Windows, uninstalling and reinstalling VSC, nothing helped. There should be something in the "memory of the last session". And I found it:

Finally, I renamed / deleted the following file to make it not available:

  • Folder %AppData%Code
  • File storage.json

Now I was able to restart VSC, forcing a clean startup. The file was recreated. Now I could search which content of this file was the reason.

Solution

Restart OS fixed the issue for me.

My experience with fbprophet:

Problem:

The code below kept crashing VS and giving me this error. I then clicked Reopen. Nothing happened. Tried to open VS code again and got this error .

m = prophet.Prophet(interval_width=0.95, daily_seasonality=True)
model = m.fit(data)

Solution:

Restarted my computer and Filtered data to only contain the date and the y column.

I m guessing the part of this that would be relevant to others is to find what is crashing VS code and fix it.

Try the following cmd. It s effective with my centos7.

$ ps -ef | grep code | grep -v grep | cut -c 9-15 | xargs kill -s 9

there is a closed issue on vscode GitHub page about this topic. It looks like the bug can t be resolved. but try to kill the process from the task manager and now you can open a new vscode window.

If you receive the error message "Another instance of Code is running but not responding" in Visual Studio Code, you can try the following solutions to resolve the issue:

Close all instances: Make sure you have closed all running instances of Visual Studio Code. Check the system tray or task manager to ensure no background processes are running.

Restart your computer: Sometimes, a simple restart can resolve the issue by clearing any lingering processes.

Delete the lock file: Visual Studio Code uses a lock file to prevent multiple instances from running simultaneously. If the lock file becomes corrupted, it can cause this error. Open your operating system s file explorer and navigate to the folder where the lock file is stored:

  1. Windows: %APPDATA%Code
  2. macOS: ~/Library/Application Support/Code/
  3. Linux: ~/.config/Code/

Look for a file named lock or .com.visualstudio.code.instance. Delete this file, and then try relaunching Visual Studio Code.

Disable extensions: Certain extensions may interfere with the proper functioning of Visual Studio Code. Try disabling any recently installed or suspicious extensions and check if the issue persists. You can disable extensions by navigating to the Extensions view in Visual Studio Code and clicking on the gear icon next to the extension s name, then select "Disable."

Reinstall Visual Studio Code: If none of the above solutions work, you can try uninstalling and reinstalling Visual Studio Code. Make sure to back up any important settings or files before uninstalling. After reinstalling, check if the error still occurs.

If the problem persists even after trying these steps, you may consider seeking further assistance from the Visual Studio Code support forums or submitting a bug report to the Visual Studio Code development team.





相关问题
VS Code run selection in terminal creating multiple shells

Running selection/line in terminal (shift + enter) started creating opening two shells. The first shell runs commands to activate the environment and start python. The second shell runs the python ...

从案卷中获取简单明朗戈功能——现在可以提供

如果你想到,在纽瓦特被点击之后,如何把服务器的辅助功能从javascript文档中打上下面的几页。 你们必须利用吉大港山区开发计划的要求,把服务器的侧端点称作终端点。 ......

在《科索沃法典》中是否有办法进行沙尘处理

目前,开始学习基因图像处理,我希望在民主选举学会之外使用这种图像,使之更容易编码,因为在处理民主选举学会时,没有很好地掌握合成物的错误。 I ......

Rust Visual Studio Code code completion not working

I m trying to learn Rust and installed the Rust extension for VSCode. But I m not seeing auto-completions for any syntax. I d like to call .trim() on String but I get no completion for it. I read that ...

热门标签