Closed howprice closed 3 years ago
That's a valid request. I have been thinking already how something like this could be done. I think there are some good ideas in your request. I will have a look when I get some time. The problem is that I need to find a solution that will also work with other assemblers, at least to some extend.
Great. I'm afraid I am not familiar with any other assemblers or your codebase (or Typescript) so I can't appreciate the implementation details.
Here is a pre-release with the enhanced WATCH feature. You can test if you like. https://github.com/maziac/DeZog/releases/tag/v2.1.0 (Don't forget to update the CSpect DeZog plugin as well). If you migrate from DeZog 1.5 please read the Migration.md as well.
Hi. Thanks for the pre-release. I have installed the VSIX in Visual Studio Code 1.52.1 (Windows 10) and placed the new DLL next to CSpect exe (V2.13.00), but I do not see the same behaviour as the animations in the Watches section of the documentation when testing with my public repo https://github.com/howprice/specnext-invaders
Only a single element is visible:
Please let me know if you need any more information to debug this.
EDIT: In fact the original behaviour seems to be broken
Sorry. Here is the fix: https://github.com/maziac/DeZog/releases/tag/v2.1.1
Thanks. I've just had a quick play. It is working for the Invader and InvaderBullet struct, but the Player struct seems to be causing a problem:
Could you provide the zipped project or a down stripped version.
EDIT: NEX and lst/sld in the bin/ folder
This should do it: https://github.com/maziac/DeZog/releases/tag/v2.1.2
Thanks for beta testing :-)
No problem at all. I was seriously considering learning Typescript to implement this. Thanks very much for taking this on.
The latest release seems to handle all of my structs, so I'm very happy thank-you.
Please don't interpret this as feature creep, but should the values be editable in the Watch window or just viewable?
vscode does not allow editing of variables in the WATCH area. Also in other languages.
Just saw this: Thanks for the sponsorship !
vscode does not allow editing of variables in the WATCH area.
I wasn't aware of this! Quite a limitation.
Would it be possible to enhance the WATCH window to allow structured data to be conveniently visualised? The end result would be like viewing a struct or array of structures when debugging C in Visual Studio.
Currently for watches you can tell DeZog the number of elements to show and if it should show bytes, words or both. The format is:
label,size,types
with
It would be very helpful for debugging if
For example:
When assembled with sjasmplus this produces in the .lst file (or .lables file if sjasmplus --lstlab option used)
As a first pass, if the label 'invaders' watched, the user could specify invaders,55,8b which would display the memory in groupings of 8 bytes.
Better still, if the Watch window could access types from the lst, it would know the size of the Invader struct and the array size, so the user could enter invaders,INVADER_COUNT,Invader
Ideally, the Watch window would parse the list file to allow the individual element struct members to be shown with the name and type:
I appreciate that this might not be possible, but it would make a huge difference to the quality of the debugging experience.