Best practice to debug exceptions coming from clientContext.ExecuteQuery() in PnP Powershell ?

Copper Contributor

I am using the pnp powershell template provisioning a lot and I am loving it. Sometimes I have exceptions and try to figure out why. I have downloaded the SharePointPnP.Powershell and OfficeDevPnp.Core solutions and can attach to process in Visual Studio. I can see the occurred exception in Visual Studio, but it is on a line where I see "clientContext.ExecuteQuery()". Is it possible to debug deeper? What is happening inside this method? I would like to know this because the current exception don't give me enough information.

 

See printscreen below for an example.

 

debugging pnp powershell.png

0 Replies