Re-inventing Debug
#11
(09-25-2022, 03:24 PM)RhoSigma Wrote:
(09-25-2022, 02:05 PM)bplus Wrote: Oh look what happens when I start a $debug session!


It is curious why the public option (the more dangerous) is the default.

What's default is not dependent on QB64, but by the system or maybe what kind of network you're currently connected to, no clue TBH. At least I always get the "Privat Network" ticked by default.

What concerns me the most here, with the first time use of Debugger is that I am pretty sure I never gave Admin permission to use it. I did check the private box, saw the public box stay on, clicked that off but I am pretty sure I never gave Admin permission to run, I think I just top right X'ed out of the Dialog (not clicking Cancel either). Yet, the 2nd time I type $debug in IDE code window there is no Firewall Protection notice. It just starts working.


(09-25-2022, 03:38 PM)RhoSigma Wrote: And for those, who don't need a full fledged debugger, but just need to check for certain conditions here and there, we also have the $ASSERTS metacommand and the respective _ASSERT command.

Ahh! That's what that is. Thank you, I must of missed class that day! Thumbs up for that extra info!
b = b + ...
Reply
#12
Maybe that can also help one or the other. 
It's a bit older and written for QB64, but maybe it'll still work under QB64PE ? Huh


vWATCH64 v1.104

Fellippe Heitor / vWATCH64
Reply
#13
(09-25-2022, 04:29 PM)Steffan-68 Wrote: Maybe that can also help one or the other. 
It's a bit older and written for QB64, but maybe it'll still work under QB64PE ? Huh


vWATCH64 v1.104

Fellippe Heitor / vWATCH64

vWatch is the predecessor, Fellippe later build its functionality into QB64 directly and did improve the handling, which in fact is the $DEBUG feature we have today.
Reply
#14
My $0.02. Be glad we don't have to use "GDB", as in starting it in a terminal to watch any variables or to step through code. Try using Freebasic before it "hit version 1" which was cool only because within "GDB" it was able to display BASIC program code while stepping through it. But that was all. I didn't want to use that program at all. There was an impressive effort by somebody, which was a debugger for Freebasic programs but it was clunky to me, the GUI had too many elements that couldn't be hidden temporarily, but it allowed watching variables and setting breakpoints. Another program was a front end to "GDB", but it was probably the same one I described previously.

I would have used something like Power C Trace which I had to purchase along with Multi-C library and with the license for Power C (including C-library source code) by Mix Software. Although it was taxing sometimes to use Power C Trace: sometimes the user's program ended and therefore had to fire up that debugger again with the user program. Also got tired easily trying to check out something in a function and needing to step through its four or five lines of code about a hundred times...

QB64-created programs could fight with each other to get the focus, especially on Windows. It was that way during v0.98 but I'm not sure if it behaved like that with SDL version. It's a side-effect of "_AUTODISPLAY" mechanism.
Reply
#15
(09-25-2022, 03:46 PM)bplus Wrote: What concerns me the most here, with the first time use of Debugger is that I am pretty sure I never gave Admin permission to use it. I did check the private box, saw the public box stay on, clicked that off but I am pretty sure I never gave Admin permission to run, I think I just top right X'ed out of the Dialog (not clicking Cancel either). Yet, the 2nd time I type $debug in IDE code window there is no Firewall Protection notice. It just starts working.
Curiously, in the visual examples you provided you never even saved your code to disk! This "$DEBUG" and programming system is indeed brilliant, able to work on a source code file that might never exist... I am missing something here. QB64PE must compile something into RAM.
Reply
#16
Untitled programs from IDE are compiled into QB64pe.exe folder under "Untitled.bas", so if you think you lost one by failing to save it, look there.

Update: hmm... the "Untitled.bas" is not there! ??? maybe a little bug using $Debug, the "Untitled.exe" is there.

Update: OK "Untitled.bas" only gets saved if you save it, but the exe gets saved automatically. First time I saw the exe without the bas!
b = b + ...
Reply
#17
This is how it has been for as long as I can remember. You don't have to save BAS code to run a program and it doesn't save automatically when you press F5. It just compiles to "Untitled.exe". And the DEBUG stuff is no different. It's just attaching the IDE to the process through TCP/IP.
Ask me about Windows API and maybe some Linux stuff
Reply
#18
Good old Debug.

Back in the before times when I was trying to install OS/2 the distribution assumed drive A was a 3.5 in floppy and wouldn't let you reassign to drive B using any standard tricks.  I called IBM and they FAXED me a DEBUG listing so I could edit the OS/2 installer. 

It's a strange tale of another age when I called IBM with a software problem, talked to a human who was able to find a solution quickly and got a piece of code via a FAX.
Reply




Users browsing this thread: 2 Guest(s)