The focus addition is great. It's making me feel like I'm back in the good ol' QBasic interpreter days! That, and I have a strange urge to watch the movie Back to the Future.
Pete
- "Run to this line" is a one shot deal. Is that correct. Once we hit that line the debugging is aborted? There is no way to set multiple Run TO's??
- I'm having difficulty displaying both the Variable/Array watch list with the running changes in values, and the IDE screen which identifies the line of code being acted upon at the same time. Are those two screens not supposed to be displayed at the same time no matter what the Screen _Newimage is set at??? In this case I set the Screen _Newimage (1200,800,32).I take it you mean the Watch List is covering some portion of your code you'd like to see. The Watch List dialog (not the one where you add variables, but the floating panel with values changing in real time) can be resized and moved around, please let me know if that's what you meant.
- In terms of display screens - in my mind there are 3 display screens which I use for debugging (actually only2 before $Debug came along with the Variable List), the IDE which carries all the lines of code, the Output Screen displaying the results of the coding activity and now the Variable/Array List. I believe there is no way to either display all 3 at once, or toggle between all 3 (say if the program run has been paused). Is that correct? The IDE and Variable/Array List SHOULD display at the same time? Sorry but I'm just not sure what can be visually displayed at once and if at least 2 can be displayed at the same time, how to do that.There's no extra window with the IDE, which is why the Watch panel is constrained by the IDE window. See the reply above.
P.S. Aren't you glad Fillippe you showed a banana coder (as opposed to a spaghetti coder) like me how to download $Debug? You will never know how much this aspect of QB64 will help with the price of bananas.Glad you're enjoying the experience ❤️
Might wanna check if your operating system has maybe assigned the function keys to multimedia control. If you have a "Fn" key, try using it with your function keys - beware those will only respond as long as the IDE has focus.
The ultimate in key hijacking. https://www.autohotkey.com/
You can make any key combination do strange to say stuff. And when you forget to suspend it, does even stranger stuff to qb64-debug version. I have F7 macro'ed to do something else.
I have used AHK, to do things within QB64 that are impossible to do only using QB64.
Saves you lots of trouble.
Ctrl+C when the variable list is focused 😉
I'm doing ok, thank you for your concern. Now stop picturing me in my underwear 😂
Do you have a recommended or optimal Width and Height which you use?You'll really have to experiment with it, since our screens will vary. I, for example, have a second screen.
Also, it appears there is no "Run To" option which would have your program run to a particular line and then pause.
Or by holding down the mouse button on "Step Into" that you run through the code just to see the changes in the watch list values a little faster than one click at a time.
Also, at the end of the program run and the we get the message "Debug session aborted" "Discontinued", is there a way to see the final values of the array in the Watch List?
I cannot get the Watch List to continuous display and show the array values in Real Time.
I don't think I understand the request.
I guess you just can't give a kid a toy train and not expect him to fly it like an airplane.
Both lines are empty, good friend. Set breakpoints to lines with actual code.
Is there a way to have the Watch List open first on top of the IDE screen?
What’s the hotkey to add $DEBUG into the code?
You may also have clicked the line numbers, which is used to set a breakpoint (or to skip a line, if in conjunction with Shift). - That's also what Richard means to say happens in his screen shot above.
Although many will "frown" upon it - for convenience with massive re-editing of a particular program I am currently working on - I will have set up different colored backgrounds (say red instead of black) to remind me which instance "not to edit" of the exact same file (Rather than using say notebook for the "reference copy" or rather than using a number of Alt ^ bookmarks etc).
@FellippeHeitor dev d651f37 Win 10 x64 Pro 21H1 (aug update)
Not a problem - just a bit confused on how $DEBUG interacts when main module has
ON ERROR GOTO ErrHandler:
.....
Errhandler:
....
RESUME NEXT
RETURN
In my program which often comes up with a particular error, my RESUME NEXT allows the program to carry on normally (and $DEBUG status ... "Error occurred on line 351") but from then on I do not seem to be able to then use F4 to watch values.
Is it "dangerous" to rely on $DEBUG (watch values etc) in this situation (meanwhile my program is still carrying on OK 99.9% of the time)?
Not a problem - rather some advice please.
Previous code that failed to compile now compiles with the new dev builds, that really is excellent, thank you Spriggsy and Fellippe.
For testing I used a program that is difficult to debug, it has a new window process and uses subclassing.
I had a few teething problems with the debugger mainly setting inappropriate break points and incorrect use of menu options.
That said I was surprised how stable QB64 debug is. It really is turning into an indispensable tool keep up the great work.
In my program which often comes up with a particular error, my RESUME NEXT allows the program to carry on normally (and $DEBUG status ... "Error occurred on line 351") but from then on I do not seem to be able to then use F4 to watch values.
Feature request (user option) - "On watchpoint being reached - an audio response (e.g. cash register "cha-ching") being played. In my case the longer running QB64 programs are "buried" under other applications and it may take me a while before I remember to check up on the QB64 program(s).
So far so good. Even working well with indices in my testing so far.
Can't express how freakin' awesome this is. Only wish I had all these capabilities 12,000 lines of code ago. I would probably still have hair as a result :-)
The variable array comes up as a~`1( ) instead of a~`( )
It appears only the first index a~`(0) is updated and is incorrect (displays it seems the number of times I press F7)
The array is not initialized - though not a problem (... never assume...)
@FellippeHeitor
dev v2.0 049499c Win 10 x64 Pro 21H1 (Aug updated)
Now the watch values in my Xsep.bas are as expected - MANY THANKS.
The following code fails on the new development builds:Code: QB64: [Select]_WindowHandle returns a 0 and not a handle as expected.
The following code fails on the dev builds however works fine on stable builds (1.5 x32 x64 3043116) note added a test line:
Thanks! I'm really having <gasp> FUN with my amateur coding right now.