Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

オープン 初心者向け
#401 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
68/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
nextjs, typescript
領域
devtools

調査の方向性

修正は依存関係のバージョンアップです。package.json ではすでに source-map ^0.7.4 が 0.7.6 に解決されることを許可しているので、古いバージョンを固定しているのは lockfile です。package-lock.json の source-map エントリを 0.7.6 に変更し(例: npm install source-map@^0.7.6)、その後既存のビルドとテストを実行してください。dist/adapter.bundle.js は生成物なので編集しないでください。lockfile が 0.7.6 に解決され、ビルドが通れば完了です。ブレークポイントの確認には Turbopack ベースの Next.js アプリが必要です。

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
TypeScript
スター
445
フォーク
77
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

firefox-devtools/vscode-firefox-debug のほかの issue

firefox-devtools/vscode-firefox-debug の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。