1

A SharePoint solution is installed on our dev server. We are working on the new changes and unfortunately we cannot deploy and test our changes on the provided dev server. I am trying to debug manually and understand the existing application execution by attaching it to w3wp process. So I made some changes in my solution and tried debugging manually. Unfortunately the point does not break on my new code changes, it just breaks on the lines that are part of the deployed solution. Will I not be able to test my changes while debugging manually, unless the changes are deployed ?

2
  • Trying to understand your setup here - is the copy of VS where you made code changes running on a server that has SP installed? Is that the same "dev server" where you cannot deploy code, or is VS on a different machine? Where is the w3wp process that you attach to running - on the dev server where you can't deploy code, or on the machine where VS is installed? Maybe use some imaginary machine/server names to help us understand the setup. Nov 25 '20 at 19:34
  • VS is installed on same server on which SP is installed. We have a copy of the installed SP solution. We are using this copy code to debug and it works as expected. We made few changes to the copy code but it is not deployed. When we try to debug manually, here the point does not break on the new change lines but only on the existing lines of code.
    – noah_dvlpr
    Nov 26 '20 at 11:22
0

Ok, based on your answer to my question in the comments, the short answer to your question

Will I not be able to test my changes while debugging manually, unless the changes are deployed?

is: yes, that is correct, you will not be able to debug unless your changes are deployed.

The reason for that is this: when you write new code in VS, save those files and rebuild the project, the resulting .dll file is still sitting in a folder in the VS project directory.

The w3wp process has no knowledge of your VS project directory, and the .dll that the w3wp process is loading and running is coming from somewhere else on the server (typically the GAC).

Your rebuilt .dll file (which includes your new code changes) only gets to the location where it can be loaded by the w3wp process if you deploy the solution.

1
  • True. I located the project(s) folders in GAC. Since I am not deploying, I manually copied the built dll and pdb files from solution folder to the GAC folder. I had to stop the SharePoint timer service and end IIS worker process to perform the movement. Then all the symbols loaded for all of my projects :) Thank you !
    – noah_dvlpr
    Dec 13 '20 at 22:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.