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? |
|
|
|
|
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!
|
|
|
|
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. |
|
|
|
|
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.
Important Information:
The AbleCommerce Forums uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close