Breakpoint will not currently be hit. No executable code associated with this line

后端 未结 9 1692
感情败类
感情败类 2021-01-07 23:50

I have a class in a .h file:

class Blah
{
public:
    Blah(){}
    virtual ~Blah(){}

    void WriteMessage( bool MessageReceived )
    {
        if(MessageR         


        
相关标签:
9条回答
  • 2021-01-08 00:30

    I was trying to press Ctrl+F5 which gives same as the error you received in Visual Studio Code. However, once I just go to Debug section and pressed Green button which initialises Debugging helped me solve this error.

    0 讨论(0)
  • 2021-01-08 00:30

    I hit this problem while attempting to debug a Rust project in IntelliJ. It turns out that the problem was that in the .cargo/config file, the rustflags variable was set to include --compress-debug-sections=zlib-gabi. This apparently deprives IntelliJ of information it needs to activate the debugger. Temporarily removing that flag removed the "breakpoint will not currently be hit" message and allowed the debugger to work as expected.

    0 讨论(0)
  • 2021-01-08 00:31

    I also wanted to chime in with my own solution. I had a C++ project loading a dll that consisted of C++/CLR code. Turns out, I had to set the startup project's debugger type to "Mixed". "Auto" wasn't detecting that it needed managed support because the dll was loaded manually after the program started.

    0 讨论(0)
提交回复
热议问题