Reputation: 581
I tried to create an ASP.Net website using F#, .Net-Core 3, Ionide, and Visual Studio Code however, when I tried to set a breakpoint in an F# file it didn't get hit.
But when I put an
assert false
In front of my breakpoint, I get the exception, and the breakpoint gets hit afterward.
I have also tried the same in Visual Studio where the assert correctly breaks, but when continuing, it doesn't hit the breakpoint, even though VS Code does.
In VS Code, this doesn't work:
let x = 4 // <- Breakpoint
But this does:
assert false
let x = 4 // <- Breakpoint
I also get this warning when starting regardless of whether I add the assert or not.
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.
What could be the cause, and how could I fix it?
Upvotes: 3
Views: 162
Reputation: 581
In the end, the problem was the complex inter-project dependencies I had.
I solved the problem by keeping the Migration Project but moving the DbContext into the ASP.Net Project. So instead of a reference from the Migrations to the ASP.Net Project, I changed it to the other way around. That also allowed me to move the shared objects to the ASP.Net project and delete the Shared Object Project. So this is what it looked like afterward
Although I didn't do it to solve this problem, it solved it as a side-effect. I hope this will help someone else when they experience the same or similar problem.
Upvotes: 1