|
-
July 9th, 2008, 12:19 PM
#1
Error Line Numbers
Is there an easy way to display the Line Number of where an error occurred? I'm debugging an application, but I can't run the app in the environment. I build the dll and use the dll in another application. I'm trying to figure out where the error is occurring in the dll without being able to set breakpoints and stepping through the code.
I have tried using CurrentStack.GetFrame(0).GetFileLineNumber, but it always returns a 0.
Any help would be greatly appreciated.
I'd rather be wakeboarding...
-
July 9th, 2008, 12:29 PM
#2
Re: Error Line Numbers
Try this. Open your app, not the .DLL, then select "FILE", "ADD", "EXISTING PROJECT". Go find your .DLL project and select it to add it to a solution.
Change the reference in your app to reference the Project instead of the .DLL There is a tab for projects when go to add a reference.
From that point on, you can debug both the APP and the .DLL.
Hope this helps.
-
July 9th, 2008, 01:06 PM
#3
Re: Error Line Numbers
 Originally Posted by sotoasty
Try this. Open your app, not the .DLL, then select "FILE", "ADD", "EXISTING PROJECT". Go find your .DLL project and select it to add it to a solution.
Change the reference in your app to reference the Project instead of the .DLL There is a tab for projects when go to add a reference.
From that point on, you can debug both the APP and the .DLL.
Hope this helps.
The dll project that I need is in a solution with many other projects and I can't bring in just the one I need without getting the rest. Then there's issues with services and such that I don't understand. I have to work with it the way I explained in my first post.
Do you know how I can display line numbers in my error messages?
I'd rather be wakeboarding...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|