| 1 | 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. |
| 2 | |
| 3 | However, check [wiki:IDESupport] first to see if your chosen IDE has a Cobra add-in as using the IDE will be that much more enjoyable. |
| 4 | |
| 5 | '''Important:''' Be sure to compile your code with the "-d" switch in order to produce debugging symbols. |
| 6 | |
| 7 | 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. |
| 8 | |
| 9 | You should be able to step through code, inspect variable and objects, set breakpoints, etc. |
| 10 | |
| 11 | See also: DebuggingTopics, [wiki:IDESupport] |