Ctrl-Break?

In VB6/VBA you can hit Ctrl-Break when a message box is displayed and the code drops into debug. How do you do the same thing in VB2005

That is, if I have a mesage box displayed how do I quickly get to the place in the code that called MsgBox


Answer this question

Ctrl-Break?

  • Lynda Webeler

    Ctrl Break is the correct Hot Key if you have the VB Profile applied.  However, if you have the MsgBox in a Console Application, Ctrl Break will actually work as Stop Debugging.  This is because of an issue with the way the Hosting Process is processing this keystroke combination.

    It it definitely going to be revisited for a fix in the next version of Visual Studio

    For now, you can use Debug.Pause as noted in a previous post

    thanks

  • InKi Park

    Should be exactly the same, albeit the actual hot key may not be the same. Debug -> Pause should drop you there either immediately or right after you click a dialog button. You can change key bindings by going to Tools -> Options -> Environment -> Keboard ->  Debug.BreakAll

  • Ctrl-Break?