QB64.org Forum

Active Forums => QB64 Discussion => Topic started by: hanness on September 30, 2021, 11:51:12 pm

Title: $Debug Feature Suggestion
Post by: hanness on September 30, 2021, 11:51:12 pm
If there is one thing that I learned from repeated test compiles and debug sessions tonight, it's that it is tedious as heck putting the watch variables over and over again each time I make a change to the code. Don't get me wrong, it's well worth the effort, but how about this...

How about once I enter all the variables to watch, having a way to export those to a file. Then, the next time I run the program, I could import that same list. I can then add to or remove from that list of variables to watch, but I have a starting point so that I don't need to manually select every variable over and over and over.

Is that something that would be doable, eventually?
Title: Re: $Debug Feature Suggestion
Post by: Pete on October 01, 2021, 12:03:23 am
That's a good idea. I would think a quick and simple start would be to use a copy/paste of the variables to an ini file. QB64 looks for the file, and if it is present, imports the variable list. Quick and dirty, just like... oops, the wife just walked in. We'll have to discuss the rest of this later....

Pete
Title: Re: $Debug Feature Suggestion
Post by: RhoSigma on October 01, 2021, 02:21:53 am
Way to complicated, best would be to simply keep the list internally between runs and only flush it on user request or when another program is loaded into the IDE.
Title: Re: $Debug Feature Suggestion
Post by: Richard on October 01, 2021, 05:24:08 am
@hanness

If it is the exact same program (with re-edits) every time - what I do is simply arrange that at the beginning of the main module, to list first the variables you always want to watch (may need to dim shared...). Apparently the $DEBUG IDE in the watch window selection panel lists the variables that you choose from in the order at which they first occur in the program.

Although it is still a manual selecting watch variables process - at least then the variables of interest to you at all together (at the beginning of the list).

I do support you suggestion though.
Title: Re: $Debug Feature Suggestion
Post by: FellippeHeitor on October 02, 2021, 03:42:00 am
  [ This attachment cannot be displayed inline in 'Print Page' view ]
Title: Re: $Debug Feature Suggestion
Post by: Richard on October 02, 2021, 09:03:34 am
@FellippeHeitor

v2.0 48e8f38  win 10 x64 Pro 21H1 (Aug updated)


Is it possible to arrange that a watch list variable is added via selection from the $DEBUG code view (IDE)?

So for example, when a breakpoint has been reached, if wanted to view variable x&&, while in the IDE code view simply point the mouse cursor to the x&& variable and click (or something) to add this variable to the watch list.

This would be handy if have a large number of variables and it is a pain to scroll through say a hundred variables in the watch list selection window.
Title: Re: $Debug Feature Suggestion
Post by: FellippeHeitor on October 02, 2021, 09:21:20 am
Just when I think I’ve made you happy 😔

This would be handy if have a large number of variables and it is a pain to scroll through say a hundred variables in the watch list selection window.

Use the filters in the watch dialog.
Title: Re: $Debug Feature Suggestion
Post by: SpriggsySpriggs on October 02, 2021, 11:17:11 am
Why are you needing to watch 100+ variables
Title: Re: $Debug Feature Suggestion
Post by: FellippeHeitor on October 02, 2021, 11:56:15 am
I understand he has hundreds of variables and will have to search through them to find which ones he's interested in monitoring, and for that the filtering abilities will sure do.