Jump to content
PeterPanettone

RIO: Start Debug Session changes source

Recommended Posts

In Delphi Rio 10.3.1, the Project is configured for Debugging:

 

image.png.896489da4bee954670311541250efd73.png

 

Steps:

 

1. First I make sure that all source files are saved.

 

2. Then I start debugging (F9) image.png.97ed530d55a35b012d961b97ade2f09e.png

 

3. Then, at the first breakpoint, I press F8 (Step Over). This makes this dialog appear:

 

image.thumb.png.2f78de612a40eafd9793b986fe8095ac.png

 

When I look in the project folder, the only file which has been changed since debug start is MyProject.res.

 

So why this file gets changed after the start of the debug session?

 

This is the content of the RES file:

 

image.png.dc4d330788660bbac0c251589175b858.png

 

This is very annoying and did not happen in previous Delphi versions.

 

How can this be avoided?

Edited by PeterPanettone
  • Like 1

Share this post


Link to post

Did you really add your .res file to your project? I think it's an auto-generated one and you should neither have it in source control, nor added to your project...

Share this post


Link to post
39 minutes ago, Der schöne Günther said:

Did you really add your .res file to your project? I think it's an auto-generated one and you should neither have it in source control, nor added to your project...

What do you mean with "source control"? The res file is not part of the project files tree:

 

image.png.e067d76b51ca0ac0304d7c162edbdc30.png

Edited by PeterPanettone

Share this post


Link to post
22 hours ago, PeterPanettone said:

In Delphi Rio 10.3.1, the Project is configured for Debugging:

 

image.png.896489da4bee954670311541250efd73.png

 

Steps:

 

1. First I make sure that all source files are saved.

 

2. Then I start debugging (F9) image.png.97ed530d55a35b012d961b97ade2f09e.png

 

3. Then, at the first breakpoint, I press F8 (Step Over). This makes this dialog appear:

 

image.thumb.png.2f78de612a40eafd9793b986fe8095ac.png

 

When I look in the project folder, the only file which has been changed since debug start is MyProject.res.

 

So why this file gets changed after the start of the debug session?

 

This is the content of the RES file:

 

image.png.dc4d330788660bbac0c251589175b858.png

 

This is very annoying and did not happen in previous Delphi versions.

 

How can this be avoided?

This is not normal behaviour, i have never encountered that myself with Rio. Do you also get that if you do a build before starting the debug session?

Share this post


Link to post
2 hours ago, PeterBelow said:

This is not normal behaviour, i have never encountered that myself with Rio. Do you also get that if you do a build before starting the debug session?

Yes, even when I do a build right before starting the debug session.

Share this post


Link to post

I HAVE FOUND THE CULPRIT!!! It is one of the CnWizards experts which inserts the compile date into the version record:

 

image.thumb.png.4293110a914b3c50ce41171963616f7f.png

 

I believe there is no chance to avoid this when inserting the compile date.

Share this post


Link to post
35 minutes ago, PeterPanettone said:

I HAVE FOUND THE CULPRIT!!! It is one of the CnWizards experts which inserts the compile date into the version record:

 

 

 

I believe there is no chance to avoid this when inserting the compile date.

Thanks for sharing the solution.

Share this post


Link to post
49 minutes ago, Der schöne Günther said:

With proper source control you would have seen this immediately 🙃

It is called "VERSION CONTROL"!

Share this post


Link to post
1 hour ago, PeterBelow said:

Thanks for sharing the solution.

I will ask the CnWizards developer to add an option to not be used in debug mode. If you think about it, there is no sense using the compilation date in when debugging.

Share this post


Link to post

Compilation date is rarely useful, only when you don't use "source version" control, you need that information. Your customers surely don't need it.

Share this post


Link to post
3 hours ago, Sherlock said:

Compilation date is rarely useful, only when you don't use "source version" control, you need that information. Your customers surely don't need it.

Well, it could be useful to specify a specific version of the program independently from the version number.

Share this post


Link to post
1 hour ago, PeterPanettone said:

Well, it could be useful to specify a specific version of the program independently from the version number.

Now that is something one should avoid anyway. Special builds for special customers create special problems. One version for all leads to the same problematic source for all - and generally speaking, source code is always problematic, as soon as it consists of more than "Hello World".

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×