Wish VB Immediate Window

qsrtech

Active Member
Licensed User
Longtime User
Now with the rapid debugger it would be nice to have a VB Immediate like window to process commands "live".

On a side note, I predict that VB's rapid debugging was a main reason it beat out Delphi, even though Delphi was/is a significantly stronger development platform. And while Delphi does allow updating variables on the fly, if you need to modify any code you'd have to restart for it to take effect, where VB you could add/change pretty much any line of code and continue execution and even move the execution point! I know VB is interpreted and Delphi is native. Borland should have made an "interpreted" debugger that could have allowed code changes on the fly. They should also have built a "VB" wrapper unit that basically would have wrapped the VB language therefore VBer's wouldn't necessarily have to learn the pascal language to get hooked on Delphi.
 
Last edited:

Computersmith64

Well-Known Member
Licensed User
Longtime User
+1 - I still sometimes inadvertently start looking for the immediate window when I'm debugging my B4A apps (which is a lot of the time!).
 

sorex

Expert
Licensed User
Longtime User
wasn't the immediate window just the log window showing the debug.print info?

we have this already.
 

JakeBullet70

Well-Known Member
Licensed User
Longtime User
+1
No, the immediate allowed you to type in vars and get values or even assign new values to vars.
 

Computersmith64

Well-Known Member
Licensed User
Longtime User
Yeah - you could do stuff like type "? [var]" & get the value returned.
 

sorex

Expert
Licensed User
Longtime User
oh, never knew this. I only use it as debug.print output and when debugging I just hover a variable to see it's value (or add a watch)

should try it out, thanks for the hint! :)
 

Shadow&Max

Active Member
Licensed User
Longtime User
The new debugger's a bit better with the watches, but we need this. The immediate window was a HUGE help in debugging. The ability to change variables on the fly, or even stop execution on a watch breakpoint were invaluable in VB...

+1
 

EddyW

Member
Licensed User
Longtime User
What i often did in VB6 was set a breakpoint .

Check the value at breakpoint and if it was the wrong value set it in Immediate to the value i want.
Then drag cursor from the breakpoint few lines earlier to active the code above the breakpoint.

Would like if i could do this in B4A also (so well Immediate Window als drag the cursor few lines back)
 

ivan.tellez

Active Member
Licensed User
Longtime User
+1

This feature really SPEDDS UP the debuging. What I do Now:


B4X:
Sub SomeSub(SomeVar as Int)
SomeVar = 5  'BreakPoint Here, change the value and press Ctrl + S (time consuming)
'Lines of code depending on the value of SomeVar
End sub

But having a VB Immediate like window to process commands "live" it will be faster and easier just to type "SomeVar = 6" to update the value of the var witout having to hit Ctrl + S and restar all the sub
 

Sgardy

Member
Licensed User
Longtime User
I agree! Usefull for testing complex formulas or the resuts of unknown functions!
 

Troberg

Well-Known Member
Licensed User
Longtime User
+1

The best feature of the immediate window was rapid debugging of simple functions. For example, if you made a sub that returns the extension of a file, you could easily test it by typing in the immediate window:

<code>
?GetExt("c:\dir\dir\file.ext")
.ext
?GetExt("c:\dir\dir\file")

?GetExt("c:\dir\dir\file.ext.ext2")
.ext2
?GetExt("file.ext")
.ext
?GetExt("c:\dir\complicated.dir\file")
.dir\file
</code>

Neat, eh? See how easy it was to spot the error in the last test case, something that would probably have been missed if the code was tested during normal program execution.

That way, you could quickly run a few test cases, without starting the entire program and writing code to test them.
 
Top