I cannot press F5 to debug my program, because there is only an Attach... button instead of a Debug button.
I am using a .c source file, and I was able to debug my sources until I changed a .cpp to a .c and now every source file I open, it says "Attach...". What do I do?
You need to create a new Python related project(or open a Python project) in Visual Studio to debug your project which includes the . py file and python codes. Just open a single . py file is not enough to debug the project in Visual Studio, so you will see the “Start” changed to “Attach…”.
If a source file has changed and the source no longer matches the code you're debugging, the debugger won't set breakpoints in the code by default. Normally, this problem happens when a source file is changed, but the source code wasn't rebuilt. To fix this issue, rebuild the project.
Debugger not working Look at the debugger console for any error messages displayed. Look at the Debugger Tools console output for any errors. Remember to re-start VS Code once done (this won't be necessary in a future release). Solution: Clear all expressions from the debugger Watch window and start debugging again.
Try menu Tools → Customize → Commands → Add command...[button] → Debug (under Categories). Find and add the button you would like to.
Also try setting your project to startup one - in Solution Explorer - right click on the project and choose the Set as Startup project option.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With