Forums

Debugger support

General discussion about Cobra. Releases and general news will also be posted here.
Feel free to ask questions or just say "Hello".

Debugger support

Postby paul_ray » Sun Jul 26, 2009 3:40 pm

I am interested in trying and learning Cobra.
I have been studying the examples and how-to's and reading the wiki and the source code.
I am using Windows XP with dotnet.

I have two questions.
I searched the forum and the wiki but I could not find any information on a debugger support.

Does the compiler only work with four spaces (or tabs)? I normally use two spaces for my indents.
paul_ray
 
Posts: 3

Re: Debugger support

Postby Charles » Sun Jul 26, 2009 7:09 pm

Hi Paul,

Welcome to the community!

Because Cobra produces .NET standard DLLs (even using C# as its back-end to do so), you should be able to run a debugger on your programs using Visual Studio (or .NET SDK), SharpDevelop, etc. There was a SharpDevelop syntax highlighting file posted (wiki:SharpDevelop), so that may be the best experience.

If you have problems (or even success), let us know.

I haven't traditionally used a debugger, but instead have used the following techniques in approximate order of frequency used:

-- strong typing (more often than not)
-- assertions
-- contracts
-- unit tests
-- trace statements
-- Object Explorer (see ObjectExplorer-WinForms.cobra and its doc string for ideas on how to use it)

I only need the Object Explorer once in a great while. But when I do, it's a life saver. It lets you browse through all your objects and their properties interactively.
Charles
 
Posts: 2515
Location: Los Angeles, CA

Re: Debugger support

Postby todd.a » Sun Jul 26, 2009 7:46 pm

I am also an advocate of 2 spaces. From experience with the compiler I believe you are required to use tabs, or multiples of 4 when using softtabs.
todd.a
Site Admin
 
Posts: 81
Location: Chicago, IL

Re: Debugger support

Postby Charles » Sun Jul 26, 2009 7:50 pm

Sorry, I forgot to address that question. Yes, it's 1 tab or 4 spaces per indent level. In addition to being an advocate of 4, I'm an even stronger advocate of it being uniform across the community.

Regarding why I chose 4, it fits well with many of Cobra's three letter keywords such as "def", "cue", "get", "set", "var" etc. Also, I perceived it as being not too little (2) and not too big (8). I realize that opinions on this vary, but as mentioned, I advocate having it consistent across code bases.

If you can live with tabs, you can set their display width to 2.
Charles
 
Posts: 2515
Location: Los Angeles, CA

Re: Debugger support

Postby todd.a » Mon Jul 27, 2009 6:25 am

It can't really be consistent if there is a choice between tabs and spaces. While with tabs users can set their tabstop and/or shiftwidth values to their pleasure it looks retarded online because they always look like 8 spaces (the definition of a tab).
todd.a
Site Admin
 
Posts: 81
Location: Chicago, IL

Re: Debugger support

Postby paul_ray » Mon Jul 27, 2009 7:03 am

Thanks.

The four spaces makes sense now that I see the reason: "Regarding why I chose 4, it fits well with many of Cobra's three letter keywords such as "def", "cue", "get", "set", "var" etc. ".

I agree there are many opinions about the tab, spaces but I agree it should be consistent. I am glad the compiler enforces this.
paul_ray
 
Posts: 3


Return to Discussion

Who is online

Users browsing this forum: No registered users and 44 guests