0

I have installed recently on my windows 10 the MinGW for using it on C development plus codelite.

Everything works, I can compile and run programs, but I can't find the way to make the debugger show me the value of locals. I am newbie on software development world and I have no idea what can be missing.

I downloaded mingw, installed it for c and c++ languages, added the paths on the environment variables config and then installed codelite, where I could scan the MinGW compiler.

If anyone can guide, I would by highly grateful.

Best regards,

smwikipedia
  • 61,609
  • 92
  • 309
  • 482
  • 1
    Depending on the optimization, the compiler might have optimized away these variables. Try to use the option '-O0' for "no optimization". Additionally, please provide a [mre] for us to see your code. – the busybee Mar 27 '22 at 09:21
  • Hello, thanks for your answer. It is my first post and I am not sure wether if I am expected to answer soon. I will reply you as soon as I have time and I rechecked all the config. I tried your solution but did not work. As this is not a "code" problem but an environment config problem, I don't see the way to post the MRE, but thanks for letting me now about this best practices when posting. Best regards, – scipionum Mar 28 '22 at 18:51
  • 1
    Since Codelite is "just" an IDE, it uses GDB as its debugger, showing the results in its GUI. To see if it's Codelite or GDB, you could try to use GDB directly per command line. Granted, it needs some learning, but there are quick starts and other tutorials. And it pays in the long term. -- You could also look into the generated assembler code. If the compiler optimized variables away, it should be visible. -- To reproduce your issue, we need an MRE, though, and enough additional information like the versions of Codelite and MinGW. – the busybee Mar 28 '22 at 20:10

0 Answers0