Home > @magiclane/maps-sdk > Debug
Debug class
Provides debugging utilities for memory monitoring, logging, and SDK configuration.
The Debug class offers static methods for monitoring memory usage, controlling log output, configuring routing and navigation behavior, and retrieving SDK diagnostics. Key features include:
- Memory monitoring: Track used, free, and maximum memory consumption - Logging system: Send logs to Magic Lane servers for crash analysis - Debug flags: Control console output for object creation and method calls - Routing/Navigation modifiers: Alter algorithm behavior for testing - Storage information: Monitor mount points and disk space
Settings
Signature:
export declare abstract class Debug Properties
|
Property |
Modifiers |
Type |
Description |
|---|---|---|---|
|
|
any[] |
Get app I/O information including mount points and disk usage. | |
|
|
number |
Returns the free system memory including swap and kernel cache. | |
|
|
boolean |
Check if the current thread is the main thread. | |
|
|
boolean |
If enabled checks if an object is alive before calling a method on it. Used for debugging purposes. | |
|
|
boolean |
If enabled prints method object calls JSONs to the console. Used for debugging purposes. | |
|
|
boolean |
If enabled prints create object calls JSONs to the console. Used for debugging purposes. | |
|
|
boolean |
If enabled prints listener messages JSONs to the console. Used for debugging purposes. | |
|
|
number |
Retrieve the maximum zoom ranges allowed on a MapView. | |
|
|
number |
Returns the maximum memory used by the SDK engine since initialization. Useful for profiling and identifying peak memory consumption during testing. | |
|
|
Set<NavigationModifiers> |
Retrieve the current navigation location modifiers. | |
|
|
boolean |
Check if raw position tracker is enabled. | |
|
|
Promise<string> |
Retrieves the file path to the SDK crash report log. The log file contains detailed information about SDK operations and is automatically sent to Magic Lane servers in case of crashes. Custom entries can be added using log, and verbosity is controlled via setSdkDumpLevel. | |
|
|
number[] |
Retrieve a list of service IDs used within the application. | |
|
|
number |
Get the remaining time in seconds until the next check for a better route. | |
|
|
number |
Get the remaining time in seconds until the next check for traffic conditions along all routes. | |
|
|
number |
Returns the total system memory available to the device. | |
|
|
number |
Returns the memory currently used by the SDK engine. Useful for monitoring memory consumption and detecting potential memory leaks during development. |
Methods
|
Method |
Modifiers |
Description |
|---|---|---|
|
|
Initiate a check for a better route. | |
|
|
Initiate a check for traffic conditions along all routes. | |
|
|
Retrieve the name of a service given its ID. | |
|
log({ level, message, module, functionName, fileName, lineNumber, }, input) |
|
Writes a log message to the SDK logging system for crash analysis. Logs are automatically written to a file and sent to Magic Lane servers in case of crashes. Use setSdkDumpLevel to control the verbosity of logs included in crash reports. |
|
|
Set modifiers for navigation locations. | |
|
|
Sets the verbosity level for crash report logs sent to Magic Lane. On Android, all GemDumpSdkLevel values are supported. On iOS, only silent and verbose are supported—any other value defaults to verbose. |