Customizing the Source Window
The source window can be customized in a number of ways, most of them accessed via Edit => Preferences => Source
.

- Customizing Glyphs:
- Customizing Searching:
- Customizing Source Appearance:
- Customizing Source Scrolling:
- Customizing Source Lookup:
- Customizing File Filtering:
Customizing Glyphs
In the source text, the current execution position and breakpoints are indicated by symbols (Illegal HTML tag removed : glyphs). As an alternative, DDD can also indicate these positions using text characters. If you wish to disable glyphs, set Edit => Preferences => Source => Show Position and Breakpoints => as Text Characters
option. This also makes DDD run slightly faster, especially when scrolling.
This setting is tied to this resource:
displayGlyphs(class DisplayGlyphs) |
Resource |
|
If this is on , the current execution position and breakpoints are displayed as glyphs; otherwise, they are shown through characters in the text. The default is on . See Options, for the --glyphs and --no-glyphs options. |
|
You can further control glyphs using the following resources:
cacheGlyphImages(class CacheMachineCode) |
Resource |
|
Whether to cache (share) glyph images (on ) or not (off ). Caching glyph images requires less X resources, but has been reported to fail with OSF/Motif 2.1 on XFree86 servers. Default is off for OSF/Motif 2.1 or later on GNU/Linux machines, and on otherwise. |
|
glyphUpdateDelay(class GlyphUpdateDelay) |
Resource |
|
A delay (in ms) that says how much time to wait before updating glyphs while scrolling the source text. A small value results in glyphs being scrolled with the text, a large value disables glyphs while scrolling and makes scrolling faster. Default: 10 . |
|
maxGlyphs(class MaxGlyphs) |
Resource |
|
The maximum number of glyphs to be displayed (default: 10 ). Raising this value causes more glyphs to be allocated, possibly wasting resources that are never needed. |
|
Customizing Searching
Searching in the source text (see Textual Search) is controlled by these resources, changed via the Source
menu:
findCaseSensitive(class FindCaseSensitive) |
Resource |
|
If this is on (default), the Find commands are case-sensitive. Otherwise, occurrences are found regardless of case. |
|
findWordsOnly(class FindWordsOnly) |
Resource |
|
If this is on (default), the Find commands find complete words only. Otherwise, arbitrary occurrences are found. |
|
Customizing Source Appearance
You can have DDD show line numbers within the source window. Use Edit => Preferences => Source => Display Source Line Numbers
.
displayLineNumbers(class DisplayLineNumbers) |
Resource |
|
If this is on , lines in the source text are prefixed with their respective line number. The default is off . |
|
You can instruct DDD to indent the source code, leaving more room for breakpoints and execution glyphs. This is done using the Edit => Preferences => Source => Source indentation
slider. The default value is 0
for no indentation at all.
indentSource(class Indent) |
Resource |
|
The number of columns to indent the source code, such that there is enough place to display breakpoint locations. Default: 0 . |
|
By default, DDD uses a minimum indentation for script languages.
indentScript(class Indent) |
Resource |
|
The minimum indentation for script languages, such as Perl, Python, and Bash. Default: 4 . |
|
The maximum width of line numbers is controlled by this resource.
lineNumberWidth(class LineNumberWidth) |
Resource |
|
The number of columns to use for line numbers (if displaying line numbers is enabled). Line numbers wider than this value extend into the breakpoint space. Default: 4 . |
|
If your source code uses a tab width different from 8
(the default), you can set an alternate width using the Edit => Preferences => Source => Tab width
slider.
tabWidth(class TabWidth) |
Resource |
|
The tab width used in the source window (default: 8 ) |
|
These resources control when the source window is scrolled:
linesAboveCursor(class LinesAboveCursor) |
Resource |
|
The minimum number of lines to show before the current location. Default is 2 . |
|
linesBelowCursor(class LinesBelowCursor) |
Resource |
|
The minimum number of lines to show after the current location. Default is 3 . |
|
Customizing Source Lookup
Some DBX and XDB variants do not properly handle paths in source file specifications. If you want the inferior debugger to refer to source locations by source base names only, unset the Edit => Preferences => Source => Refer to Program Sources by full path name
option.
This is related to the following resource:
useSourcePath(class UseSourcePath) |
Resource |
|
If this is off (default), the inferior debugger refers to source code locations only by their base names. If this is on (default), DDD uses the full source code paths. |
|
By default, DDD caches source files in memory. This is convenient for remote debugging, since remote file access may be slow. If you want to reduce memory usage, unset the Edit => Preferences => Source => Cache source files
option.
This is related to the following resource:
cacheSourceFiles(class CacheSourceFiles) |
Resource |
|
Whether to cache source files (on , default) or not (off ). Caching source files requires more memory, but makes DDD run faster. |
|
Customizing File Filtering
You can control whether DDD should filter files to be opened.
filterFiles(class FilterFiles) |
Resource |
|
If this is on (default), DDD filters files when opening execution files, core dumps, or source files, such that the selection shows only suitable files. This requires that DDD opens each file, which may take time. If this is off , DDD always presents all available files. |
|