How to view debug at businessobject.

How to view debug at businessobject.

Old forum URL: forums.lhotka.net/forums/t/5285.aspx


future_zheng posted on Friday, August 22, 2008

Use Version Decription: I'm using Csla.net 3.0.4.0 and using ProjectTracker.Library。

Question: What  can I do for me to view debug information in Project.DataPortal_Fetch.

I'm Coding : private void DataPortal_Fetch(Criteria criteria){

         // FecthData use DataHelper。

        //MyDebug Information

       Debug.Write("DebugWirte: " + Database.PTrackerConnection);}

I want to view debug information,however  not only Client Port but also WebServer Port,I don't view debug information.

Please tell me what can I do????

 

rsbaker0 replied on Friday, August 22, 2008

It has been some time since I did this, but we were able to debug the server-side of web services data portal (as long it was hosted in IIS on the same machine as the client).

We may have needed to set a breakpoint in the server-side code for it to hit before it would debug the server-side code.

future_zheng replied on Friday, August 22, 2008

please use coding to explain. and I'm careful of View debug. for example : in businessobject's Fetch()  method,I want to  implement [Debug.Write("123456")]。then debugView will display "12345".

rsbaker0 replied on Friday, August 22, 2008

Your code looks OK (I may have misunderstood your original post).

Are you debugging with IIS on the same machine as Visual Studio? (And which type of data portal are you using?)

future_zheng replied on Monday, August 25, 2008

[Serializable()]

 public class Project : BusinessBase<Project>
 {

         //omit other method and member

         private void DataPortal_Fetch(Criteria criteria)
        {

                 // Read Data

                …………

                //Debug

                 Debug.Write("View Debug Infor Is OK");

          }

}

the code up,however I don't  find out put the debug information "View Debug Infor Is OK";  Use a  unattached computer as Application Server  .

 

JonnyBee replied on Monday, September 01, 2008

First of all - is your server running Debug og Release compiled code? Debug.Write is only added to your code when compiling in Debug mode. Use Trace command if you want the info in either mode.

You should be able to use DebugView from SysInternals to get output from Debug on both your client and server (providing you have the necessary rights to the server).

If you always want to get debug info back from the "server" I guess you could create a string property in GlobalContext and write that content to Debug in the OnDeserialized in your Root object (on the client).

/jonny

future_zheng replied on Tuesday, September 02, 2008

Thanks for your suggest .and thank for everybody .

Copyright (c) Marimer LLC