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.
Forums
Debugger support
6 posts
• Page 1 of 1
Re: Debugger support
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.
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
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
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.
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
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
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.
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
6 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 82 guests