Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Request] Can you add a wiki section on how to attach debugger to the WixSharp Managed sequence #1393

Closed
Smurf-IV opened this issue Dec 4, 2023 · 4 comments

Comments

@Smurf-IV
Copy link

Smurf-IV commented Dec 4, 2023

Is it possible to attach a debugger to the running output exe, so that things like exceptions during the protected override void Run() can be debugged ?

Are there other tips'n'Tricks on how to debug the Managed UI sequences ?

  • Install
  • Maintencance
  • Uninstall
  • Bundle equivalents for the above
  • How to override a bundle downgrade detect and force an uninstall first ? (I know not really a debug, but it's a big feature in some circles ;-))
@oleg-shilo
Copy link
Owner

oleg-shilo commented Dec 4, 2023

This is the chapter that describes Managed CA and also explains ho debug it.
https://github.com/oleg-shilo/wixsharp/wiki/Deployment-scenarios#managed-custom-actions
Interestingly enough GitHub has lost there the pasted images :o) Haven't seen such problem before. Maybe maintenance or something.

. . .

Is it possible to attach a debugger to the running output exe

It's actually simpler than debugging CA. It's not elevated so you debug it as any other managed app.
I usually place Debug.Assert(false); and then simply attach the debugger when prompted.

. . .

I thought about tips'n'tricks wiki. Bus sadly haven't done it yet. One of the users created a tips'n'tricks for performance tuning. It's referenced in the root readme

@Smurf-IV
Copy link
Author

Smurf-IV commented Dec 5, 2023

Here's a Tip'n'Trick:

How to make the Winform Dialogs look "Nice" (Not Fuzzy) for high res scaled monitors

    public class ManagedBa : BootstrapperApplication
    {
        [System.Runtime.InteropServices.DllImport("user32.dll")]
        private static extern bool SetProcessDPIAware();

        protected override void OnStartup(StartupEventArgs args)
        {
            SetProcessDPIAware();   // https://stackoverflow.com/a/44839778
            Debug.Assert(false);
            base.OnStartup(args);
        }

@oleg-shilo
Copy link
Owner

@Smurf-IV
Copy link
Author

Smurf-IV commented Dec 7, 2023

:-D

@Smurf-IV Smurf-IV closed this as completed Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants