Automatic VBA Debugging

Automatic VBA Debugging

Anonymous
Not applicable
419 Views
1 Reply
Message 1 of 2

Automatic VBA Debugging

Anonymous
Not applicable
It used to be when my AutoCAD VB programs would crash my VBA editor would automatically open and it would allow me to debug at the point of the crash.

Now my AutoCAD command line just says execution error and even if my VBA editor is open it does not take me to the error or automatically debug. If I step through a program it will do it but not if I run it from AutoCAD.

What setting has changed? What do I need to fix? It is a big pain.

David
0 Likes
420 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable
In Tools>Options>General tab, select "Break on All Errors". This will always
break execution to the debug window. Normally, you would probably want
"Break on unhandled errors". However, it seems that you also have a problem
with an error handler not handling an error gracefully, e.g. using End
rather than Exit or popping an alert dialog to inform the user (in this
case, you) as to why the program crashed. You should only enable "Break on
all errors" when you are diagnosing a problem like this. When you find the
problem, create an error handler that properly handles it and then set your
options back to "Break on unhandled errors". Users don't like to be thrown
into code-mode. They don't understand it. Just give them something in plain
English.

--
----
Ed
----
0 Likes