Macaulay2 » Documentation
Packages » Macaulay2Doc » The Macaulay2 language » debugging » loadDepth
next | previous | forward | backward | up | index | toc

# loadDepth -- the load depth

## Description

loadDepth = i -- sets the load depth to i, which should be a small integer, returning the old value.

During the backtrace after an error message, a position in interpreted code is displayed only if the load depth at the time the code was parsed is at least as large as the error depth is now. The load depth is set to 0 initially, is set to 1 when the files of the Core package are being loaded, is set to 2 while loading a package with the debuggingMode option set to false, and is set to 3 while loading a package with the debuggingMode option set to true and for user input.

The value of loadDepth active when code is parsed is referred to later when error messages are being handled: see errorDepth, and it is also displayed, in parentheses, when the error message is printed.

## Caveat

The user should not attempt to adjust the value of loadDepth.

## For the programmer

The object loadDepth is an integer.

The source of this document is in /build/macaulay2-88fgJW/macaulay2-1.25.11+ds/M2/Macaulay2/packages/Macaulay2Doc/ov_debugging.m2:518:0.