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

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.

Related

IPython command completion with up arrow

I recently upgraded IPython and the up arrow behaviour changed. Previously, I could get the entire command from my history. Now, it's greyed out and I have to press right to complete it before I can press enter or edit it:
When did this change? How do I get the previous behaviour back?

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.

Missing Run And Debug Launch Configuration button in VS Code

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.

I removed the bottom bar of VScode which shows the errors and errors, how can I recover it؟

I made an error yesterday when I was editing for a web contest, but no matter how hard I tried to send those edits to GitHub, I had to try the options in VS as usual to solve various problems. But I pressed an option without thinking and the E light disappears in the image below. Now I do not know how to return it.
And now my VS is like this
Open Settings using the shortcut Ctrl + ,
Search for "Workbench Status Bar" and look for the following option
Tick this checkbox

unnecessary shift of cursor to console log

I am using eclipse on Ubuntu. When there is log being shown in console and I am moving cursor up or down in JAVA file to see the code, the cursor shifts itself to the console log and and I am having problem to investigate my code. My cursor shifts to console log even if I disable the console view from windows-> Show View. Is there any way that I am not forced to see the console.
I just got rid of this issue. Right click in console window, select preferences and then unchecked the checkBox "show when program writes to standard out" and also unchecked the checkBox "show when program writes to standard error".