Flutter - after save add command in terminal - flutter

I am programming in Flutter but as a viewer I am using the web browser (not Android console or custom) below I leave the image
Ok, so to compile each change you press CTRL + S and then I must go to the terminal and press the R key to be able to refresh the changes
but this in development takes time away from me because I have to go to the end to press the R for each change.
Is there a way that pressing CTR + S and automatically hits the R key in terminal?

I just fixed it. Just press CTRL + F5, a new browser opens, then only by pressing CTR + S the changes will be updated.

Related

How to cancel current command in Chrome DevTools JavaScript console?

How to cancel current command in Chrome DevTools JavaScript console?
Ctrl + C does not work like it does on a normal shell CLI terminal, nothing happens.
I know I can press Ctrl + L to clear the console but that doesn't clear the current command I have typed out.
Current workaround is Shift + home then delete but that is not as efficient as I would like.
I also tried Ctrl + Shift + P and searched for cancel and clear but nothing is coming up.

In VSCode, how do you stop code that is running via the Code Runner extension?

I'm running a python flask server locally by clicking the run button in VSCode (provided by the Code Runner extension).
How do I stop the server without closing and restarting VSCode?
From the Code Runner extension marketplace page, you have the following options:
To stop the running code:
use shortcut Ctrl + Alt + M
or press F1 and then select/type Stop Code Run
or right click the Output Channel and then click Stop Code Run in context menu
YMMV with the Ctrl + Alt + M shortcut, which does not work for me for some reason.
Mihai Chelaru has already answered the question, but I just wanted to let everyone know that by changing from Ctrl + Alt + M to e.g. Ctrl + Alt + B, the code run does stop.
For accepting input you should do the below setting otherwise, it will show code is running
Go to the setting and type 'code runner'
scroll down a little bit, find this 'code-runner: run in terminal' and check this.
Restart VsCode.
Check the pictures I attach :)
enter image description here
You can use these methods to solve your problem:
Press Ctr+Alt+M to clear your previous output and then run the code again.
You can go to the bottom left of your VS Code page and click on Settings (a gear icon) and select Settings. Then type "code runner" and select the first option "Clear the previous output." That's it.
Use Ctrl+Alt+M or F1 and then select/type Stop Code Run
Other useful Code Runner Commands you can use can be found here:
CodeRunner

Find and replace in Eclipse Oxygen

Editing a C file in eclipse. I hit ctrl + f to search for a string in the file. A dialog box pops up and i type my search in there. Then I go back to editing the file. The next time I hit ctrl + f to do a different search, I lose focus on the editor window and i don't have focus in the search window. I have to actually click on the find and replace window to be able to type in what I want to search for now. If I close the find and replace window then ctrl + f works normally again, but I don't think that is really acceptable. Surely there is a way to navigate back to the find window without having to click on it?

How to clear console history

It's possible to browse the commands previously run in the console by pressing the up and down arrow keys. I want to clear this history. How can I do this?
You can now just right click on the console area and select "Clear console history".
If you want to clear the list of last typed commands, follow these steps:
(Step 1 and 2 are important, don't skip them!)
Undock the console (click on the icon in the bottom-left corner, ).
(if you don't see , but , then hold the mouse pressed for a few seconds to get the desired icon)
Press Ctrl + Shift + J to open the console for this console. (On OSX use Cmd + Option + i)
Go to the Resources tab, "Local Storage", chrome-devtools://devtools.
Right-click on the item with key "consoleHistory", and choose "Delete".
Done! You may close the new console, and then dock the previous one if wanted. The console history will be gone when you reload the console.
If you just want to clear the console log (not the commands), just press Ctrl + L.
You could also use Incognito mode if you don't want to keep the list of commands you're going to type.
I found a quick way to do this with cool keyboard shortcut:
Inside chrome console
Press Ctrl + Shift + P
You will see this awesome command palette opened:
type clear and you will find it :)
That's it!
If you don't want to have this console history (like myself), simply disable it from the devtool's configuration options (see on the image) below ...
This is very simple, just right click the console window and select Clear console history, then refresh the page.
Please note, refreshing/reloading that tab is required.
Simply enter clear() in the chrome console to remove all previous text there.
I ended up here looking for how to do the same thing in Firefox.
In case anyone else does the same, there is a clearHistory command in the Firefox console which will do just that.
https://developer.mozilla.org/en-US/docs/Tools/Web_Console/The_command_line_interpreter#Helper_commands
You can do that now easily with
cmd + shift + p
Type "clear"
Choose Clear console history
It can also be fixed by going to the developer tool settings and resetting to defaults.. (this will not reset 'Chrome', only developer tools options)
Open Chrome devtools
Go to settings (or press Windows ->F1 / OS X -> FN + F1)
Reset to the defaults
This way you will lose your developer settings, but for me the only thing that mattered was turning cache off again..
These shortcuts Clear Console.
⌘ K or
Ctrl L

Keyboard shortcut to switch focus from web developer tools to page in Chrome on Mac

This question is directly related to following existing question with different tag:
Keyboard shortcut to switch focus from web developer tools to page in Chrome
As stated in the title, is there anyway we can switch focus from web developer tools to page in Chrome on Mac OSX.
I looked up online, and at Chrome Dev. doc and help forum, nothing there but they pointed to SO for an answer. Here are some links regarding this question, I already found useless:
https://developers.google.com/chrome-developer-tools/docs/shortcuts
https://groups.google.com/forum/?fromgroups#!topic/google-chrome-developer-tools
Press F6 three times. To go back to DevTools press F6 one time.
F6 loop the focus in this order:
Page
DevTools(if DevTools is open)
Address bar
Bookmarks
You can move focus to the address bar with "Cmd + L". If you put javascript: in the address bar and hit the enter key, you can switch the focus to the page.
But javascript: is too long, isn't it? Then follow this.
Go to Chrome Settings page (Cmd + ,)
Click "Manage search engines..." in the Search section
Add a new search engine with
any name e.g. Back to page
any keyword e.g. j
URL - javascript:
Now you can move focus to the page only with j.
If you've un-docked dev-tools, on a Mac use Cmd+` (backtick) to move focus to active or next window.
This keyboard shortcut can be found and customized at:
System preferences -> Keyboard -> Shortcuts -> Select "Keyboard" category
I've had this exact same use case, and I'm surprised there isn't a simple shortcut for it. I've done some research, and it seems there are a few options:
Use command + option + J to toggle the console off. This will bring focus back to the web page. Then, hitting command + option + J again will open the console and direct the focus there once again. This is probably not the best way since there is a little bit of on each toggle.
Open Dev Tools in separate window. You can find this by clicking the three dots in the top right corner of the dev tools, and then you can find a button for undocking the tools into a separate window. Then, to toggle focus between the web page and console, you can hit command + `.
The answer above from #Sangdol is a great solution for switching focus from the console to the web page. This is probably the fastest and best way of doing this once it's set up. The only thing I'd like to add is how to switch focus back to the console. For this, you can hit command + shift + C twice (hitting it only one will successfully switch the focus, but will leave the browser in 'Inspect Element' mode). I've found that if the focus on the webpage is in a text box, you may have to hit Esc first before hitting command + shift + C.
Press ⌘+L to go to address bar.
Press Esc.
You have now switched focus from web developer tools to page.
To switch back press focus back press ⌘+⌥+C.
This works for docked but is best for undocked dev tools and multiple windows/tabs.
 
With devtools focused hit ⌘+Shift+P
start typing in Debuggee
Hit enter when you see Focus debuggee, done! 
 
Then to go back to dev tools just hit ⌘+⌥+J to focus back on the tab you left them.
 
It saves me some time everyday - my tabs can grow on me over the day... or days... weeks - pretty sure you've all been there - R&D!
New Update: In chrome Version 92.0.4515.131.
When DevTools is open and focus.
Press (⌘ Command+⌥ Option+↓ Down) Twice.
First time pressed - the focus will transfer to the URL.
The second time pressed - the focus will transfer to the page.
OS X 10.8.3 - Mountain Lion
customize "Move focus to next window in application" short cut, because the default key map is "Command + F1", which is binded to show "Shortcuts for Developer Tools" on chrome.
Update in chrome 107
You can now customize keyboard shortcuts for commands in DevTools.
Go to DevTools Settings > Shortcuts > set shortcut for "Focus debuggee".
Hitting ⌘+⌥+J twice will hide the dev tools and focus on your actual window. Do you want to focus on window without hiding dev tools?