Wiki
Version 2 (modified by Chuck, 14 years ago)

--

Cobra produces standard CommonLanguageRuntime libraries and executables (also called "assemblies"). In other words, Cobra does not introduce its own "class model" on top of what the virtual machine already provides. Therefore, standard debugging tools (as well as other tools like profilers) will work on what Cobra produces even if they are not "Cobra-savvy" with things like SyntaxHighlighting and AutoCompletion.

However, check IDESupport first to see if your chosen IDE has a Cobra add-in as using the IDE will be that much more enjoyable.

Important: Be sure to compile your code with the "-d" switch in order to produce debugging symbols.

Then instruct your IDE to load the executable and run it in debug mode. If your bug is exhibited by an uncaught exception then the interactive debugger will be engaged when it occurs. If your bug does not throw an exception, you can force it do so by adding assert statements, throw statements, contracts and/or unit tests.

You should be able to step through code, inspect variable and objects, set breakpoints, etc.

There is a discussion forums post on  debugging with Visual Studio.

See also: DebuggingTopics, IDESupport