Microsoft KB Archive/229752

= BUG: IDE Uses All Resources When Breakpoint is Hit in Debug Mode =

Article ID: 229752

Article Last Modified on 5/13/2003

-

APPLIES TO


 * Microsoft Visual Basic 6.0 Learning Edition
 * Microsoft Visual Basic 6.0 Professional Edition
 * Microsoft Visual Basic 6.0 Enterprise Edition

-



This article was previously published under Q229752



SYMPTOMS
When you use two instances of the Visual Basic 6.0 IDE to debug your client server applications with one running the client and the other running the server, you might see behavior under Windows 95, Windows 98, or Windows Me where the amount of free system resources diminishes until locking the machine. This behavior can happen when you reach a breakpoint in the instance running the server.



RESOLUTION
The recommended workaround is to debug client and server separately. Compile the client and debug the server in the IDE. Once you have the server reasonably debugged, compile it and debug the client in the IDE.



STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.



Steps to Reproduce Behavior
 Start a new ActiveX EXE project. Class1 is created by default. From the Projects menu, choose Properties and name this LeakMemory.  Add this method to Class1: Public Function GetLong as Long GetLong = 5 End Function  From the File menu, save the project. Place the cursor on the GetLong = 5 line and press the F9 key to set a breakpoint. Run the project.</li> Open a new instance of Visual Basic 6.0.</li> Start a new Standard EXE project. Form1 is created by default.</li> From the Project menu, choose References, check the running server (LeakMemory), and click OK.</li>  Place a CommandButton on the form and, in the Click event, place the following code: Dim MyObj as New LeakMemory.Class1 Dim k as long K=MyObj.GetLong </li> Run the project and click the button. You should reach the breakpoint in the server.</li> On the Visual Basic instance running the server, select About from the Help menu, and click the SystemInfo button.</li> From the View menu, select the Refresh option several times, at 20- or 30-second intervals, and you should see the available memory decreasing every time you refresh the window. This continues until the machine locks up.</li> If you press the F5 key for Visual Basic to continue past the breakpoint, the resources are released.</li></ol>

Keywords: kbbug kbresource kbideproject KB229752

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.