Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

183
Visualizações
VS Code Unverified Breakpoints

I'm trying to debug a Node/Express TypeScript app in VS Code (v. 1.24.0) and all my breakpoints are greyed out during debugging.

The error is "Unverified Breakpoint, Breakpoints set but not yet bound." I've searched but can't figure out what's wrong with my config. There is no error in the console, the debugger attaches successfully when I choose the process, but the breakpoints don't work.

How do I debug this?

basic folder structure:

/.vscode
/src/server.ts
/dist/server.js
launch.json
tsconfig.json

launch.json

{
            "type": "node",
            "request": "attach",
            "name": "Attach by Process ID",
            "processId": "${command:PickProcess}",
            "protocol": "inspector",
            "address": "localhost",
            "port": 8080,
            "restart": true,
            "preLaunchTask": "npm: build",
            "sourceMaps": true,
            "outFiles" : [ "${workspaceFolder}/dist/**/*.js" ]
        },

tsconfig.json

{
  "compilerOptions": {
    "alwaysStrict": true,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "module": "commonjs",
    "moduleResolution": "node",
    "target": "es6",
    "outDir": "dist",
    "rootDir": "src",
    "sourceMap": true,
    "typeRoots": [ "node_modules/@types" ]
  },
  "include": [
    "src/**/*.ts"
  ],
  "exclude": [
    "node_modules"
  ]
}

tasks.json

"version": "2.0.0",
    "tasks": [
        {
            "type": "npm",
            "script": "build",
            "group": {
                "kind": "build",
                "isDefault": true
            }
        } ]
over 4 years ago · Santiago Trujillo
3 Respostas
Responde à pergunta

0

For anyone who runs into this error, I was able to find a solution. The issue was the way I was launching the Node process, not the mapping of the source maps (which produces a different error).

To attach to the process, I launched it from the VS Code terminal like this:

node --inspect dist/server.js

launch.json:

{
            "type": "node",
            "request": "attach",
            "name": "Attach by Process ID",
            "processId": "${command:PickProcess}",
            "protocol": "inspector",
            "address": "localhost",
            "port": 8080,
            "restart": true,
            "preLaunchTask": "npm: build",
            "sourceMaps": true,
            "outFiles" : [ "${workspaceRoot}/dist/**/*.js" ]
        },
over 4 years ago · Santiago Trujillo Relatório

0

I was finding all the breakpoints I tried to set in one file got this problem, but non of the rest.

I was naming the file dispatcher.js with a lower case, but pulling it into node with:

const { Dispatcher } = require('./Dispatcher')

and the contents was a javascript class being exported as:

module.exports = { Dispatcher }
over 4 years ago · Santiago Trujillo Relatório

0

I encountered this problem using vscode 1.25

Looks like it's triggered when a breakpoint-containing source (.ts) is changed while Debug session is running. The breakpoints could be re-enabled by re-saving the source, or by re-togglig the breakpoint.

However if the source was changed, then debugging has to be restarted to be in-sync with the source.

This issue seems to spill into the Edit mode too, the breakpoints would remain "Unverified" even after leaving the Debug mode. Again, re-saving the source appears to re-enable the breakpoints in this case.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda