I am trying to make changes to C::B startup when there is no config file and debug the code to find an issue I am having that could be due to my code. To do this I have set the C::B parameters to "--personality debuging --multiple-instances", but the C::B debugee will not start....gr
I have traced it to the "--multiple-instances" parameter not working as in the following step 2 does not start another C::B instance on Windows:
1) Start a C::B instance
2) In a command prompt try to run C::B again using the following command line:
"C:\Program Files\CodeBlocks\codeblocks.exe" --personality=debuging --multiple-instances
I have also tried "--profile=debuging.
Step 2 above works if I do not include the "--personality=debuging" parameter......
I tracked an issue to the following code snippet from app.cpp code block between lines 662-700:
The if check above does not include any condition for the --multiple-instances parameter or the appCfg single_instance value. I have hacked my local code as following to get it working, but it needs more checking and testing before it can be classified as working or a real fix:
The block of code after this one also needs to be looked at as they are similar in that they both try to detect multiple C::B instances but via different methods (in the code blocks in app.cpp), but they do different things once a multiple instances are detected. It may be possible to simplify the code to detect multiple C::B instances and then do something based on the command or config parameters instead of the over way around. Just a thought.
Possibly related to ticket [#1083].
Related
Tickets: #1083
Last edit: Miguel Gimenez 2022-07-21
I agree is is possibly related.
BTW earlier this week I spotted an issue(C::B does not start) with the "--debug-log" parameter only when debugging C::B from C::B, but it works running C::B from a command line. I The issue in the code could be in the same area , but I have not looked into it in more detail. When I get time I will and raise another ticket with info in it. I thought I may mention it here just in case someone spots a fix for it while looking at this ticket.
Last edit: Andrew Cottrell 2022-07-21