Missing Run And Debug Launch Configuration button in VS Code - flutter

I have the following situation.
I cannot change launch Dart configurations anymore since the button is missing.
I think I hid it by accident but I cannot make it appear anymore.
Launch.json is still accessible but the button has disappeared.
Any help is appreciated, I don't really want to reinstall VS Code and I don't think it would help.

An alternative, if anyone else is facing this: If you right-click the gear and check "Start debugging" then that should bring it back. Despite the name, it won't actually start a debugging session!

I've found out how to restore the button's position.
Type the keyboard combination to start a Command (e.g.Command + Shift + P on MacOS) and run the command View: Reset All Menus.
This'll make the hidden view reappear.
The option to hide it is called Hide 'Start Debugging' and it cannot be found in the settings, so you have to reset the views to make it reappear.

if resetting the menu from command option by pressing: Ctrl + Shift + P and typing the command View: Reset All Menus may work. In case it didn't I suggest you to open a seperate command line i.e CMD or Terminal in VS Code itself then typing the command Flutter Run may help. Also you can press in the terminal R to hot reload your flutter, dart app.

Related

How to add a shortcut for "Launch the selected target in terminal window" button?

I use Visual Studio Code and the CMake extension (twxs.cmake). The extension integrates CMake to vscode. There is a button which allows us to run a target in terminal window. It looks like a play button. .
My question is, how can I add a keyboard shortcut for this button? I cannot find the action name so I cannot link it. I wish to use keyboard shortcut instead of clicking that button every time.
I tried googling the action name of this button so I could bind it with any keyboard shortcut, but I couldn't find anything.
Any help will be appreciated.
Thank you in advance!
Shift+F5 appears to do the same thing as clicking that button.
I found the following here:
Running Targets Without a Debugger
Sometimes one will want to just run a target and see its output. This
can be done with the CMake: Execute the current target without a
debugger command, or the associated keybinding (the default is
Shift+F5).
The output of the target will be shown in an integrated terminal.

Whilst trying to use the VScode debugger, it opens for 2 seconds, closes, and I don't receive an error message

I am trying to debug a python file that I have in my VScode and whenever I press the play button for "Python: Current" I get a message in the terminal like this and I don't receive an error message. I am using macOS
brianw#BLT-3 VScode % cd "/Users/brianw/Desktop/Coding Projects/VScode" ; /usr/bin/env /usr/local/bin/python3 /Users/brianw/wpilib/2022/vscode/code-portable-data/extensions/ms-python.python-2022.4.1/pythonFiles/lib/python/debugpy/launcher 51951 -- "/Users/brianw/Desktop/Coding Projects/VScode/Python-Code-Challanges/debugg.py"
I have looked almost everywhere on the internet and couldn't find a solution for over an hour. I tried to ask the chatGDP bot and it was no help, I did everything it said to troubleshoot, but nothing worked. I tried looking it up, but I got a troubleshooting problem that I couldn't fix, "Make sure that you have the correct Python interpreter selected in the VSCode settings. You can do this by going to the bottom left corner of the VSCode window, clicking on the Python icon, and selecting the interpreter you want to use." and then "In the search bar at the top of the Settings window, type "python.pythonPath" and press enter." but I searched it and nothing popped up.
Edit: The problem was the data was in a funtion and I didn't call the funtion
Steps to debug python code in vscode:
Go to the run and debug option in the side bar.
Click your current python file for debugging.
But the important step is to place a breakpoint in your program before starting to debug your code..
If you didn't place any breakpoints it will close automatically.

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

Eclipse Find/Replace not working

I have searched for a solution to my problem but with no avail. The eclipse Find/Replace function found by the hotkey ctrl+F is not working. Note: the function does not work by the hotkey neither by going through Eclipse menu Edit>Find Replace (not working I mean that the FindReplace window does not show at all, the eclipse window loses focus only). I have tried to disable the hotkey to see if it would work, restarted eclipsed, restarted the PC, but nothing seems to solve the problem. It was working just fine but then suddenly out of the blue it just decided not to function anymore. Everything I tried so far has failed. As I use this function often it would be nice to know if someone has another input for trying to solve this bug. I am on a PC with windows 7, intel i7 64-bits.
I had a similar issue after using second monitor at work. At home I was wondering where is my Find/Replace window... it was displayed at the second monitor as I used it last time... Eclipse stores the last location of the dialogs for better UX.
So try to move the Find/Replace window by using your keyboard.
How to Move an Open Window with the Keyboard
You can also try to reset perspective
Window > Perspective > Reset Perspective...
I had the same issue with Eclipse. My current version is Neon.3 Release (4.6.3).
This periodically happens where the Find/Replace does not work.
Usually UNDO stops working also.
When this happens, Ctrl+F, Ctrl+Z do not work, and Undo Text Change and Find/Replace... are grayed out in the menu.
I tried the above solution Window > Perspective > Reset Perspective...
That fixed it right away!
Thanks
When your Eclipse are full with cache that time this problem occurs.
please try to reset perspective setting and then check it.
Just go to menu bar : Window -> Perspective -> Reset Perspective and it will done.

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