I have a Visual Basic 4 32 bit application which results in a 

```
Run-time error '5':
Invalid procedure call

```

I start WinDbg and do

```
sxe *

```

to break on all exceptions. However, it displays the message without breaking into the debugger before.

If I break at the time of the message, the callstack is not very useful. Is there a trick to break-in on Visual Basic 4 applications at the time the problem occurs?

Problem FAQ:

* Can you run it in the IDE?  

Yes I can and I can probably fix the bug when I do that. However, I'd like to get some more information at the time the end user runs the application so that I don't need to be able to reproduce it.
* What do you want to do in case you find the cause of the error?  

Well, it depends on the type of the error. Maybe I can fix it, maybe I can't. Usually I get some very helpful information out of WinDbg.
* When does the error occur?  

It occurs reproducibly when the user presses a close button on a form.
* What does the application do?  

Oh, that's a good question. I don't exactly know. It uses RS232 communication but it's not yet involved.
* Do you know anything about the data the user can enter?  

I almost know nothing about it. In this particular case, it's not necessary to enter data.