https://github.com/discord-bot-tutorial/Community-Discord-BOT
The c# debugger for vscode doesn't stop at breakpoints with this specific project. I have tried creating a new project with
dotnet new console
dotnet restore
which worked correctly and I tried it with another project I created in Visual Studio Community 2017 which worked exactly as it should too.
launch.json and tasks.json https://gist.github.com/M4N1/daff738de1d5cbcf8cf3fdc461c3a83c
Update
I just tried the same thing on Ubuntu 18.04 (instead of win10) where it worked perfectly fine with the same version of vscode (1.28.1).
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.
The solution was to enable it again, start a debug session, the breakpoint is hit and shown in the UI, then disable again the option. There is also another simpler way that will make Eclipse show the debugging highlight at the breakpoint or rather refresh the debugging UI to work as it should.
If a breakpoint is reached, or a signal not related to stepping occurs before count steps, stepping stops right away. Continue to the next source line in the current (innermost) stack frame. This is similar to step , but function calls that appear within the line of code are executed without stopping.
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
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
},
]
}
In VSCode 1.20 and 1.21 does not allow you to hit breakpoints. VSCode 1.18 works fine
If you are using VSCode 1.21 set the outFiles
parameter in your launch config
Workaround - Try Deactivate then reactive breakpoints after debugging has started, Or, right click the breakpoints pane and "Reapply all breakpoints".
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