No executable code of the debugger’s target code type is associated with this line.
I'm getting a bunch of this error. Just started today.
Breakpoint warning: No executable code of the debugger’s target code type is associated with this line.
Possible causes include: conditional compilation, compiler optimizations, or the target architecture of this line is not supported by the current debugger code type. - /home/rich/git/sudoku/HiddenSinglesCandidate.cs:187
Breakpoint warning: No executable code of the debugger’s target code type is associated with this line.
Possible causes include: conditional compilation, compiler optimizations, or the target architecture of this line is not supported by the current debugger code type. - /home/rich/git/sudoku/HiddenSinglesCandidate.cs:230
It isn't consistent.
My system:
rich@mazama:~$ uname -a
Linux mazama 6.5.0-17-generic #17-Ubuntu SMP PREEMPT_DYNAMIC Thu Jan 11 14:01:59 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
rich@mazama:~$ cat /etc/os-release | head -n 1
PRETTY_NAME="Ubuntu 23.10"
rich@mazama:~$ dotnet --version
8.0.101
Code:
Version: 1.87.0-insider
Commit: 8fa84589eef3538dbc763ff98dc7d5a8a0c56374
Date: 2024-02-09T05:46:41.377Z
Electron: 27.3.1
ElectronBuildId: 26731440
Chromium: 118.0.5993.159
Node.js: 18.17.1
V8: 11.8.172.18-electron.0
OS: Linux x64 6.5.0-17-generic
DevKit: v1.4.2 (pre-release)
What that message means is that the debugger could find a PDB file that has information for the source file, but the source file didn't have a record for the line of the breakpoint.
Once you hit the problem, does it consistently reproduce if you relaunch without recompiling the project? You can use a launch.json without a preLaunchTask to ensure that there is no build, or just check the build log to see if msbuild decided to run the compiler or not.
That makes sense. This didn't come up again. It was a problem for about 20mins.
I was also running the project from terminal. It's a short-running console app, so DevKit and Terminal were never running the app at the same time. Perhaps they had a symbolic battle?
If it doesn't repro later today, I'll close this.
My understanding is that Dev Kit and terminal should, normally at least, use the same .NET SDK to build the project. So, I don't know of a reason why they would "fight".
The last week or so, DevKit is working much better for me (all pre-rel versions).