Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Breakpoints never bind with Turbopack (Next.js) source maps: bundled source-map 0.7.4 has broken index-map support

Open Beginner friendly
#401 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
68/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
nextjs, typescript
Domain
devtools

Research direction

The fix is a dependency bump: package.json already allows source-map ^0.7.4 to resolve to 0.7.6, so the lockfile is what pins the old version. Change the source-map entry in package-lock.json to 0.7.6 (for example with npm install source-map@^0.7.6), then run the existing build and tests. Do not edit dist/adapter.bundle.js, which is generated output. Done when the lockfile resolves 0.7.6 and the build passes; confirming the breakpoint needs a Turbopack-based Next.js app.

Written by the indexing model from the issue text.

Description

Summary

Breakpoints in apps built with Turbopack (Next.js dev server) stay unbound. Turbopack emits index source maps (a top-level sections array), and [email protected], the version pinned in package-lock.json, has two bugs in IndexedSourceMapConsumer that stop the adapter from computing any breakable locations. Both are fixed in [email protected].

Environment
  • vscode-firefox-debug 2.15.0
  • Firefox Developer Edition 158.0
  • Next.js 16.3.6 (Turbopack dev server)
  • macOS 26.6.2
  • VS Code 1.141.0
Steps to reproduce
  1. Run a Next.js app with the Turbopack dev server (next dev).
  2. Launch it with a "type": "firefox", "request": "launch" config.
  3. Set a breakpoint in any app source file and load the page that uses it.

Expected: the breakpoint binds.

Actual: it stays unbound. The source does load and maps to the right local path (SourcesManager: Adding source … / PathConversion: Converted url file:///…), but no getBreakpointPositionsCompressed / setBreakpoint requests are ever sent, and no error is logged.

Root cause

Both bugs are in IndexedSourceMapConsumer in [email protected]:

  1. computeColumnSpans() is missing. getAllBreakables() calls sourceMappingInfo.computeColumnSpans(), which calls sourceMapConsumer.computeColumnSpansOn an index map that throws TypeError`, which is swallowed in the ase breakpoint is never set.
  2. _parseMappings() drops each mapping's source. It calls util.computeSourceURL(section.consumer.sourceRoot, null, this._sourceMapURL) with null instead of the mapping's source. Every mapping is therefore attributed to the source-map URL, eachMapping never yields a mapping for the original file, and the computed breakable ranges are empty.

[email protected] adds IndexedSourceMapConsumer#computeColumnSpans and fixes the source attribution.

Proposed fix

Bump source-map to ^0.7.6 in package.json and update package-lock.json. The current range ^0.7.4 already allows 0.7.6; only the lockfile pins 0.7.4.

Local workaround (verified)

Patching these two spots in dist/adapter.bundle.js (2.15.0) makes brrectly in Turbopack code:

-(this.sourceMapConsumer.computeColumnSpans(),this.columnSpansComputed=!0)
+("function"==typeof this.sourceMapConsumer.computeColumnSpans&&this.sourceMapConsumer.computeColumnSpans(),this.columnSpansComputed=!0)
-let a=n.computeSourceURL(e.consumer.sourceRoot,null,this._sourceMapURL);
+let a=n.computeSourceURL(e.consumer.sourceRoot,o.source,this._source

Then run Developer: Reload Window.

Dominant language
TypeScript
Stars
446
Forks
77
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from firefox-devtools/vscode-firefox-debug

All issues in firefox-devtools/vscode-firefox-debug

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.