如何更改 Enter 键是运行代码还是接受 Chrome Devtools 控制台中的自动完成建议?

2023-12-10

When I type into console and there is a list of suggestions, if I press Enter then the first option is selected. I want pressing Enter to just run the code as it is and the suggestions to be inserted only if I press Tab. Is this possible?


在 Chrome DevTools 113 中,“控制台”部分下有一个新设置,名为“接受输入时自动完成建议”。似乎(至少对我来说)默认值是“off”(未选中)。

请参阅此处了解公告和更多详细信息:https://developer.chrome.com/blog/new-in-devtools-113/?utm_source=devtools#console.

If you are using a version of Chrome DevTools older than 113, then the workaround is to close the autocomplete popup by pressing escape before pressing enter, or to toggle autocompletion entirely, which you can do by unchecking "Autocomplete" under the "Sources" section of the settings (of course, the problem then is that if you want to disable the Enter key for autocomplete, you will have no autocomplete at all). Note that in older versions of Chrome, this might not have any effect in the console, and instead only affect the "Sources" tab.

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

如何更改 Enter 键是运行代码还是接受 Chrome Devtools 控制台中的自动完成建议? 的相关文章