?
Solved

Visual basic debug vs release

Posted on 2004-09-02
12
Medium Priority
?
231 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
11 Comments
 
LVL 7

Expert Comment

by:_agj_
ID: 11963294
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
ID: 11963321
Can you post code that gives different results?
0
 

Author Comment

by:shwetaabhishek
ID: 11963331
no i cannot post the code is is confidential
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Author Comment

by:shwetaabhishek
ID: 11963352
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
ID: 11963406
You will have to write a log file to see where the errors arise. You can use App.Logevent..
0
 

Author Comment

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

Expert Comment

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

Expert Comment

by:mladenovicz
ID: 11963476
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
ID: 11963508
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 375 total points
ID: 11969013
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
ID: 12601167
please close this question
0

Featured Post

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you haven’t already, I encourage you to read the first article (http://www.experts-exchange.com/articles/18680/An-Introduction-to-R-Programming-and-R-Studio.html) in my series to gain a basic foundation of R and R Studio.  You will also find the …
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
Suggested Courses
Course of the Month16 days, 3 hours left to enroll

850 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