I use this configuration and work only if I insert this two line
// "stopOnEntry": true
// "justMyCode": false
{
"version": "0.2.0",
"configurations": [
{
"name": "Python: Debug Current File",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"stopOnEntry": true,
"justMyCode": false
},
]
}
Answer from Marco Graziano on Stack OverflowI use this configuration and work only if I insert this two line
// "stopOnEntry": true
// "justMyCode": false
{
"version": "0.2.0",
"configurations": [
{
"name": "Python: Debug Current File",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"stopOnEntry": true,
"justMyCode": false
},
]
}
If you have upgraded your .Net Core SDK recently, just update netcoreappX.X
"program": "${workspaceFolder}/CommunityBot/bin/Debug/netcoreappX.X/CommunityBot.dll"
in launch.json file.
Check your .Net Core SDK version by dotnet --version
Debugger not stopping on breakpoints
python - VSCode: Why isn't debugger stopping at breakpoints? - Stack Overflow
VSCode Breakpoint not hitting/stopping when run in debugger mode - Golang
debugging - Why would the debugger not be stopping at a breakpoint in my ASP.NET application? - Stack Overflow
Videos
I'm new to using VS Code as I¡ve always used Eclipse IDE. I'm trying to debug my java file in which I've created a breakpoint, but the debugger just runs the code as if there wasn't such breakpoint..
I've seen some other people struggle with this, so here's my launch.json:
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Java",
"type": "java",
"request": "launch",
"stopOnEntry": true,
"jdkPath": "${env:JAVA_HOME}/bin",
"cwd": "${fileDirname}",
"startupClass": "${fileBasenameNoExtension}",
"classpath": [
".",
"${fileDirname}"
]
},
{
"name": "Java Console App",
"type": "java",
"request": "launch",
"stopOnEntry": true,
"jdkPath": "${env:JAVA_HOME}/bin",
"cwd": "${fileDirname}",
"startupClass": "${fileBasenameNoExtension}",
"classpath": [
".",
"${fileDirname}"
],
"externalConsole": true
},
{
"type": "java",
"name": "Current File",
"request": "launch",
"mainClass": "${file}"
},
{
"type": "java",
"name": "Numeros",
"request": "launch",
"mainClass": "Numeros",
"projectName": "progra_4bad0bd0"
}
]
}Thanks in advance
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
},
]
}
If you're using a pytest-cov module you might also wanna have a look at pytest configuration settings note:
Note If you have the
pytest-covcoverage module installed, VS Code doesn't stop at breakpoints while debugging becausepytest-covis using the same technique to access the source code being run. To prevent this behavior, include--no-covinpytestArgswhen debugging tests, for example by adding"env": {"PYTEST_ADDOPTS": "--no-cov"}to your debug configuration.
See an example configuration file (launch.json) below:
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug Tests",
"type": "python",
"request": "test",
"console": "integratedTerminal",
"justMyCode": false,
"env": {"PYTEST_ADDOPTS": "--no-cov"}
}
]
}
Try doing a full rebuild on the application. Pay attention that it's in the "Debug" configuration.
As far as I understand (but I'm not an expert in these things), this can happen when the debug info files (.PDB) are out of sync with the real compiled thing.
People.... I found other solution for breakpoint dont stop. In Attach to Process window on Visual Studio 2010 and using Framework 3.5, by default automatically determines the code types to debug (v2.0, v1.1, v1.0) and (v4.0).
Visual Studio gets confused and automatically determines 2.0 managed code as 4.0 managed code sometimes.
In this case you need to click in "Select..." button on "Attach to" field and select Manage (v2.0, v1.1, v1.0).
Regards
Hi,
Does anyone have and idea why VS2019 does not stop at breakpoints? I am quite new to programming and also to VS so I might have made some unintentional settings changes. What are most common settings that disable breakpoint? Or which settings I must have/check to see if breakpoints are enabled.