Debug plugin in nopcommerce 4 (visual studio 2017)

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
6 years ago
Hi

I am new in nopcommerce 4. I need to write a plugin and debug it but when I set breakpoint in my plugin after attach nop.web.exe the breakpoint shows this message "the breakpoint will not currently be hit.no symbols have been loaded for this document".

How can I fix this problem in visual studio 2017?

Thanks in advance.
6 years ago
mohsen_r wrote:
Hi

I am new in nopcommerce 4. I need to write a plugin and debug it but when I set breakpoint in my plugin after attach nop.web.exe the breakpoint shows this message "the breakpoint will not currently be hit.no symbols have been loaded for this document".

How can I fix this problem in visual studio 2017?

Thanks in advance.
.

Please follow these urls.

https://developercommunity.visualstudio.com/content/problem/100383/visual-studio-community-2017-debugger-not-working.html

https://stackoverflow.com/questions/46200632/breakpoints-are-not-hitting-in-visual-studio?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa

It's seems like problem in configuration.
6 years ago
Hello
Thank you for your response.

I follow those urls but still I have same problem. When I attach process "nop.web.exe" every breakpoints in Nop.Web wrork fine but in plugin, for example in Configure action
public IActionResult Configure()
{
}

breakpoint shows this message "the breakpoint will not currently be hit.no symbols have been loaded for this document".
6 years ago
Be sure you're compiling your plugin in Debug mode (not release mode)
6 years ago
New York wrote:
Be sure you're compiling your plugin in Debug mode (not release mode)


I checked that and it is Debug mode.

Can be a bug from Visual Studio 2017? It is last version 15.6.4 .

I debug another project that created by asp.net mvc with class libaries and there is no problem.
6 years ago
Not sure.  maybe something in here might help
https://developercommunity.visualstudio.com/content/problem/97445/vs2017-the-breakpoint-will-not-currently-be-hit-no.html
6 years ago
New York wrote:

Hello
Thank you for your help.

I noticed that in nopcommerce the path "\Nop.Web\Plugins\bin" has no .pdb files and thus in modules window all plugins Symbol Status column value is "Cannot find or open the PDB file".
For my plugin I manually copy .pdb file to bin folder and debug my code.

Do you know why in plugin output path copy both of .dll and .pdb but in "\Nop.Web\Plugins\bin" only copy .dll? Althought I set project in Debug mode and other correct setting.
6 years ago
Is there a reason why you are "... attach nop.web.exe", rather than just running the site from inside VS?
6 years ago
There is no reason. I always run project with ctrl+f5 and for debug I attach to proccess iisexpress.exe but in nopcommerce I realize I must attach nop.web.exe.
5 years ago
New York wrote:
Is there a reason why you are "... attach nop.web.exe", rather than just running the site from inside VS?


Running most functionality within VS is fine though with plugins it can be difficult when dealing with call backs from payment gateway redirect pages.

Not answering for the OP but I can see why there is advantage over running debug via attach process over inside VS.

(I'm looking at this thread as I am having the same problem despite everything being compiled in debug mode).
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.