I successfully configured and debugged the ActiveX component via w3wp.exe.
My VM environment contains:
Windows Server 2019
Visual Studio 2019
Visual Basic 6.0
IIS 10.0.17763.1
Setup steps:
In regedit.exe find Clsid of my ActiveX component MyVbpProj.MyClass in HKEY_CLASSES_ROOT\MYVBPPROJ.MYCLASS\Clsid (e.g. {16731801-1C28-4A19-A127-123093BA1A1C})
In regedit.exe add in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Ole:
"LegacyAuthenticationLevel"=dword:00000001
"LegacyImpersonationLevel"=dword:00000003
Reboot VM
Config IIS pool to Curent user. Go to IIS Manager > Application Pools
Select MyIISAppPool pool in list, click Advanced Settings in contex menu
In Advanced Settings window set Identity select Custom account and fill: user name, password and click OK button
Restart IIS server (run in CMD: iisreset)
Open project MyVbpProj.vbp with ActiveX component MyVbpProj.MyClass
In top menu File, then Make MyVbpProj.dll... submenu item
In top menu Project then MyVbpProj Properties... submenu item
In MyVbpProj - Project Properties windows, on General tab set Project Type = ActiveX DLL and select checkboxs: Unattended Execution, Upgrade ActiveX Controls, Retained In Memory
In MyVbpProj - Project Properties windows, on Debugging tab select radiobox Wait for components to be created, then select checkbox Use existing browser and click OK button
Open some class and add breakpoint for debugging in which method
Run debug in Visual Basic 6.0
In dcomcnfg.exe app set pemision for DCOM with clsid {16731801-1C28-4A19-A127-123093BA1A1C} (for ActiveX component MyVbpProj.MyClass), and after every run debug in Visual Basic 6.0
Go to Component Services > Computers > My Computer > DCOM config
Select in right grid item with name {16731801-1C28-4A19-A127-123093BA1A1C} and click Properties in contex menu
In {16731801-1C28-4A19-A127-123093BA1A1C} Properties windows, on Security tab for all groups: Launch and Activation Permissions, Access Permissions, Configuration Permissions select Customize radiobox and click Edit... button
Everyone user and Allow all permissions for Everyone user
In all permissions windows on Security tab, add Everyone user and select all permissions checkboxs Allow for Everyone user and click OK button
In my case, HKEY_CLASSES_ROOT\AppID\{16731801-1C28-4A19-A127-123093BA1A1C} contains:
"AppID"="{16731801-1C28-4A19-A127-123093BA1A1C}"
"RunAs"="Interactive User"
"LaunchPermission"=hex:01,00,some values,14,00
"AccessPermission"=hex:01,00,some values,14,00
Call in browser go to ASP page with Server.CreateObject("MyVbpProj.MyClass") and then go to the page with the method you are debugging
P.S. In case of an error occurring with the name of other ActiveX components from vbp projects. Load their vbp projects, go top menu File, then Make MyOtherLibs.dll... submenu item. Then restart VM and repeat the steps starting from the step of run debugging and other steps. Use debug with multy existing projects (In top menu File then Add Projects... submenu item)
P.S. In case of freezing or IIS error on Component Services > Computers > My Computer click Properties in context menu, on COM Security tab for all groups click Edit Limits... and Edit Default... and add Everyone user, then select all permissions checkboxs Allow for Everyone user and click OK button