Tsis tau lwm yam kev tshwm sim Receiver Debug ua kom yuam kev

Kuv kom kuv kuj tsis yog thawj tug neeg tuaj txog qhov nov. Txawm li cas los, Kuv tsis pom leej twg luam tawm tsab ib ua kom yuam kev li no vim kuv pib hmoog kaw rau lub zej zog lub Xya Hli Ntuj tas los no. Li ntawd, Kuv xav tias kuv yuav tswg nws no lub taub debug txoj kev sai thiab yooj yim.

Kuv tabtom ua hauj lwm rau hauv ib qho kev tshwm sim receiver uas pib Meskas no yuam kev hauv lub 12 nas muv:

Yuam kev chaw thau khoom thiab khiav cov kev tshwm sim receiver Conchango.xyzzyEventReceiver nyob xyzzy, Version = 1.0.0.0, Culture = nruab nrab, PublicKeyToken = blahbalhbalh. Xav paub ntxiv hauv qab no yog. : Kwv siv tsis tau teem rau kev lom los ntawm ib tug kwv.

Kuv tsis paub qhov twg kuv twb nkag tau no tiam sis vim kuv tau ua ntau yam hauv ib qhov ntawm kuv qhov chaws/deploy/kuaj mus.

Kuv sim cov tshuaj no tau txais kuv cov pdb nyob rau ntawd nrog hopes ntawd SharePoint 12 nas muv yuav qhia rau cov pawg ib txoj lw, tab sis tsis muaj hmoo. Kuv tsis paub tias yog tau thiab yog hais tias ib tug neeg twg, thov qhia rau kuv paub 🙂

Kuv paub tias nws puas yuav tau mus sau ntawv rau koj tus kheej mus sib cav ntawm 12 nas muv. Frankly, Kuv xav tej yam tsawg me ntsis scary thiab kom muaj kev cuam sai.

Nws pom kuv tias kuv kawg tau ib cov lus sau ib txoj lw los tuag thiab rov ntuav generic ntxiv li no:

  ua tiag {
    UpdateEditionDate(khoom);
  }
  ntes (Kos e)
  {
    pov tshiab Kos("Dispatcher, UpdateEditionDate(): Kos: [" + e.ToString() + "].");
  }

Qhov no kuj nyob hauv lub 12 hive thusly:

Yuam kev chaw thau khoom thiab khiav cov kev tshwm sim receiver Conchango.xyzzyEventReceiver nyob xyzzy, Version = 1.0.0.0, Culture = nruab nrab, PublicKeyToken = blahblahblah. Xav paub ntxiv hauv qab no yog. : Dispatcher, UpdateEditionDate(): Kos: [System.NullReferenceException: Kwv siv tsis tau teem rau kev lom los ntawm ib tug kwv. tom Conchango.xyzzyManagementEventReceiver.UpdateEditionDate(SPItemEventProperties zog) tom Conchango.xyzzyManagementEventReceiver.Dispatcher(SPItemEventProperties zog, Txoj hlua eventDescription)].

Uas tau muab kuv nthuav dav kuv tau teev cia tias xyov qhov teeb meem thiab kuv cia siab tias yuav siv heev mus rau pem hauv ntej.

</kawg>

Subscribe rau kuv blog!

Ntawv cim npe Technorati: ,

3 xav txog"Tsis tau lwm yam kev tshwm sim Receiver Debug ua kom yuam kev

  1. Anders Rask
    Kuv muaj hmoo lately debugging no qhia txog tej teeb meem uas thaum lawv tseem SPTraceView thiab DebugView ntau heev
    Debugview ib leeg yog heev usefull zoo li. Koj yuav tau xa tawm cov zis siv System.Diagnostics.Debug.WriteLine().
    Koj tsis txhob txawm muaj tshem tau thaum koj tso tawm muaj, vim qhov zis tsuas yog triggered rau hauv debug muaj hom.
    SPTraceView yog ib tug uas tsim los ntawm Hristo Pavlov.
    Nyob lub neej ntawd teev nws yuav qhia koj ib txoj lw ULS txheej xwm li lawv tshwm sim. Thiab nws catches kuj tau cov txheej xwm ULS ib txoj lw uas * tsis * ua rau lub diagnostics cav!
    Tab sis, kom kuv lov tes taw li kuv khiav lub util. Whats zoo npaum li cas yog hais tias koj tau xa cov zis yuav tshwm nyob rau hauv DebugView.
    Nws kuj muaj zoo nta rau filtering ntawm cov kev tshwm sim ntau ntau ntau, thiab lwm yam kev pab.
    hth
    Anders
    oh and nice seeing you in the bar at SPBP 🙂
    Teb

sau ntawv cia

Koj email chaw nyob yuav tsis muab luam tawm. Search cim *