In Visual Studio 2019 when I create a python project using the "from existing code" template, I can't get breakpoints to actually work. When I start debugging, the breakpoint turns black and says the following when I hover over it:
The breakpoint will not currently be hit. Breakpoint in file excluded by filters. Note: may be excluded because of "justMyCode" option (default == true). Try setting "justMyCode": false in the debug configuration (e.g launch.json)
However, all of the info online about launch.json relates to VS Code not VS 2019.
If I try mimicking what you're meant to do for VS Code but in VS 2019 and put the launch.json file in my project's .vs folder then it doesn't do anything. I confirmed I have the json file configured correctly by using it with VS Code and it does indeed fix the breakpoint problem there.
Disabling the "Just My Code" option in the Tools -> Options window in VS 2019 doesn't do anything either. So how are you meant to do this in VS 2019?
In Tools / Options go to Python/Debugging and check: Enable debugging of the Python standard library.
This works in Visual Studio 2022.
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