1

I am developing web parts in VS2013. After I upload and activate the web parts in SharePoint Online (i.e. https://xxxxxxx.sharepoint.com/), I cannot find ways to debug the web parts.

Can I use the "attach" function in VS2013 to debug so that I can run the web parts line by line? Or is there any other ways to achieve my objective?

Thank you very much.

Alexey
  • 414
  • 3
  • 10
KenLai
  • 251
  • 1
  • 4
  • 15
  • Most likely you mean managed code webparts developed as "sandbox solution". If not, please specify what you want to debug – Alexey Oct 15 '14 at 09:42

2 Answers2

2

You must debug all your managed code locally in a development environment. SharePoint Online doesn't and won't provide any means to debug any server side code that runs on its infrastructure, because that would greatly impact performance and stability of the service.

What you can debug in SharePoint Online is the client side JavaScript (using the browser's developer tools and the likes of FireBug add-ins).

Alexey
  • 414
  • 3
  • 10
1

I think that's not possible as you have deployed your solution to the sharepoint online. THe code can be debugged if it has the native code for that.

Solutions :

  1. Add the logging in your code which put an entry of an error in a list or library where you can see them. And also make sure it is not overloaded with the try catch as well.

Let me know if this helps you

Sigar Dave
  • 2,598
  • 1
  • 20
  • 42