简体   繁体   English

Enter不在断点处的控制台中提交命令

[英]Enter doesn't submit commands in console at breakpoint

On Firefox 37.0.2 for Linux Mint Rebecca 17.1 (based on Ubuntu 14.04). 在Firefox 37.0.2 for Linux Mint Rebecca 17.1(基于Ubuntu 14.04)上。

When I hit a breakpoint, the console is permanently in multi-line command mode and Enter doesn't submit a command, but opens a new line. 当我遇到断点时,控制台永久处于多行命令模式,而Enter不提交命令,但会打开一个新行。

So when I type `console.log("foo") 所以当我输入`console.log(“foo”)时

输入命令

and hit Enter , rather than seeing the output foo I get: 并点击Enter ,而不是看到我得到的输出foo

输入打开新行

I've tried putting a semi-colon at the end of the command, pressing every imaginable combination of ctrl + Enter etc. but they all just open a new line. 我已经尝试在命令的末尾添加一个分号,按下所有可以想象的ctrl + Enter等组合,但它们都只是打开一个新行。

The console works as expected when I'm not at a breakpoint. 当我不在断点时,控制台按预期工作。 This SO answer suggests it shouldn't be a problem. 这个答案表明它应该不是问题。

What's going on? 这是怎么回事?

I could not find a better answer, but closing Firefox and restarting it solved this problem for me. 我找不到更好的答案,但关闭Firefox并重新启动它为我解决了这个问题。 You can then go to the History menu and restore the previous session to get back to where you were. 然后,您可以转到“历史记录”菜单并恢复上一个会话以返回到原来的位置。

I'm almost certain this is a bug since Mozilla's own documentation only mentions that to type more than 1 line before executing the input you have to press Shift+Enter instead of just Enter. 我几乎可以肯定这是一个错误,因为Mozilla自己的文档只提到在执行输入之前输入多行,你必须按Shift + Enter而不是Enter。

This problem seems to have gone away in Firefox 39.0. 这个问题似乎已经在Firefox 39.0中消失了。

So if you're experiencing it, maybe the best thing to do is to upgrade! 所以如果你正在体验它,也许最好的办法就是升级!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM