PC Review


Reply
Thread Tools Rate Thread

CSharpCodeProvider: Stack trace line numbers on exceptions?

 
 
Ben Dilts
Guest
Posts: n/a
 
      29th May 2008
I'm using C# as a sort of scripting language by having text entered by my
user compiled using the CSharpCodeProvider and run, with references to an
assembly that has utility functions in it.

When an exception is thrown by my dynamically-compiled assembly, I can get a
stack trace on the exception, but it doesn't show what line the error
occurred on. I need to be able to tell my user where their error occurred.

It doesn't seem to matter if IncludeDebugInformation is true or false on my
CompilerParameters. I tried compiling from temporary files rather than
directly from a string in memory, but it had no effect.

How can I get line numbers on stack traces for exceptions thrown by
dynamically-compiled assemblies?


~BenDilts( void );
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ASP.NET 2.0 Web Site gives Stack Trace without line numbers John Kotuby Microsoft ASP .NET 2 7th Mar 2007 06:59 PM
Line numbers in stack trace pavel.orehov@gmail.com Microsoft C# .NET 2 5th Jan 2007 03:37 PM
Exception stack trace sometimes not showing line numbers TS Microsoft ASP .NET 4 18th Sep 2006 03:21 PM
Displaying Line Numbers in the stack trace BillGatesFan Microsoft ASP .NET 0 23rd Mar 2005 04:33 PM
Trace.Assert don't show line numbers from call stack ? Verane Microsoft C# .NET 2 12th Jan 2005 01:08 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:01 AM.