Author Topic: $Debug Feature Suggestion  (Read 3643 times)

0 Members and 1 Guest are viewing this topic.

Offline hanness

  • Forum Regular
  • Posts: 210
    • View Profile
$Debug Feature Suggestion
« 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?

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
Re: $Debug Feature Suggestion
« Reply #1 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
Want to learn how to write code on cave walls? https://www.tapatalk.com/groups/qbasic/qbasic-f1/

Offline RhoSigma

  • QB64 Developer
  • Forum Resident
  • Posts: 565
    • View Profile
Re: $Debug Feature Suggestion
« Reply #2 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.
My Projects:   https://qb64forum.alephc.xyz/index.php?topic=809
GuiTools - A graphic UI framework (can do multiple UI forms/windows in one program)
Libraries - ImageProcess, StringBuffers (virt. files), MD5/SHA2-Hash, LZW etc.
Bonus - Blankers, QB64/Notepad++ setup pack

Offline Richard

  • Seasoned Forum Regular
  • Posts: 364
    • View Profile
Re: $Debug Feature Suggestion
« Reply #3 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.

FellippeHeitor

  • Guest
Re: $Debug Feature Suggestion
« Reply #4 on: October 02, 2021, 03:42:00 am »
  [ You are not allowed to view this attachment ]

Offline Richard

  • Seasoned Forum Regular
  • Posts: 364
    • View Profile
Re: $Debug Feature Suggestion
« Reply #5 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.

FellippeHeitor

  • Guest
Re: $Debug Feature Suggestion
« Reply #6 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.

Offline SpriggsySpriggs

  • Forum Resident
  • Posts: 1145
  • Larger than life
    • View Profile
    • GitHub
Re: $Debug Feature Suggestion
« Reply #7 on: October 02, 2021, 11:17:11 am »
Why are you needing to watch 100+ variables
Shuwatch!

FellippeHeitor

  • Guest
Re: $Debug Feature Suggestion
« Reply #8 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.