Tracing deployed app

2012-04-21 Thread Greg Keogh
Folks, I have one of those stinkers where my SL4 app woks nicely on my dev
machine, but when it's deployed to the live server it behaves incorrectly.
So I'm wondering what the easiest way is to log/trace what's happening
inside the app on the live machine. In a previous app I had laced the code
with my own logging which I put into a rolling array, and I had a button in
the UI to show the lines in a list box. It works, but it's completely
hand-written.

 

I could add similar manual logging to my new app, but before I do that
rather tedious work I was wondering if there are better ways of
tracing/logging what's happening inside my SL4 app (inside IE8) on a live
machine. It would be nice if I could add logging calls to my code, but let
something else do the work of catching and displaying the data (like the
Trace infrastructure).

 

Perhaps there are tricks and techniques I'm not aware of.

 

Greg

___
ozsilverlight mailing list
ozsilverlight@ozsilverlight.com
http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight


RE: Tracing deployed app

2012-04-21 Thread Steven Nagy
Hi Greg,

Presuming it's a Silverlight app, the first thing you can do is attach the 
debugger from your dev machine.
That's what's great about Silverlight - it's a client side technology. So when 
you hit the website in prod, you're still running the app locally.
Just use VS to 'Attach to process' and find the IE (or other browser) instance 
that has process type 'Silverlight'.

Next to ensure your app is talking to the server (let's say via WCF or RIA 
services) you can use Fiddler to view the requests/responses.

If you are getting failed requests, you can turn on 'Failed Request Logging' in 
IIS, this will show you what HttpModules are being called, etc.
You can also use process monitor to see which DLLs are spun up via the IIS 
worker process on the prod box (assuming you are allowed to RDP to it).
Naturally turning on profiling to ensure your database is being called from the 
server helps identify any connection problems there.

Beyond that, assuming it is a pure code issue, then yeah.. logging. :)
Log4Net is a good place to start. But this is all for server side of course 
(WCF, RIA).
If you're thinking about logging for client side, well just attaching the 
debugger should do the trick most the time.

Hope this helps

Steven Nagy
Readify | Senior Consultant | MVP Windows Azure
M: +61 404 044 513 | E: steven.n...@readify.net | 
B: azure.snagy.name

From: ozsilverlight-boun...@ozsilverlight.com 
[mailto:ozsilverlight-boun...@ozsilverlight.com] On Behalf Of Greg Keogh
Sent: Saturday, 21 April 2012 5:52 PM
To: 'ozSilverlight'
Subject: Tracing deployed app

Folks, I have one of those stinkers where my SL4 app woks nicely on my dev 
machine, but when it's deployed to the live server it behaves incorrectly. So 
I'm wondering what the easiest way is to log/trace what's happening inside the 
app on the live machine. In a previous app I had laced the code with my own 
logging which I put into a rolling array, and I had a button in the UI to show 
the lines in a list box. It works, but it's completely hand-written.

I could add similar manual logging to my new app, but before I do that rather 
tedious work I was wondering if there are better ways of tracing/logging what's 
happening inside my SL4 app (inside IE8) on a live machine. It would be nice if 
I could add logging calls to my code, but let something else do the work of 
catching and displaying the data (like the Trace infrastructure).

Perhaps there are tricks and techniques I'm not aware of.

Greg
___
ozsilverlight mailing list
ozsilverlight@ozsilverlight.com
http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight


Re: Tracing deployed app

2012-04-21 Thread Jordan Knight
You'd have to begin by assuming some kind of server interaction is causing the 
problem - start with fiddler perhaps...

Cheers,

Jordan. 

On 21/04/2012, at 5:51 PM, "Greg Keogh"  wrote:

> Folks, I have one of those stinkers where my SL4 app woks nicely on my dev 
> machine, but when it’s deployed to the live server it behaves incorrectly. So 
> I’m wondering what the easiest way is to log/trace what’s happening inside 
> the app on the live machine. In a previous app I had laced the code with my 
> own logging which I put into a rolling array, and I had a button in the UI to 
> show the lines in a list box. It works, but it’s completely hand-written.
>  
> I could add similar manual logging to my new app, but before I do that rather 
> tedious work I was wondering if there are better ways of tracing/logging 
> what’s happening inside my SL4 app (inside IE8) on a live machine. It would 
> be nice if I could add logging calls to my code, but let something else do 
> the work of catching and displaying the data (like the Trace infrastructure).
>  
> Perhaps there are tricks and techniques I’m not aware of.
>  
> Greg
> ___
> ozsilverlight mailing list
> ozsilverlight@ozsilverlight.com
> http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight
___
ozsilverlight mailing list
ozsilverlight@ozsilverlight.com
http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight


RE: Tracing deployed app

2012-04-21 Thread Greg Keogh
Chaps, I spent an hour this morning adding simple logging inside my new SL4 
app. I added a button and a child window to display the stack of messages in a 
ListBox. It wasn’t much new code and it works fine and helped me locate the 
problem quickly once it was working. It’s a rather low-tech fix.

 

It turns out I was parsing some bad XML and the null exception was getting 
swallowed somehow. I still haven’t figured out why it didn’t result in one of 
those ugly IE popups with a general SL error message. Had I received one of 
those popups I would have known instantly that I’d stuffed up my logic, but I 
just don’t know why I didn’t get one, perhaps some browser setting, dunno?!

 

Greg 

___
ozsilverlight mailing list
ozsilverlight@ozsilverlight.com
http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight