Debugging in Visual Studio

This forum is meant for anything you would like to share with other visitors
User avatar
Phil Hepburn
Posts: 743
Joined: Sun Sep 11, 2016 2:16 pm

Debugging in Visual Studio

Post by Phil Hepburn »

Hi guys, one and all,

Just another little tip I picked up along the way, and use quite regularly.

When you do have a longer PRG file in the editor, and when you start to feel a bit overwhelmed, or even slightly confused - try just collapsing the while file with a Ctrl (M, L). Then you have a MUCH more manageable code stream to choose from - see below :-
VSexpandCollapse_01.jpg
VSexpandCollapse_01.jpg (100.39 KiB) Viewed 440 times
See line 1, 16, 21 .... they are the only iconned +/- lines as this is just a simple app I am currently working on.

Try it for yourselves.

Oh! and while you are at it also make sure you have the scroll bar setting adjusted as Nick mentioned earlier - the next image shows it in its full glory - it used to be an add-in called MetalScroll but now its part of VS.
VSexpandCollapse_02.jpg
VSexpandCollapse_02.jpg (39.99 KiB) Viewed 440 times
Unfortunately, the default seems to be not showing - maybe it was to NOT shock the VS guys who don't like change.

Mike Bertenshaw was the first guy to come along to the user group and tell us about it when it was a third party add-in.

The detail in the scroll is amazing - shows all changes made as well as much more - try it and see.

HTH,
Phil.
User avatar
Chris
Posts: 4898
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Debugging in Visual Studio

Post by Chris »

Hi Dick,

Oh, I am absolutely not experienced in VS, on the contrary I would say! But I've played around and I have seen this: Open 2 files, then in the Window menu, you will see an option "New Vertical (and Horizontal) Tab Group", click this and the 2 files will be put in 2 separate vertical groups, simultaneously visible, and you can open more files in each group, move files from on group to the other etc. Is this what you are looking for?

As Nick pointed out, you can also use Window->Float (or just use drag & drop) to make editor windows floating, so you can put them easily even in a second monitor etc. You really cannot compare I think the visual capabilities of .Net tools with the VO IDE...I completely agree that the VO IDE when it was introduced it was revolutionary and ahead of it's time, but unfortunately it remained practically unimproved for too many years, until a guy I know committed to making some good improvements to it :)

About the "see which entity I last edited" capability, as I said I agree, this one is much easier in VO, it's one of the strong advantages of the repository. For me it is certainly not a showstopper, because it was for me a very nice to have feature in VO, but wasn't using it very often (certainly not every day) to miss it that much. When I currently need some information like that, I compare my current code to previous versions that I have backed up. I have the tools to automate this process, so it's almost a non-issue to me, just takes me a few minutes to do this check, every once or twice a week when I need to do that.

Chris
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
ic2
Posts: 1858
Joined: Sun Feb 28, 2016 11:30 pm
Location: Holland

Debugging in Visual Studio

Post by ic2 »

For other readers: right mouse click on the toolbar, Scroll Bar Options bring you to the option screen. There click Use map for vertical scrollbar, Wide.

That having said, I absolutely don't see any advantage. It's very colourful, for sure, but even on a 4K monitor, it's unreadable what it shows so I'm wondering for who and when this can ever be useful.

About toggling Outline or collapsing code, I hardly use that either. Recently when I did so it caused a newly inserted method to overwrite part of the collapsed code, which I found out on compiling. I copied the new code to Textpad, pressed Undo a few times, "un"collapsed the method and tried it again. This time it worked.

As written, I consider this all half baked solutions, added because of problems a file based storage of (many) methods make handling difficult. In VO I just don't need this all.

But I agree with Chris that once you stop with VO you don't have a choice and there's of course quite a few better things (the Ctrl /Shift - being one of these). Admitted that ;)
Dick
User avatar
Chris
Posts: 4898
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Debugging in Visual Studio

Post by Chris »

Dick wrote: But I agree with Chris that once you stop with VO you don't have a choice
Hmm, that's not exactly how I put it :)

Chris
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
ic2
Posts: 1858
Joined: Sun Feb 28, 2016 11:30 pm
Location: Holland

Debugging in Visual Studio

Post by ic2 »

Hello Chris,

A vertical group helps to show the 2nd (called) method in the other window, sure. So why does it still not help enough? That is because I have to search the method manually in the 2nd window while in VO I open both methods and then these are the only methods I can see & edit.

Indeed all the opened and floating windows are much more flexible than in VO and sometimes it is very useful. It also means that windows are often gone or not where you expect them or want them. Then you have to start locating them. Some are in the View menu, others are in the Debug menu, etc.

Bottom line is that I consider the sortable entity list and editing per entity as the best features of the VO IDE and contrary to all of you apparently, I use this all day and every day. This will never be available in VS unless someone writes (or maybe has written?) a plugin doing the same. As Nick already said, he can't make me like VS (and I'd say he couldn't care less if I do or not :P ) but I will thank you all for all your efforts & time & these nice tips because especially the Debug solution where I started this thread with, and the Ctrl/ Shift - will definitely make me hate working in VS a little less.

Nevertheless, I am happy that I can return to VO coding now for a while.

Dick
ic2
Posts: 1858
Joined: Sun Feb 28, 2016 11:30 pm
Location: Holland

Debugging in Visual Studio

Post by ic2 »

Hello Chris

But I agree with Chris that once you stop with VO you don't have a choice
Hmm, that's not exactly how I put it


I mean - in that case I have to do without entity based editing anyhow...

Dick
User avatar
Chris
Posts: 4898
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Debugging in Visual Studio

Post by Chris »

Hi Dick,

OK, I think we are more or less in agreement then! Of course each one of us has different priorities and needs and certain features are more important than they are to others, so our opinions will certainly be different about the tools. But of course first we need to get to know the tools well, before judging them.

And to be honest, I realize that in my personal case, almost *everything* is working better now than what it did in VO for me, because I have the luxury now to be using mainly an IDE that works and feels *exactly* the way I want it to! You can't beat that :)

Chris
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
FFF
Posts: 1580
Joined: Fri Sep 25, 2015 4:52 pm
Location: Germany

Debugging in Visual Studio

Post by FFF »

Chris Pyrgas wrote:...because I have the luxury now to be using mainly an IDE that works and feels *exactly* the way I want it to! You can't beat that :)
I remember the time, when VO's editor got it's rework, and i in vain tried to persuade B. to try to integrate "your" child, (was it CulEdit?) instead. I still think there's no real reason why a db-based repo shouldn't be possible, wonder, what might have evolved of this combination...
Alas, spoilt milk ;)

Karl
Regards
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
User avatar
Chris
Posts: 4898
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Debugging in Visual Studio

Post by Chris »

Yeah, extremely spoilt milk I would say :)
Problem with a repo is that it's extremely difficult to manage it and keep it correctly up to date. The very very first version of CulEdit (15 years go?) did have a repo-like storage, but I soon realized this would take me nowhere, so quickly abandoned it (need to find that code and have a look how it looked like :)). And there are more challenges with more powerful compilers to consider, for example where should we put USING <namespace> statements, store them per entity? In a special entity in the module? VO didn't support namespaces, so that wasn't an issue.

I know, if you really want, you will find a solution, but managing all those complexities is a nightmare. I still remember Robert's and Don's posts in the VO dev ng, describing how a lot of things here hanging by a thread in the VO IDE and were very reluctant to touch some parts of it...Over the years they improved it a lot, but I am sure Robert still has some nightmares about fixing repo bugs :)

Chris
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
User avatar
robert
Posts: 4518
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

Debugging in Visual Studio

Post by robert »

Chris,
Chris Pyrgas wrote:but I am sure Robert still has some nightmares about fixing repo bugs :)
No not anymore.
Nowadays my nightmares are about form editors in Visual Studio <g>.
For the repository we had at least the source code.

Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
Post Reply