locked
Problem debugging in SharePoint RRS feed

  • Question

  • Although it worked fine, I can't debug a workflow anymore.

    When I add an item manually, the item is correctly added to the list. But I can't do anything else. If I refresh the page, it will load forever until I stop the debug, and then I will receive the email about the item that I have just added...

    The breakpoint says: The breakpoint will not currently be hit, no symbols have been loaded for this document...

    I have attached all the w3wp.exe, iisreset... It worked just fine a hour ago :(

    I have also tried to debug a wcf webservice in my sharepoint site from another solution:

    unable to start debugging on the web server. the web server did not respond in a timely manner. this may because another debugger is already attacher to the web server.


    • Edited by okdreamy Wednesday, March 20, 2013 11:41 AM
    Wednesday, March 20, 2013 9:43 AM

All replies

  • Hi,

    I have recieved this issue a couple of times before. After an IISReset it should be working correctly.
    Also, even though it says the breakpoint will not be hit, that is not always the case. When the workflow starts and the definition is uploaded and becomes active it will then be able to reach the breakpoint.

    This is by design to an extent as the breakpoint locks the execution thread.

    Regards
    Pieter
    Wednesday, March 20, 2013 11:59 AM
  • I have tried IISreset but it didn't work.

    The problem is the workflow doesnt happen to work while on debug. As soon as I Stop the debug, The site can be accessible again and the first mail from my workflow is sent

    Wednesday, March 20, 2013 12:01 PM
  • Hi,

    You have had several issues with workflows lately I see.

    I still maintain that your workflow logic is flawed. Can you upload your workflow somewhere so I can have a look at it?

    If this is not possible could you then upload a series of screenshots. One of the state machine workflow designer and 1 of each state and a brief description of the events and custom code you added.

    Regards
    Pieter
    Wednesday, March 20, 2013 12:42 PM
  • hi,

    try to change the settings in Visual Studio

    go to Debug--------option and settings

    Debugging--------General

    Uncheck the   Enable Just My Code ( Managed Only )


    sal

    Wednesday, March 20, 2013 1:16 PM
  • I did uncheck the "Enable Just My Code" but it does not seem to work either...

    I know I had some problem with the workflow. However, If I deploy the project, the workflow is flawless. If I try to debug it, I am able to create a new item in the list attached to the workflow. However, Nothing will work (I will nob be able to open a new page to my SharePoint site).

    In my Output debug window, I found that it returns a lot of problem:

    w3wp.exe' (Managed (v2.0.50727)): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.SharePoint.intl\14.0.0.0__71e9bce111e9429c\Microsoft.SharePoint.intl.dll'
    'w3wp.exe' (Managed (v2.0.50727)): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.Office.Access.Server\14.0.0.0__71e9bce111e9429c\Microsoft.Office.Access.Server.dll'
    'w3wp.exe' (Managed (v2.0.50727)): Loaded 'C:\Windows\assembly\GAC_MSIL\SMDiagnostics\3.0.0.0__b77a5c561934e089\SMDiagnostics.dll'
    Auto-attach to process '[3800] w3wp.exe' on machine 'G-17' succeeded.
    'w3wp.exe' (Managed (v2.0.50727)): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Web.RegularExpressions\2.0.0.0__b03f5f7f11d50a3a\System.Web.RegularExpressions.dll'
    'w3wp.exe' (Managed (v2.0.50727)): Loaded 'C:\Windows\assembly\GAC_MSIL\System.IdentityModel\3.0.0.0__b77a5c561934e089\System.IdentityModel.dll'
    'w3wp.exe' (Managed (v2.0.50727)): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.Office.Visio.Server\14.0.0.0__71e9bce111e9429c\Microsoft.Office.Visio.Server.dll'
    'w3wp.exe' (Managed (v2.0.50727)): Loaded 'C:\Windows\assembly\GAC_MSIL\System.WorkflowServices\3.5.0.0__31bf3856ad364e35\System.WorkflowServices.dll'
    'w3wp.exe' (Managed (v2.0.50727)): Loaded 'C:\Windows\assembly\GAC_MSIL\System.ServiceModel.Web\3.5.0.0__31bf3856ad364e35\System.ServiceModel.Web.dll'
    'w3wp.exe' (Managed (v2.0.50727)): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.Diagnostics.ServiceModelSink\3.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.Diagnostics.ServiceModelSink.dll'
    A first chance exception of type 'System.Configuration.ConfigurationErrorsException' occurred in System.Configuration.dll
    A first chance exception of type 'System.Configuration.ConfigurationErrorsException' occurred in System.Configuration.dll
    A first chance exception of type 'System.Configuration.ConfigurationErrorsException' occurred in System.Configuration.dll
    A first chance exception of type 'System.Configuration.ConfigurationErrorsException' occurred in System.Configuration.dll
    ...
    w3wp.exe' (Managed (v2.0.50727)): Loaded 'C:\Windows\assembly\GAC_MSIL\System.IdentityModel.Selectors\3.0.0.0__b77a5c561934e089\System.IdentityModel.Selectors.dll'
    A first chance exception of type 'System.Threading.ThreadAbortException' occurred in mscorlib.dll
    A first chance exception of type 'System.Threading.ThreadAbortException' occurred in Microsoft.SharePoint.dll
    A first chance exception of type 'System.Threading.ThreadAbortException' occurred in System.Web.dll
    'w3wp.exe' (Managed (v2.0.50727)): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.AnalysisServices.AdomdClient\9.0.242.0__89845dcd8080cc91\Microsoft.AnalysisServices.AdomdClient.dll'
    'w3wp.exe' (Managed (v2.0.50727)): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.HtmlTrans.Interface\14.0.0.0__71e9bce111e9429c\Microsoft.HtmlTrans.Interface.dll'
    A first chance exception of type 'System.TypeLoadException' occurred in Microsoft.SharePoint.dll
    'w3wp.exe' (Managed (v2.0.50727)): Loaded 'C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\root\0f986a98\cbe18533\App_Web_viewpage.aspx_-1081523282.ty39dcxg.dll', Symbols loaded.
    'w3wp.exe' (Managed (v2.0.50727)): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.SharePoint.Taxonomy.intl\14.0.0.0__71e9bce111e9429c\Microsoft.SharePoint.Taxonomy.intl.dll'
    A first chance exception of type 'System.Configuration.ConfigurationErrorsException' occurred in System.Configuration.dll
    A first chance exception of type 'System.Configuration.ConfigurationErrorsException' occurred in System.Configuration.dll
    A first chance exception of type 'System.Configuration.ConfigurationErrorsException' occurred in System.Configuration.dll
    A first chance exception of type 'System.Configuration.ConfigurationErrorsException' occurred in System.Configuration.dll
    A first chance exception of type 'System.Configuration.ConfigurationErrorsException' occurred in System.Configuration.dll
    A first chance exception of type 'System.Configuration.ConfigurationErrorsException' occurred in System.Configuration.dll
    A first chance exception of type 'System.Configuration.ConfigurationErrorsException' occurred in System.Configuration.dll
    A first chance exception of type 'System.Configuration.ConfigurationErrorsException' occurred in System.Configuration.dll
    'w3wp.exe' (Managed (v2.0.50727)): Loaded 'C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\root\0f986a98\cbe18533\App_Web_metadatanavtree.ascx.5f1d2a77.aoi9abk9.dll', Symbols loaded.
    A first chance exception of type 'System.IO.FileNotFoundException' occurred in Microsoft.SharePoint.dll
    'w3wp.exe' (Managed (v2.0.50727)): Loaded 'C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\root\0f986a98\cbe18533\App_Web_taxonomyfieldeditor.ascx.5f1d2a77.jdihu0cg.dll', Symbols loaded.
    A first chance exception of type 'System.TypeLoadException' occurred in System.Web.dll
    A first chance exception of type 'System.TypeLoadException' occurred in System.Web.dll
    A first chance exception of type 'System.Web.HttpParseException' occurred in System.Web.dll
    A first chance exception of type 'System.Web.HttpParseException' occurred in System.Web.dll
    A first chance exception of type 'System.Web.HttpParseException' occurred in System.Web.dll
    A first chance exception of type 'System.Web.HttpParseException' occurred in System.Web.dll
    'w3wp.exe' (Managed (v2.0.50727)): Loaded 'C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\root\0f986a98\cbe18533\App_Web_templatepickercontrol.ascx.5f1d2a77.yk694m9k.dll', Symbols loaded.

    Wednesday, March 20, 2013 2:59 PM
  • Check the debugger process's user permission whether or not it has full permission to your site. Also, check the managed accounts. Sometimes, when you change passwords for managed accounts, you may face these problems. Update the managed accounts using powershell; also make sure the application pool's user accounts are updated as well. Also, try to login as the system account and debug your application from visual studio.
    • Proposed as answer by Nagendra m Thursday, March 21, 2013 8:20 AM
    • Unproposed as answer by okdreamy Thursday, March 21, 2013 3:19 PM
    Wednesday, March 20, 2013 8:22 PM
  • I have tried to create a new Workflow Solution and add a breakpoint to the onWorkflowActivated1, but it never stops (breakpoint will not currently be hit. No symbols have been loaded for this document.)

    The debugger process has admins rights, and I didn't change any password nor add accounts.

    I am not sure how to debug the app while login as the system account.

    I have tried to reinstall SharePoint Server from my dev machine (Win7) and tried to repair VS 2010, I am out of idea :(

    The debug works and stops at the breakpoint if I add a eventHandler to a list, but does not work in a workflow. As soon as the workflows is started, I am unable to do anything to the SharePoint site (If I open a new tab to the SP site, it will just load forever). In the debug output, I can see that line:

    'w3wp.exe' (Managed (v2.0.50727)): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.Workflow.DebugController\10.0.0.0__31bf3856ad364e35\Microsoft.Workflow.DebugController.dll'Don't know why the symbols doesnt load... and it stucks there :(



    • Edited by okdreamy Thursday, March 21, 2013 3:40 PM
    Thursday, March 21, 2013 3:19 PM
  • Hi.

    Two things:

    * Have you deployed in GAC your assembly? If you decide to use bin folder instead, verify if another copy of your dll was in GAC. GAC won versus BIN

    * Some activity are managed by workflow engine by owstimer (e.g. delay activity). Try to restart owstimer (http://zsvipullo.blogspot.co.uk/2011/10/restart-di-servizi-remoto.html)  process and attach to this also (http://zsvipullo.blogspot.co.uk/2012/06/polling-on-sharepoint-workflow.html)


    Regards,
    Bubu
    http://zsvipullo.blogspot.it

    Please mark my answer if it helped you, I would greatly appreciate it.

    Thursday, March 21, 2013 3:33 PM
  • Hi,

    Yes I have Set Assembly Deployment Target to Global Assembly Cache in the Project property.

    I have also tried IISRESET but no change...

    So strange :( I can debug a Event Receiver correctly, but As soon as the workflow starts, the whole site stops working... can't access to it even through designer

    Friday, March 22, 2013 12:53 PM
  • Hi okdreamy,

    I used to encounter the same issue with Visual Studio 2010 RTM. After applyed the Service Package(SP) 1. The issue gone away.

    So, please ensure the Visual Studio is up to date.

    Also, please try to reset Visual Studio's settings. In some scenarios, it would works.
    http://msdn.microsoft.com/en-us/library/ms247075(v=vs.100).aspx

    Thanks,
    Jinchun Chen


    Jinchun Chen(JC)
    TechNet Community Support

    Wednesday, March 27, 2013 8:17 AM
  • You gave me hope but it still does not work... Anyway I have given up and logged to the workflow history at each step in order to find eventual problem :)

    I use Microsoft Visual Studio 2010 v 10.0.40219.1 SP1Rel

    Tuesday, April 2, 2013 7:05 AM
  • Same issue on my VS2010/SharePoint2010. same SP version. Problem is on sharepoint workflow only, if I debug event receiver, works fine.

    Feel like VS2010 became slower and slower to hit the breakpoint. One day it never come back. Workflow is running fine without debugging mode.

    I am on Virtualbox VM and have a backup of environment. I copied the same workflow to my backup environment, VS debugging is working fine there.

    Anyone found a slolution yet?

    Your help is much appreciated!

    Kind regards,

    Mark

     

    Friday, May 3, 2013 5:26 AM