Skip to content

Commit 1ffcdba

Browse files
committed
Document optional debugger version
Clarify that browser debugger version is optional, but when provided it should match the immutable deployed build identifier used for browser build lookup and sourcemap resolution. This keeps the SDK contract aligned with graceful degradation when no version is configured.
1 parent 402cef9 commit 1ffcdba

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

packages/debugger/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,14 @@ datadogDebugger.init({
1717
site: '<DATADOG_SITE>',
1818
service: 'my-web-application',
1919
// env: 'production',
20-
// version: '1.0.0',
20+
// version: 'my-deployed-build-version',
2121
})
2222
```
2323

2424
When you also use the Datadog Live Debugger build plugin, `init().version` defaults to the build-time `liveDebugger.version` metadata injected into the bundle. If you pass both values explicitly and they differ, the SDK keeps the `init()` value and logs a warning.
2525

26+
If provided, `version` should be set to the immutable deployed browser build identifier used for source map upload and browser build resolution. If omitted, debugger delivery and snapshots still work, but browser build lookup and source-aware resolution may be unavailable.
27+
2628
If [Datadog RUM][3] is also initialized on the page, debugger snapshots automatically include RUM context (session, view, user action) without any additional configuration.
2729

2830
## Troubleshooting

packages/debugger/src/entries/main.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ export interface DebuggerPublicApi extends PublicApi {
9292
* service: 'my-app',
9393
* site: 'datadoghq.com',
9494
* env: 'production'
95+
* version: 'my-deployed-build-version',
9596
* })
9697
* ```
9798
*/

0 commit comments

Comments
 (0)