VBA
Discuss AutoCAD ActiveX and VBA (Visual Basic for Applications) questions here.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Automatic VBA Debugging

1 REPLY 1
Reply
Message 1 of 2
dlinford
299 Views, 1 Reply

Automatic VBA Debugging

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
1 REPLY 1
Message 2 of 2
Anonymous
in reply to: dlinford

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
----

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost