Difference between revisions of "Development tools"
(draft) |
(No difference)
|
Revision as of 15:17, 8 May 2015
Contents
Debugging
Built-in
Language features
The D programming language has built-in support for a number of debugging features:
- Asserts, invariants, and contract programming (enabled by default, disabled by the -release compiler switch)
- Array bounds checking (enabled by default, disabled by the -release or -boundscheck=off compiler switches)
- Unit tests (enabled by the -unittest compiler switch.
Coverage analysis
The D compiler can generate code coverage reports, enabled by the -cov compiler switch. See the Code Coverage page for more information.
Third-party
See the Debuggers page for a list of third-party debuggers.
Profiling
Built-in
CPU profiling
The D compiler can instrument generated code to measure per-function profiling information, and save a report on program exit. This is enabled by the -profile compiler switch.
Heap profiling
Starting with DMD 2.068, the D compiler can instrument memory allocations, and save a report on program exit. This is enabled by the -profile=gc compiler switch.
Integration
Demangling
To demangle D symbols emitted by third-party programs, pipe the output through the ddemangle tool. The tool will recognize D symbols in its input, and replace them with the demangled versions, while outputting all other input intact.
D language development
These tools may be helpful when working on D itself: