Solved

Visual basic debug vs release

Posted on 2004-09-02
12
219 Views
Last Modified: 2013-11-25
My program gets different results in debug and release mode
when i debug and run an application the results are correct but after creating an exe of the application the results are wrong  
0
Comment
Question by:shwetaabhishek
  • 5
  • 2
  • 2
  • +2
12 Comments
 
LVL 7

Expert Comment

by:_agj_
Comment Utility
possibly some timing issues which requires a couple of DoEvents?

as in, possibly some part of the execution requires to wait for some time...
0
 
LVL 8

Expert Comment

by:mladenovicz
Comment Utility
Can you post code that gives different results?
0
 

Author Comment

by:shwetaabhishek
Comment Utility
no i cannot post the code is is confidential
0
 

Author Comment

by:shwetaabhishek
Comment Utility
i will explain the scenario :
1, i have winsock application , using senddata and recvdata i am getting and sending few values .. when i am doing it in debug mode the result is correct , but when i am making the exe of application then the senddata  is getting correct value but the recvdata is not
0
 
LVL 76

Expert Comment

by:GrahamSkan
Comment Utility
You will have to write a log file to see where the errors arise. You can use App.Logevent..
0
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 

Author Comment

by:shwetaabhishek
Comment Utility
The error is traced " runtime error : subscript out of range "
0
 
LVL 76

Expert Comment

by:GrahamSkan
Comment Utility
I posted before your last comment, shwetaabhishek. My comment was not directed at your particular scenario.
0
 
LVL 8

Expert Comment

by:mladenovicz
Comment Utility
when you working with arrays try sthg like this

For i= LBound(myArray) To  UBound(myArray)
.....
Next

You can log this values to file to check what's wrong (LBound(myArray) and  UBound(myArray))
0
 

Author Comment

by:shwetaabhishek
Comment Utility
i am not working with array
sendata and recvdata are strings and getting differnt values in debug and after creating exe of application ?cant i create an exe in debug mode itself so that the things are preserved
0
 
LVL 5

Accepted Solution

by:
brianb99999 earned 125 total points
Comment Utility
cant i create an exe in debug mode itself so that the things are preserved
No.

runtime error : subscript out of range
What line of code does this occur on?

Most of the time these sorts of errors are timing errors.
Track down the line the error occurs on (using the log idea suggested above) and try adding a doevents just before the line of code that the error occurs on.

Brian.
0
 

Author Comment

by:shwetaabhishek
Comment Utility
please close this question
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Windows Script Host (WSH) has been part of Windows since Windows NT4. Windows Script Host provides architecture for building dynamic scripts that consist of a core object model, scripting hosts, and scripting engines. The key components of Window…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now