0

This scenario is where there is a Blazor web application platform, inside of which plugin modules can be run. Specifically in my case this is the Oqtane platform, but the question could apply to other Blazor web app platforms e.g. ABP.io. The plugin modules are basically assemblies, that are loaded into the platform application at runtime.

My question is - how to debug a plugin module where the platform is running under IIS, i.e. the platform is NOT being launched via Visual Studio.

I know that one way to do this would be to get the platform source code, open its solution in Visual Studio, then add the plugin module projects to the solution, and launch the whole application from VS.

However, for various reasons I prefer to run my development instance of the platform under IIS, and maintain a VS solution that just contains the plugin module projects, and copy the DLLs and wwwroot content into the instance on build (and restart the IIS app pool).

So this approach does work, except I can't see how to debug my plugin module code when the app is running. If this was a WebForms or MVC application, I would use the VS "attach to process" command to attach to w3wp.exe. However, Blazor apps running under IIS clearly don't work like that.

FYI, the app runs in Blazor Server mode (not WebAssembly), and is .NET 6.0

Is this kind of approach possible, and how?

1 Answer 1

0

It seems I was mistaken about not being able to use Attach to Process to attach to w3wp.exe (due to some misconfiguration, the process was not showing up to attach to).

If you make the following selections on the Attach to Process window, you should find that the w3wp.exe process shows up and can be attached to, which means you can debug your plugin module assembly code:

  • Connection type: Default
  • Connection target: your machine
  • Attach to: Managed (.NET Core, .NET 5+) code
  • Show processes for all users: checked

enter image description here

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.