Conversation
…#487) The Debug Program dialog kept its MRU only in memory, so the executable, arguments, working directory etc. were lost when dnSpy was restarted. The last used options are now saved to the settings file and restored the next time the dialog is opened. Since StartDebuggingOptions is polymorphic and the concrete types live in per-engine contract assemblies, serialization is implemented via two new virtual methods on StartDebuggingOptionsPage (SerializeOptions/DeserializeOptions) that each engine's page overrides. Pages that don't override them simply aren't persisted. Environment variables are intentionally not persisted: DbgEnvironment pre-loads the entire current process environment, so serializing it would bloat the settings file and replay a stale environment.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #487
The Debug Program dialog setting where only in memory, so the executable, arguments, working directory etc. were lost on restart. This was quite annoying for me in the past. This PR persists the last-used options to the settings file and restores them the next time the dialog is opened.
The serialize helpers are intentionally implemented per engine (CorDebug / Mono / Mono-connect) even though they look similar: the options hierarchies only share BreakKind, and the engine contract assemblies don't reference each other. A shared helper would have required new cross-engine public API, so I followed the existing structure of the page base classes instead. Happy to change that if you want.
Tested under Windows with net48.