Pelles C forum

C language => Beginner questions => Topic started by: PhilG57 on December 03, 2025, 11:28:28 PM

Title: Different results, Debug vs. Release
Post by: PhilG57 on December 03, 2025, 11:28:28 PM
Why would a program run to conclusion when called via Pelles Project->Execute xxx, but crashes repeatedly when called via Project->Debug xxx?  This is with the same executable which was compiled under Debug.

Also, if during a Debug session (before it blows up), I can utilize the debugger to show 'Auto', 'Watch",  'Locals', and 'Registers', but when I click on 'Globals', the program and the Pelles environment immediately crashes.

Admittedly this is a large multi-project workspace effort, with lots of individual modules which are all old and ugly. But the difference in behavior between Debug and Release is perplexing and the crashing trying to check out Globals is downright frustrating.

Thanks in advance.
Title: Re: Different results, Debug vs. Release
Post by: John Z on December 04, 2025, 02:45:47 PM
Hi PhilG57,

Open ended question not sure how help can be provided w/o more specific details or examples, I'm no expert though -

One suggestion however is to see if you are using any compiler optimizations -

Project - Options- Compiler - Optimizations
if so turn off all optimizations in the Debug mode and see if it helps. 

Also does the project actually run outside of Pelles IDE environment?  Might be a clue.

You might create a new Debug mode by copying the Release mode to something like Debug_new then adjusting settings for debugging.  This would/should remove any question with the original Debug Mode settings.

John Z
Title: Re: Different results, Debug vs. Release
Post by: TimoVJL on December 04, 2025, 04:17:55 PM
Have you test switch off Add-Ins, like Debugger interface demo ?
Title: Re: Different results, Debug vs. Release
Post by: PhilG57 on December 05, 2025, 12:35:52 AM
Thanks. No debug interface demo add-on installed.  It seems that setting breakpoints and poking around at a breakpoint is what is causing problems.  I'll keep playing with it.