Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

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

Abierto Apto para principiantes
#401 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
68/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
nextjs, typescript
Área
devtools

Línea de trabajo

La solución es una actualización de dependencia: package.json ya permite que source-map ^0.7.4 se resuelva a 0.7.6, así que es el lockfile el que fija la versión antigua. Cambia la entrada source-map en package-lock.json a 0.7.6 (por ejemplo, con npm install source-map@^0.7.6) y luego ejecuta el build y las pruebas existentes. No edites dist/adapter.bundle.js, que es salida generada. Está terminado cuando el lockfile resuelve 0.7.6 y el build pasa; confirmar el breakpoint requiere una aplicación Next.js basada en Turbopack.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
TypeScript
Estrellas
445
Forks
77
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de firefox-devtools/vscode-firefox-debug

Todos los issues de firefox-devtools/vscode-firefox-debug

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.