Shortcut to repeat commands in a terminal
Reported by
manuelch...@gmail.com,
Jul 13
|
|||||
Issue description
UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36
Steps to reproduce the problem:
1.
2.
3.
What is the expected behavior?
What went wrong?
When debugging something using the console it's common to do something like setInterval(function(){console.log(x)}, 1000)
Here's an idea: How about if I write "console.log(x)" and then press Ctrl + Enter it will automatically wrap an interval and execute it.
Basically, have a keyboard shortcut to execute something in a predetermined (possibly configurable) interval easily and fast.
Just throwing out an idea.
Did this work before? N/A
Chrome version: 67.0.3396.99 Channel: stable
OS Version: 10.0
Flash Version:
,
Jul 13
It's a feature request. Also I think instead of using ctrl+enter it might be better to have a slash based command system like "/interval 1000 console.log(x)" which would render it as "setInterval(function(){console.log(x)},1000)" , which takes a lot more time to write. The slash command system can be expanded to use other stuff like "/timeout 1000 console.log(x)".
,
Jul 13
Thank you for providing more feedback. Adding the requester to the cc list. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Jul 16
From comment#2 by reporter the issue seems to be a feature request hence marking it as Untriaged, and requesting someone from respective team to have a look in it this for further inputs. Thanks!
,
Jul 30
Thanks for the request. I'm interested in knowing what your use cases are. Could you please describe how you typically use setInterval? We are currently experimenting on a Console feature that uses intervals ( crbug.com/849875 ). It help to know whether users tend to log short expressions, objects, numeric values like scrollTop, etc, to gain a better idea of how we can support this use case.
,
Jul 31
To be quite honest, I don't use intervals for this very often, but when I do it's to check if a variable has changed in some circumstances. For instance "setInterval(function(){console.log(some_var)},1000)". And well, then I refresh the page to get rid of the interval.
,
Sep 17
We recently added "Live expressions" to Canary. In the Console toolbar, there is an 'eye' icon to add an expression that will automatically evaluate inside a 250ms interval. In your case, you should be able to create a Live expression `some_var`, and it will poll until it is manually removed. If you'd like to try it out, please check out Canary or wait for M71 to reach stable. |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by vamshi.kommuri@chromium.org
, Jul 13Labels: Triaged-ET Needs-Feedback Needs-Triage-M67