Why does setting a breakpoint "modify" the source file?

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 11 years and 2 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
JLoftus
Posts: 7
Last visit: Fri Jun 26, 2015 9:32 am

Why does setting a breakpoint "modify" the source file?

Post by JLoftus »

Why does setting a breakpoint cause the current source file to become "modified", that is the tab title displays an asterisk indicating modified.

Simply setting a breakpoint should not indicate a modified attribute. Even if it's just in the IDE, and not actually modifying the underlying file, that's still very disconcerting.

Am I missing something?
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Why does setting a breakpoint "modify" the source file?

Post by davidc »

Yes, the breakpoints are stored with the file using alternate streams. This allows them to be shared between products.

David
David
SAPIEN Technologies, Inc.
User avatar
JLoftus
Posts: 7
Last visit: Fri Jun 26, 2015 9:32 am

Why does setting a breakpoint "modify" the source file?

Post by JLoftus »

While that does explain the cause of the modified flag, it does seem not ideal. Maybe a product suggestion would be to make this a configurable option. Either store the breakpoint with the file as it does, to support cross-product use of the breakpoint, or, allow the breakpoints to be stored in the project file, like with MS Visual Studio. This would be a very useful option.
User avatar
Alexander Riedel
Posts: 8479
Last visit: Thu Mar 28, 2024 9:29 am
Answers: 19
Been upvoted: 37 times

Why does setting a breakpoint "modify" the source file?

Post by Alexander Riedel »

We find our solution much more ideal. Why does this bother you?

I mean most admins who write scripts don't use projects, they just use single files, so we'd have to create a config file for each individual script, which just produces an immense amount of clutter.

When you open a file in a code editor and specially when you debug you are bound to edit the file anyway, so let me repeat my question: Why does this bother you?
Are you concerned your script gets corrupted or modified in a malicious way?
Alexander Riedel
SAPIEN Technologies, Inc.
User avatar
JLoftus
Posts: 7
Last visit: Fri Jun 26, 2015 9:32 am

Why does setting a breakpoint "modify" the source file?

Post by JLoftus »

I have a project which consists of several forms and a few script files. The code is still a work in progress, but is fairly stabilized. The project performs complex software deployments and often it is necessary or simply useful to debug, but no changes are needed, and if simply setting a breakpoint dirties the file, then it must either be diffed to ensure there are no changes, or mindlessly checked back into SVN to ensure no changes are inadvertently lost.

If I debug the project and set a breakpoint, now my SVN indicates my local file is different, and that is why it is annoying to me.
This topic is 11 years and 2 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.