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
Printable View
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
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).
You need to add line numbers in your code and then use the ERL statement in your error handler.
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
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 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!
Thanks, Martin!! I've always wanted most of those features!!Quote:
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.