Breakpoints never bind with Turbopack (Next.js) source maps: bundled source-map 0.7.4 has broken index-map support
まだ誰も着手していません。
評価
- 難易度
- 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
- Run a Next.js app with the Turbopack dev server (
next dev). - Launch it with a
"type": "firefox","request": "launch"config. - 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]:
computeColumnSpans()is missing.getAllBreakables()callssourceMappingInfo.computeColumnSpans(), which callssourceMapConsumer.computeColumnSpansOn an index map that throwsTypeError`, which is swallowed in the ase breakpoint is never set._parseMappings()drops each mapping's source. It callsutil.computeSourceURL(section.consumer.sourceRoot, null, this._sourceMapURL)withnullinstead of the mapping's source. Every mapping is therefore attributed to the source-map URL,eachMappingnever 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 はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
firefox-devtools/vscode-firefox-debug のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
firefox-devtools/vscode-firefox-debug#391 · コメント 2 件 · リアクション 1 件 ·
-
bug path mapping
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
-
Castleオープン
難易度 5/5 1週間以上 初心者へのやさしさ 10/100
-
Create new issueオープン
難易度 5/5 1週間以上 初心者へのやさしさ 1/100
firefox-devtools/vscode-firefox-debug の issue をすべて見る
似ている issue
-
check:failed streams:edit
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
iptv-org/iptv#55901 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 2 日以内に返信
-
package:ios ships XCFrameworks with absolute symlinks, which SwiftPM refuses to extract対応中かも @cusnirvladislav が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
callstackincubator/rock#740 ·
-
S: triage
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 2 日以内に返信
-
area:workflow bug ready-for-human
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
fil-donadoni/tolaria#6108 ·
メンテナーはふだん 1 日以内に返信