logo
Welcome to our new AbleCommerce forums. As a guest, you may view the information here. To post to this forum, you must have a registered account with us, either as a new user evaluating AbleCommerce or an existing user of the application. For all questions related to the older version of Gold and earlier, please go to AbleCommerce Gold forum. Please use your AbleCommerce username and password to Login. New Registrations are disabled.

Notification

Icon
Error

Options
Go to last post Go to first unread
Joe Payne @ Solunar  
#1 Posted : Wednesday, March 9, 2022 4:00:40 PM(UTC)
Joe Payne @ Solunar

Rank: Member

Groups: Developers, Registered, HelpDesk
Joined: 11/7/2018(UTC)
Posts: 23

Thanks: 5 times
Let's assume the UPS Gateway for this example.

I add the project to my solution. The project has a post-build event that copies the binaries, views, content folder etc to the /Plugins/Ups/ folder. It also zips up the plugin.

But what if that plugin is already installed in my dev site and I need to debug it?

Breakpoints aren't going to hit because the post-build event is putting the compiled dll in the /Plugins/Ups/ folder isn't the dll being loaded. The dll is actually loaded from /Plugins/Bin/ once the plugin is installed.

So should be setting output directory to the /Plugins/Bin/ folder? Because when I do that, the dll is always in use by IIS and Visual Studio can't replace it.

I can't just uninstall and reinstall the plugin every time I recompile, I'd have to reconfigure the settings every time.

Is there an easier way to debug a modified plugin?
Joe Payne, AbleMods Hosting LLC
https://www.ablemodshosting.com

Wanna join the discussion?! Login to your AbleCommerce Forums forum account. New Registrations are disabled.

shaharyar  
#2 Posted : Friday, March 18, 2022 6:21:08 AM(UTC)
shaharyar

Rank: Advanced Member

Groups: Admin, Developers, Registered, HelpDesk, Authorized User
Joined: 10/5/2018(UTC)
Posts: 704

Thanks: 5 times
Was thanked: 113 time(s) in 112 post(s)
Hi Joe,

You should be able to debug the plugin code without any changes.
Once the plugin project is added to the solution we just need to build the project and place the breakpoints in the plugin code.

What happens on compiling the plugin project is
- Files/DLLs are updated in the /Plugin folder
- new zip is created for the plugin
- And when the plugin page/widget is accessed from the browser, updated DLLs are copied to the /plugins/bin folder


You can try once again:
- Try to clean to project
- Then rebuild the plugin project
- Also, build the ablecommerce project
- Confirm that the new zip and folder is updated in /plugins folder

Hope this helps!
Joe Payne @ Solunar  
#3 Posted : Friday, March 18, 2022 3:20:57 PM(UTC)
Joe Payne @ Solunar

Rank: Member

Groups: Developers, Registered, HelpDesk
Joined: 11/7/2018(UTC)
Posts: 23

Thanks: 5 times
Thanks Shaharyar.

What I ended up doing is setting the output path of each gateway project to put the DLL in the respective /plugins/ folder.

So UPS builds to /plugins/UPS/, Avalara builds to /plugins/Avalara/ etc. This seems to resolve both the issue with debugging although I don't understand why. The symbols file doesn't get copied to the /plugins/bin/ folder but VS2019 still finds it.
Joe Payne, AbleMods Hosting LLC
https://www.ablemodshosting.com
Users browsing this topic
Guest (3)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.