|
-
Dec 23rd, 2002, 06:49 AM
#1
Thread Starter
Addicted Member
Error Handlers
Using the usual On Error Goto Erhan type of thing how can I tell which line the error was in?
I am debugging a DLL for an ASP and I don't want to add load of lines of code logging each line number to a file.
thanks
Another light-hearted post from Guru 
-
Dec 23rd, 2002, 07:23 AM
#2
Hyperactive Member
You could try running the DLL on your machine, and calling it through a VB test harness. That allows you to step through the code in debug mode. you must call up the DLLs vbp project and run it, and then run your test harness in another instance of the VB IDE. You can put a breakpoint in your DLL code and step through it as if it were an .exe
Otherwise I don't think it can be done without adding debug code. However you could try this:
http://www.sysinternals.com/ntw2k/fr...ebugview.shtml
Whic allows you to view output from a dll (but you have to put it in the dll yourself).
After all "Rust Never Sleeps"
-
Dec 23rd, 2002, 11:14 AM
#3
You need to add line numbers in your code and then use the ERL statement in your error handler.
-
Dec 23rd, 2002, 07:57 PM
#4
Lively Member
There are a couple of freeware line numbering addins that are available out there, and when my stupid network decides to return from where ever the hell it's gone, I'll post some code to do it...
- gaffa
-
Dec 23rd, 2002, 08:06 PM
#5
You can get a really excellent add-in from MZ-Tools. It's free and it gives you the ability to add and remove line numbers and much, much more. I've written a few add-ins but this one far surpasses anything that I've ever done.
-
Dec 24th, 2002, 03:35 AM
#6
Thread Starter
Addicted Member
Thanks for the suggestions, I' thought about writing an addin to do the job but if one already exists then I'll give that a go.
goatsucker
Running in a test harness would be my usual technique but this one is hideously complicated!
Another light-hearted post from Guru 
-
Dec 24th, 2002, 06:12 AM
#7
Need-a-life Member
Originally posted by MartinLiss
You can get a really excellent add-in from MZ-Tools. It's free and it gives you the ability to add and remove line numbers and much, much more. I've written a few add-ins but this one far surpasses anything that I've ever done.
Thanks, Martin!! I've always wanted most of those features!!
Emiliano F. Martín
If a post has helped you then please Rate it! (and give the user points he/she deserves by clicking on the image).
Encourage the person who helped you to keep doing it, and give him the points he deserves.
MP3 Organizer: Freeware to logically organize all your MP3s.
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
|