Setting "justMyCode": false makes it stop at breakpoint:

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Python: Debug Current File",
            "type": "python",
            "request": "launch",
            "program": "${file}",
            "console": "integratedTerminal",
            "stopOnEntry": true,
            "justMyCode": false
        },
    ]
}
Answer from Ashish on Stack Overflow
Discussions

Debugger does not stop on breakpoints (python. VS code)
Whenever I try to add breakpoints to my python files, it marks it in the GUI as a breakpoint (red circle), but ignores them as if I never included them at all. The debugger just goes right over the... More on github.com
🌐 github.com
3
April 5, 2021
Breakpoints not hit.
Issue Type: Bug I have a simple file parser in python and input text file. When I place a breakpoint at any line in the soure, the break point is not being hit. I set the break point at line pointe... More on github.com
🌐 github.com
15
June 26, 2020
VS Code Debugger not working for python
I am experiencing debugging issue for my VS Code in WIN-10. It happened since weekend when I did OS restart . It was working fine before and I had launch.json configured too. Debugging was working fine. Any troubleshooting tips. It seems when I do… More on learn.microsoft.com
🌐 learn.microsoft.com
7
3
VS code not working for python debugging - Python - Code with Mosh Forum
I’ve been facing issues with using python extension with vs code for some weeks now. The debugging doesnt also work. Any help, please?:smiling_face_with_tear: More on forum.codewithmosh.com
🌐 forum.codewithmosh.com
0
June 24, 2022
🌐
Visual Studio Code
code.visualstudio.com › docs › python › debugging
Python debugging in VS Code
November 3, 2021 - Local computer: switch to the Run and Debug view (⇧⌘D (Windows, Linux Ctrl+Shift+D)) in VS Code, select the Python Debugger: Attach configuration · Local computer: set a breakpoint in the code where you want to start debugging.
🌐
GitHub
github.com › microsoft › vscode › issues › 120586
Debugger does not stop on breakpoints (python. VS code) · Issue #120586 · microsoft/vscode
April 5, 2021 - Whenever I try to add breakpoints to my python files, it marks it in the GUI as a breakpoint (red circle), but ignores them as if I never included them at all. The debugger just goes right over them without stopping. As a test I created ...
Author   PlanckBrain
🌐
GitHub
github.com › microsoft › vscode-python › issues › 12593
Breakpoints not hit. · Issue #12593 · microsoft/vscode-python
June 26, 2020 - Issue Type: Bug I have a simple file parser in python and input text file. When I place a breakpoint at any line in the soure, the break point is not being hit. I set the break point at line pointe...
Author   sachinmyneni
🌐
Donjayamanne
donjayamanne.github.io › pythonVSCodeDocs › docs › troubleshooting_debugger
Debugger | Python in Visual Studio Code
Unfortunately there could be a number of reasons why the debugger isn’t working. For instance it is possible VS Code is displaying some errors that could provide a hint. Look at the debugger console for any error messages displayed. Look at the Debugger Tools console output for any errors ...
Find elsewhere
🌐
Code with Mosh
forum.codewithmosh.com › python
VS code not working for python debugging - Python - Code with Mosh Forum
June 24, 2022 - I’ve been facing issues with using python extension with vs code for some weeks now. The debugging doesnt also work. Any help, please?🥲
🌐
GitHub
github.com › microsoft › vscode-python › issues › 4355
Breakpoints are not hitting in VS Code while debugging Python Flask app · Issue #4355 · microsoft/vscode-python
February 12, 2019 - Environment: VS Code 1.31.0 Python Extension - 2019.1.0 (29 Jan 2019) Python Version 3.7.1 64-bit Flask Version 1.0.2 Windows 10
Author   iamshivprasad
🌐
GitHub
github.com › microsoft › vscode-python › issues › 1940
Python extension does not stop at breakpoints · Issue #1940 · microsoft/vscode-python
June 12, 2018 - From @shortjonescipher on June 12, 2018 7:39 Issue Type: Bug On any Python script, such as 'print("hello world")', the debugger does not stop on any enabled breakpoints, but runs the script until it terminates. The debug configuration is...
Author   RMacfarlane
🌐
GitHub
github.com › microsoft › vscode-python › issues › 109
Debugger not hitting breakpoint when using a virtual ...
November 13, 2017 - VS Code version: 1.11.2 Python Extension version: 0.6.3 Python Version: 3.6.0 OS and version: MacOS X 10.11.6 · Debugger runs and output is written to Debug Console, but breakpoints are not hit. Debugger should break on breakpoints. ... { "version": "0.2.0", "configurations": [ { "name": "Python", "type": "python", "request": "launch", "stopOnEntry": true, "pythonPath": "/Users/george/Projects/TestVenv/bin/python", "program": "${file}", "cwd": "${workspaceRoot}", "env": {}, "envFile": "${workspaceRoot}/.env", "debugOptions": [ "WaitOnAbnormalExit", "WaitOnNormalExit", "RedirectOutput" ] } ] }
Author   DonJayamanne
🌐
Reddit
reddit.com › r/learnpython › breakpoints not working in visual studio community 2022
r/learnpython on Reddit: Breakpoints not working in Visual Studio Community 2022
May 22, 2022 -

I'm running the Visual Studio Community 2022 version. I'm attempting to use the debugger on a Python script, but there is an error notification next to my breakpoint which reads as follows:

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)

I navigated to debug > options > general > just my code, and disabled the checkbox next to this. However, the same error message still occurs. Is there a launch.json file somewhere that needs to be edited as well?

EDIT

Here is some sample code that I have attempted to run using Visual Studio:

import os

def change_dirs(new_dir: str) -> str:
    os.chdir(new_dir) 
    return 'Current working directory is ' + new_dir

change_dirs(input('Please enter a directory to change to:\n'))

Here is a link to a screenshot that shows the above code, as well as the error message mentioned before.

And here is a link showing the "Just In Time" settings checkbox disabled. Even after disabling this setting and restarting the computer, the issue still persists.

EDIT 2:

Changed image links since imgur was not working

🌐
Reddit
reddit.com › r/vscode › python debugger not working
r/vscode on Reddit: Python debugger not working
September 23, 2022 - A subreddit for working with Microsoft's Visual Studio Code · Members · Online • · JohnJSal · Hi everyone. I recently started using VS Code and really enjoy it, but I'm confused why the debugger doesn't work for my Python files. I have the Python extension installed, and I figured it would just work by default. Do I need to do more to set it up further? Right now, all that happens is when I set a breakpoint and run the debugger, the program just runs normally and then exits.
🌐
GitHub
github.com › microsoft › vscode-python › issues › 20407
Debugging inside a container: debugger does not hit breakpoints anymore · Issue #20407 · microsoft/vscode-python
December 12, 2022 - Type: Bug Behaviour Expected vs. Actual Context: Debugging code inside a container Expected: breakpoint are hit when code is executed. Actual: breakpoints are not hit, and when the debug session the Debug Console shows: pydev debugger: u...
Author   wasphub
🌐
GitHub
github.com › microsoft › vscode-python › issues › 4975
Breakpoints not showing in the editor · Issue #4975 · microsoft/vscode-python
March 27, 2019 - Yes, I was already debugging. Now I can reproduce it. Have the debugger to stop on a breakpoint and open the interactive window, and then reload VS Code.
Author   karthiknadig
🌐
GitHub
github.com › microsoft › vscode-python › issues › 4844
Debugger Doesn't Stop At Breakpoints · Issue #4844 · microsoft/vscode-python
March 20, 2019 - The code simply continues running as if the breakpoint wasn't there at all ... Open the .vscode/settings.json file and change the "python.pythonPath": variable from the previously selected interpretter to be .\\Scripts\\python.exe
Author   primalewden