我在 Visual Studio Code 中面临一个令人困惑的问题,即使用自动完成功能时,字符串“
这里有几个随机示例,说明它如何抛出
```
app.get (""), (req, res) => {
res.send("This is the home page.");<ctrl63>
}
```
'''
const express = require('express');
const app = express();
const port = 3000;
app.get('/', (req, res) => {
res.send('Hello World!');
});
app.listen(port, () => {
console.log(`Example app listening at http://localhost:${port}`);
});<ctrl63> This code will create a simple web server that listens on port 3000. When a request is made to the root URL ('/'), the server will send the response 'Hello World!'.
'''
检查键盘快捷键:我检查了 Visual Studio Code 中的键盘快捷键,以确保“
禁用扩展:我已禁用 Visual Studio Code 中的所有扩展(包括 Copilot),以排除任何与扩展相关的冲突。没有自动完成功能,禁用 Copilot 时也没有问题。
检查代码编辑器设置:我已检查我的 Visual Studio Code 设置和配置,看看是否有任何可能导致此问题的因素,但尚未找到任何相关设置。
aaron-bond.better-comments
扩展与提供内联补全的扩展(例如 GitHub Copilot 扩展)相结合时,就会发生这种情况。我不知道为什么会发生这种情况。作为解决方法,您可以考虑禁用其中一个扩展 - 更好的注释或内联完成扩展。